Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 68 additions & 3 deletions docs/btcli/btcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ btcli [OPTIONS] COMMAND [ARGS]...

**Options**:

- `--version`: Show BTCLI version
- `--commands`: Show BTCLI commands
- `--version`: Show BTCLI version.
- `--commands`: Show BTCLI commands.
- `--debug`: Saves the debug log from the last used command.
- `--install-completion`: Install completion for the current shell.
- `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
- `--help`: Show this message and exit.
Expand Down Expand Up @@ -1914,6 +1915,7 @@ aliases: subnet, s
- `check-start`: Checks if a subnet's emission schedule can be started.
- `set-identity`: Get the identity information for a subnet.
- `get-identity`: Set or update the identity information for a subnet.
- `set-symbol`: Allows the user to update their subnet symbol to a different available symbol. The full list of available symbols can be found here: https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/subnets/symbols.rs#L8

### `btcli subnets hyperparameters`

Expand Down Expand Up @@ -2371,6 +2373,43 @@ alias: get_identity
| `--json-output`, `--json-out` | | Outputs the result of the command as JSON. |
| `--help` | | Show this message and exit. |

### `btcli subnets set-symbol`

Allows the user to update their subnet symbol to a different available symbol. The full list of available symbols can be found here:
https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/subnets/symbols.rs#L8

**EXAMPLE**

```bash
btcli subnets set-symbol --netuid 1 シ
```

:::info
JSON OUTPUT:
If --json-output is used, the output will be in the following schema: `{success: bool, message: str}`
:::

**Usage:**

```bash
btcli subnets set-symbol [OPTIONS]
```

**Parameters:**

| Options | Type | Description |
| --------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------ |
| `--wallet-name`, `--name`, `--wallet_name`, `--wallet.name` | TEXT | Name of the wallet. |
| `--wallet-path`, `-p`, `--wallet_path`, `--wallet.path` | TEXT | Path where the wallets are located. For example: `/Users/btuser/.bittensor/wallets`. |
| `--hotkey`, `-H`, `--wallet_hotkey`, `--wallet-hotkey`, `--wallet.hotkey` | TEXT | Hotkey of the wallet |
| `--network`, `--subtensor.network`, `--chain`, `--subtensor.chain_endpoint` | | The subtensor network to connect to. Default: finney. |
| `--netuid` | INTEGER | The netuid of the subnet in the network, (e.g. 1). |
| `--json-output`, `--json-out` | | Outputs the result of the command as JSON. |
| `--prompt/--no-prompt`, ` /--yes`, ` /--no_prompt`, ` /-y` | | Enable or disable interactive prompts. |
| `--quiet` | | Display only critical information on the console. |
| `--verbose` | | Enable verbose output. |
| `--help` | | Show this message and exit. |

## `btcli weights`

**Usage**:
Expand Down Expand Up @@ -2480,14 +2519,15 @@ btcli utils [OPTIONS] COMMAND [ARGS]...
**Commands**:

- `convert`: Allows for converting between tao and rao...
- `latency`: This command will give you the latency of all finney-like network in additional to any additional networks you specify via the '--network' flag.

### `btcli utils convert`

Allows for converting between tao and rao using the specified flags

**Usage**:

```console
```sh
btcli utils convert [OPTIONS]
```

Expand All @@ -2499,6 +2539,31 @@ btcli utils convert [OPTIONS]
| `--tao` | FLOAT | Convert amount from Tao |
| `--help` | | Show this message and exit. |

### `btcli utils latency`

This command will give you the latency of all finney-like network in addition to any additional networks you specify via the `--network` flag

The results are three-fold. One column is the overall time to initialise a connection, send the requests, and wait for the results. The second column measures single ping-pong speed once connected. The third makes a real world call to fetch the chain head.

**Example:**

```sh
btcli utils latency --network ws://189.234.12.45 --network wss://mysubtensor.duckdns.org
```

**Usage**:

```sh
btcli utils latency [OPTIONS]
```

**Options**:

| Option | Type | Description |
| ----------- | ---- | ---------------------------------------------------------- |
| `--network` | TEXT | Network(s) to test for the best connection [default: None] |
| `--help` | | Show this message and exit. |

## `btcli liquidity`

**Usage:**
Expand Down
22 changes: 22 additions & 0 deletions docs/getting-started/install-btcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,25 @@ If both `chain` and `network` config values are present in the `config.yml`, the
```bash
btcli config --help
```

### Environment variables

The Bittensor CLI also accepts environment variables that can change how it works:

- `USE_TORCH` (default 0): If set to 1, will use torch instead of numpy
- `DISK_CACHE` (default 0, also settable in config): If set to 1 (or set in config), will use disk caching for various safe-cachable substrate
calls (such as block number to block hash mapping), which can speed up subsequent calls.
- `BTCLI_CONFIG_PATH` (default `~/.bittensor/config.yml`): This will set the config file location, creating if it does not exist.
- `BTCLI_DEBUG_FILE` (default `~/.bittensor/debug.txt`): The file stores the most recent's command's debug log.

## Debugging

BTCLI stores a debug log for every command you run. Debug logging is enabled by default if `use_cache` is on. All logs are written to `~/.bittensor/debug.txt` and overwritten after each BTCLI command.

You can change the location with the [`BTCLI_DEBUG_FILE` environment variable](#environment-variables).

:::info
The debug log does not contain sensitive data (such as private keys). It is intended to be shared with developers for troubleshooting. The file includes details about the executed command, configuration, and request/response interactions with the chain.
:::

If you encounter an issue and want to preserve the log before it is overwritten, run `btcli --debug` and specify a new location to save the file. We recommend doing this first before starting your debugging with us on [Discord](https://discord.gg/bittensor) or opening an issue on [GitHub](https://github.com/opentensor/btcli/issues/new), where you can also upload your debug file.