Command Line Interface (CLI)
CLI or clee?
The Bittensor command line interface (CLI) allows programmatic access to the Bittensor ecosystem. As of September 2024, the BTCLI has is no longer part of the Bittensor package and is a standalone app.
Installation
Section titled “Installation”From Source
Section titled “From Source”As of release 8.0.0 (September 2024), the btcli has its own repository separate from the SDK.
git clone https://github.com/opentensor/btcli.gitcd btclipip install .From pip
Section titled “From pip”pip install bittensor-cliIf you would like the SDK and the CLI:
pip install bittensor[cli] #for sdk + cliTrouble? The most up-to-date instructions can be found in the Bittensor documentation.
Using the CLI
Section titled “Using the CLI”To get all of the latest commands from the CLI use btcli --help
The command: btcli --commands shows a simple tree of possible commands
Here is the help output as of March 6, 2025:
btcli --help
Command line interface (CLI) for Bittensor. Uses the values in the configuration file. These values can be overriden by passing them explicitly in the command line.
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ --version Show BTCLI version ││ --commands Show BTCLI commands ││ --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. │╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ config Config commands, aliases: `c`, `conf` ││ stake Stake commands, alias: `st` ││ subnets Subnets commands, alias: `s`, `subnet` ││ sudo Sudo commands, alias: `su` ││ wallet Wallet commands, aliases: `wallets`, `w` │╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Made with ❤ by The Openτensor FoundaτionConfiguring the CLI
Section titled “Configuring the CLI”The new btcli config allows you to set default parameters on your installation.