Command Line Interface (CLI)

The Bittensor command line interface (CLI) allows programmatic access to the Bittensor ecosystem.

Installing the CLI

The CLI is part of the Bittensor package.

The most up-to-date instructions can be found in the Bittensor documentation.

Using the CLI

To get all of the latest commands from the CLI:

btcli --help

usage: btcli <command> <command args>

bittensor cli v6.6.0

positional arguments:
  {subnets,s,subnet,root,r,roots,wallet,w,wallets,stake,st,stakes,sudo,su,sudos,legacy,l,info,i}
    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.
    info (i)            Instructions for enabling autocompletion for the CLI.

options:
  -h, --help            show this help message and exit
  --print-completion {bash,zsh,tcsh}
                        Print shell tab completion script

subnets: Commands related to subnets

stake: Add and remove stake from hotkeys

wallet: Work with your Bittensor wallets

sudo: Set and query subnet parameters

root: Parameters for members of the root subnet

legacy: Deprecated

info: Instructions on autocompletion of CLI