Bittensor CLI
After you install Bittensor you can use btcli
command line interface (CLI) to stake or unstake funds, run miners, check network state, and even deploy, analyze, and interface with the Bittensor network. This section presents the command and subcommand options available in btcli
CLI.
Usage
btcli [COMMAND]
usage: btcli <command> <command args>
positional arguments:
{subnets,s,subnet,root,r,roots,wallet,w,wallets,stake,st,stakes,sudo,su,sudos,legacy,l}
subnets (s, subnet)
Commands for managing and viewing subnetworks.
root (r, roots) Commands for managing and viewing the root network.
wallet (w, wallets)
Commands for managing and viewing wallets.
stake (st, stakes) Commands for staking and removing stake from hotkey accounts.
sudo (su, sudos) Commands for subnet management
legacy (l) Miscellaneous commands.
Wallets
Show overview
btcli wallet overview [OPTIONS]
Displays comprehensive information about each neuron associated with the user's wallets, including both hotkeys and coldkeys. It is especially useful for users managing multiple accounts or looking for a summary of their network activities and stake distributions.
Example
btcli wallet overview
With example options:
btcli wallet overview --all --sort_by stake --sort_order descending
Run,
btcli wallet overview --help
for full options.
Show history
btcli wallet history --wallet.name <YOUR WALLET NAME>
Displays the last 1000 transactions performed with <YOUR WALLET NAME>
by querying the Taostats GraphQL indexer. It shows the From
, To
, Amount
, Extrinsic Id
and Block Number
.
Run,
btcli wallet history --help
for help.
List wallets
btcli wallet list [OPTIONS]
- Lists all wallets locally stored on your machine under path
--wallet.path
. - Output addresses are SS58 encoded.
- Required as destinations for
btcli transfer
btcli wallet list
Wallets
└─
my_wallet (<ss58_address>)
└── my_first_hotkey (<ss58_address>)
Check balance in all wallets
btcli wallet balance --all
Lists the balances in all the wallets in the user's configuration directory, showing the wallet name, coldkey address, and the free and staked balances.
Check balance in a single wallet
btcli w balance --wallet.name WALLET
or you can specify the wallet's name in the terminal prompt:
btcli w balance
New coldkey
btcli wallet new_coldkey [OPTIONS]
Create a new wallet with encrypted coldkey EdDSA cryptographic keypair:
btcli wallet new_coldkey