The CLI
Configuration, global options, generated commands, and non-interactive use.
The btcli command is the SDK with a shell in front: every read in the
catalog is btcli query <name>, every transaction is
btcli tx <name>, and both are generated from the same registries as the
Python API, so they cannot diverge from it.
Configuration
Set connection and identity once, override per-command as needed:
btcli config set network finney
btcli config set wallet my_coldkey
btcli config getPrecedence, highest first: CLI flag > environment variable > config file > built-in default.
| Option | Env | Meaning |
|---|---|---|
--network, -n | BT_NETWORK | finney / test / local, or a ws:// endpoint |
--wallet, -w | BT_WALLET | coldkey wallet name |
--wallet-hotkey, -H | BT_WALLET_HOTKEY | hotkey name within the wallet |
--wallet-path | BT_WALLET_PATH | wallet directory |
--json | machine-readable JSON output | |
--yes, -y | skip confirmation prompts | |
--dry-run | preview a mutation without submitting | |
--quiet, -q | suppress informational output |
Command groups
btcli query <name>— every read;query --helplists them grouped by topic.btcli tx <name>— every transaction;tx --helplists them grouped by pallet. All support--dry-run,--yes, and--proxy-for.- Familiar workflows also have hand-written groups that wrap the same
machinery:
wallet,stake,subnets,weights,axon,proxy,multisig,crowd,lock,timelock,config. btcli tools— the JSON catalog of every transaction op with schemas, for agents.
Interactive by default, safe when it can't be
Run a tx command with required options missing and the CLI prompts for them,
then shows the plan and asks for confirmation. In a non-interactive session
(no TTY) without --yes, the command is declined rather than left
hanging — automation never blocks on a prompt it can't answer.
Address arguments
Any address option (--dest, --hotkey, --coldkey, ...) accepts a raw ss58
address, an address-book or proxy-book name, or a local key name (HOTKEY,
WALLET/HOTKEY, or a wallet name for coldkey options). --hotkey /
--coldkey fall back to the configured wallet when omitted; destination
options never default.
Shell completion
Completion scripts for bash, zsh, and fish ship in completions/ and install
into the standard system locations. If your shell doesn't auto-load them (e.g.
a venv install), source the script from your rc file, or run
btcli --install-completion.