agcli is a Rust CLI + SDK for the Bittensor network. It covers wallet management, staking, transfers, subnet operations, weight setting, delegation, and more.
# From source (requires Rust toolchain)
git clone https://github.com/unconst/agcli && cd agcli
cargo install --path .
# Or install directly from GitHub
cargo install --git https://github.com/unconst/agcli
# Self-update an existing installation
agcli updateRequirements: Rust 1.75+, a C compiler (gcc/clang), and network access (build fetches chain metadata).
- TAO — the native token of Bittensor (1 TAO = 1,000,000,000 rao)
- Coldkey — your spending key (encrypted on disk, password-protected)
- Hotkey — your operational key (used for mining/validating, stored in plaintext)
- Wallet — a directory containing your coldkey + hotkey files
- Subnet — an independent network within Bittensor, identified by a
netuid(0–65535) - Alpha — each subnet has its own alpha token; staking TAO buys alpha at the current price
- Dynamic TAO — the AMM mechanism that prices alpha tokens based on supply and demand
agcli wallet create --name my_wallet
# Prompts for a password to encrypt the coldkey.
# Generates a 12-word mnemonic — WRITE IT DOWN AND STORE IT SECURELY.
# Non-interactive (for scripts/agents):
agcli wallet create --name my_wallet --password mypass123Create a hotkey for mining or validating:
agcli wallet new-hotkey --name my_hotkeyList all wallets and check details:
agcli wallet list
agcli wallet show -w my_wallet --all
# JSON output for scripts:
agcli --output json wallet list
agcli --output json wallet show --allagcli balance
# Uses your default wallet. Or specify an address:
agcli balance --address 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
# JSON output for scripts:
agcli --output json balance# Network overview (block height, issuance, staking ratio)
agcli view network
# List all subnets
agcli subnet list
# Detailed subnet info
agcli subnet show --netuid 1
# Subnet hyperparameters
agcli subnet hyperparams --netuid 1
# Metagraph (all neurons on a subnet)
agcli subnet metagraph --netuid 1
# Dynamic TAO info (prices, pools, emissions)
agcli view dynamic# Interactive wizard — shows subnets, asks for your choice, confirms
agcli stake wizard
# Direct staking
agcli stake add --amount 10.0 --netuid 1
# View your stakes
agcli stake list
# Staking analytics (APY estimates, yield projections)
agcli view staking-analyticsagcli transfer --dest 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY --amount 1.5Settings are resolved in priority order: CLI flags > env vars > config file > defaults.
agcli config set --key network --value finney
agcli config set --key wallet --value my_wallet
agcli config set --key output --value json # table, json, or csv
agcli config show # view all settings
agcli config unset --key output # remove a setting
agcli config path # show config file locationexport AGCLI_NETWORK=finney
export AGCLI_WALLET=my_wallet
export AGCLI_WALLET_DIR=~/.bittensor/wallets
export AGCLI_PASSWORD=mypass # skip password prompts
export AGCLI_YES=1 # skip confirmation promptsagcli --network test --wallet my_wallet --output json subnet list
agcli --yes --password mypass stake add --amount 10.0 --netuid 1agcli completions --shell bash > /etc/bash_completion.d/agcli # Bash
agcli completions --shell zsh > ~/.zfunc/_agcli # Zsh
agcli completions --shell fish > ~/.config/fish/completions/agcli.fish # Fish| Network | Flag | Endpoint |
|---|---|---|
| Finney (mainnet) | --network finney |
wss://entrypoint-finney.opentensor.ai:443 |
| Testnet | --network test |
wss://test.finney.opentensor.ai:443 |
| Local | --network local |
ws://127.0.0.1:9944 |
| Custom | --endpoint wss://... |
any WebSocket URL |
Local development — Start a local chain for zero-cost testing with agcli localnet scaffold (requires Docker). This gives you funded accounts and a pre-configured subnet in seconds. Scaffold-created wallets use deterministic keypairs, so you don't need agcli wallet create — just start building. See the Local Testing Guide.
Connection refused / timeout:
- Check your network connection
- Verify the endpoint:
agcli --network finney view network - Finney nodes can be slow at peak times — retry after a moment
Wrong password:
- Error: "Decryption failed — wrong password"
- If you forgot your password, restore from mnemonic:
agcli wallet regen-coldkey --name my_wallet
Wallet not found:
- Error: "Wallet 'X' not found"
- List available wallets:
agcli wallet list - Check wallet directory:
agcli config show(look atwallet_dir)
Invalid address:
- Bittensor SS58 addresses are 48 characters and start with
5 - Verify on taostats.io before sending funds
Transaction failed:
- Read the error hint carefully — agcli maps chain errors to suggestions
- Common: insufficient balance, rate limits, wrong subnet, hotkey not registered