Skip to content

Commit b66fa8b

Browse files
committed
btcli 9.11 updates
1 parent 2dd606c commit b66fa8b

File tree

2 files changed

+90
-3
lines changed

2 files changed

+90
-3
lines changed

docs/btcli/btcli.md

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ btcli [OPTIONS] COMMAND [ARGS]...
2323

2424
**Options**:
2525

26-
- `--version`: Show BTCLI version
27-
- `--commands`: Show BTCLI commands
26+
- `--version`: Show BTCLI version.
27+
- `--commands`: Show BTCLI commands.
28+
- `--debug`: Saves the debug log from the last used command.
2829
- `--install-completion`: Install completion for the current shell.
2930
- `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
3031
- `--help`: Show this message and exit.
@@ -1914,6 +1915,7 @@ aliases: subnet, s
19141915
- `check-start`: Checks if a subnet's emission schedule can be started.
19151916
- `set-identity`: Get the identity information for a subnet.
19161917
- `get-identity`: Set or update the identity information for a subnet.
1918+
- `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
19171919

19181920
### `btcli subnets hyperparameters`
19191921

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

2376+
### `btcli subnets set-symbol`
2377+
2378+
Allows the user to update their subnet symbol to a different available symbol. The full list of available symbols can be found here:
2379+
https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/subnets/symbols.rs#L8
2380+
2381+
**EXAMPLE**
2382+
2383+
```bash
2384+
btcli subnets set-symbol --netuid 1 シ
2385+
```
2386+
2387+
:::info
2388+
JSON OUTPUT:
2389+
If --json-output is used, the output will be in the following schema: `{success: bool, message: str}`
2390+
:::
2391+
2392+
**Usage:**
2393+
2394+
```bash
2395+
btcli subnets set-symbol [OPTIONS]
2396+
```
2397+
2398+
**Parameters:**
2399+
2400+
| Options | Type | Description |
2401+
| --------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------ |
2402+
| `--wallet-name`, `--name`, `--wallet_name`, `--wallet.name` | TEXT | Name of the wallet. |
2403+
| `--wallet-path`, `-p`, `--wallet_path`, `--wallet.path` | TEXT | Path where the wallets are located. For example: `/Users/btuser/.bittensor/wallets`. |
2404+
| `--hotkey`, `-H`, `--wallet_hotkey`, `--wallet-hotkey`, `--wallet.hotkey` | TEXT | Hotkey of the wallet |
2405+
| `--network`, `--subtensor.network`, `--chain`, `--subtensor.chain_endpoint` | | The subtensor network to connect to. Default: finney. |
2406+
| `--netuid` | INTEGER | The netuid of the subnet in the network, (e.g. 1). |
2407+
| `--json-output`, `--json-out` | | Outputs the result of the command as JSON. |
2408+
| `--prompt/--no-prompt`, ` /--yes`, ` /--no_prompt`, ` /-y` | | Enable or disable interactive prompts. |
2409+
| `--quiet` | | Display only critical information on the console. |
2410+
| `--verbose` | | Enable verbose output. |
2411+
| `--help` | | Show this message and exit. |
2412+
23742413
## `btcli weights`
23752414

23762415
**Usage**:
@@ -2480,14 +2519,15 @@ btcli utils [OPTIONS] COMMAND [ARGS]...
24802519
**Commands**:
24812520

24822521
- `convert`: Allows for converting between tao and rao...
2522+
- `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.
24832523

24842524
### `btcli utils convert`
24852525

24862526
Allows for converting between tao and rao using the specified flags
24872527

24882528
**Usage**:
24892529

2490-
```console
2530+
```sh
24912531
btcli utils convert [OPTIONS]
24922532
```
24932533

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

2542+
### `btcli utils latency`
2543+
2544+
This command will give you the latency of all finney-like network in addition to any additional networks you specify via the `--network` flag
2545+
2546+
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.
2547+
2548+
**Example:**
2549+
2550+
```sh
2551+
btcli utils latency --network ws://189.234.12.45 --network wss://mysubtensor.duckdns.org
2552+
```
2553+
2554+
**Usage**:
2555+
2556+
```sh
2557+
btcli utils latency [OPTIONS]
2558+
```
2559+
2560+
**Options**:
2561+
2562+
| Option | Type | Description |
2563+
| ----------- | ---- | ---------------------------------------------------------- |
2564+
| `--network` | TEXT | Network(s) to test for the best connection [default: None] |
2565+
| `--help` | | Show this message and exit. |
2566+
25022567
## `btcli liquidity`
25032568

25042569
**Usage:**

docs/getting-started/install-btcli.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,25 @@ If both `chain` and `network` config values are present in the `config.yml`, the
179179
```bash
180180
btcli config --help
181181
```
182+
183+
### Environment variables
184+
185+
The Bittensor CLI also accepts environment variables that can change how it works:
186+
187+
- `USE_TORCH` (default 0): If set to 1, will use torch instead of numpy
188+
- `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
189+
calls (such as block number to block hash mapping), which can speed up subsequent calls.
190+
- `BTCLI_CONFIG_PATH` (default `~/.bittensor/config.yml`): This will set the config file location, creating if it does not exist.
191+
- `BTCLI_DEBUG_FILE` (default `~/.bittensor/debug.txt`): The file stores the most recent's command's debug log.
192+
193+
## Debugging
194+
195+
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.
196+
197+
You can change the location with the [`BTCLI_DEBUG_FILE` environment variable](#environment-variables).
198+
199+
:::info
200+
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.
201+
:::
202+
203+
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.

0 commit comments

Comments
 (0)