CLI Reference
Complete command reference for Bittensor mining operations. Copy-paste ready for agents and humans.
All commands are designed for direct copy-paste execution. Replace <SUBNET_ID> with your target subnet number (0-128) and other placeholders as needed.
Install Bittensor CLI
Install the latest Bittensor CLI via pip
# Install Bittensor CLI
pip install -U bittensor-cli
# Verify installation
btcli --version
Update Bittensor
Update to the latest version
pip install --upgrade bittensor-cli
Create Wallet
Generate a new coldkey and hotkey pair
# Create coldkey (main wallet - store mnemonic safely!)
btcli wallet new-coldkey --wallet-name miner
# Create hotkey (for mining operations)
btcli wallet new-hotkey --wallet-name miner --hotkey default
List Wallets
View all configured wallets
btcli wallet list
Check Balance
View wallet TAO balance
btcli wallet balance --wallet-name miner
Regenerate from Mnemonic
Restore wallet from seed phrase
btcli wallet regen-coldkey --wallet-name miner --mnemonic "word1 word2 word3 ..."
Register on Subnet
Register your miner on a specific subnet (requires TAO)
# Replace <SUBNET_ID> with target subnet number (1-128)
btcli subnet register --netuid <SUBNET_ID> --wallet-name miner --hotkey default
Check Registration
Verify your registration status
btcli subnet metagraph --netuid <SUBNET_ID>
View All Subnets
List all available subnets
btcli subnet list
Run Miner
Start a miner on a subnet
# Clone subnet repo first, then:
python neurons/miner.py \
--netuid <SUBNET_ID> \
--wallet-name miner \
--hotkey default \
--logging.debug
Run with PM2
Production deployment with process manager
# Install PM2 if needed
npm install -g pm2
# Start miner with PM2
pm2 start neurons/miner.py --name "sn<SUBNET_ID>-miner" -- \
--netuid <SUBNET_ID> \
--wallet-name miner \
--hotkey default
Run Validator
Start a validator on a subnet
python neurons/validator.py \
--netuid <SUBNET_ID> \
--wallet-name validator \
--hotkey default \
--logging.debug
Stake TAO
Stake TAO to increase weight
btcli stake add --wallet-name miner --amount <AMOUNT>
Unstake TAO
Remove stake from validator
btcli stake remove --wallet-name miner --amount <AMOUNT>
Transfer TAO
Send TAO to another address
btcli wallet transfer --wallet-name miner --dest <ADDRESS> --amount <AMOUNT>
Complete Reference Script
All commands in a single downloadable file
# ============================================
# pikαx - Complete Bittensor CLI Reference
# ============================================
# INSTALLATION
# ============================================
pip install -U bittensor-cli
btcli --version
# WALLET MANAGEMENT
# ============================================
# Create new coldkey (main wallet)
btcli wallet new-coldkey --wallet-name miner
# Create new hotkey (for mining)
btcli wallet new-hotkey --wallet-name miner --hotkey default
# List all wallets
btcli wallet list
# Show wallet balance
btcli wallet balance --wallet-name miner
# Regenerate wallet from mnemonic
btcli wallet regen-coldkey --wallet-name miner --mnemonic "your 12 word phrase here"
# SUBNET REGISTRATION
# ============================================
# Check registration cost
btcli subnet pow-register --netuid <SUBNET_ID> --wallet-name miner --hotkey default --no-prompt
# Register on subnet (requires TAO)
btcli subnet register --netuid <SUBNET_ID> --wallet-name miner --hotkey default
# Check if registered
btcli subnet metagraph --netuid <SUBNET_ID>
# RUNNING MINERS
# ============================================
# Generic miner command structure
python neurons/miner.py \
--netuid <SUBNET_ID> \
--wallet-name miner \
--hotkey default \
--logging.debug
# Running with PM2 (recommended for production)
pm2 start neurons/miner.py --name "sn<SUBNET_ID>-miner" -- \
--netuid <SUBNET_ID> \
--wallet-name miner \
--hotkey default
# RUNNING VALIDATORS
# ============================================
python neurons/validator.py \
--netuid <SUBNET_ID> \
--wallet-name validator \
--hotkey default \
--logging.debug
# USEFUL COMMANDS
# ============================================
# View subnet info
btcli subnet list
# View metagraph
btcli subnet metagraph --netuid <SUBNET_ID>
# Stake TAO
btcli stake add --wallet-name miner --amount <AMOUNT>
# Unstake TAO
btcli stake remove --wallet-name miner --amount <AMOUNT>
# Transfer TAO
btcli wallet transfer --wallet-name miner --dest <ADDRESS> --amount <AMOUNT>