Skip to main content

A professional CLI for managing Bittensor subnet pool operations

Project description

🌊 poolcli

A command-line interface for managing Bittensor subnet pool operations. poolcli simplifies wallet authentication, developer key management, and pool administration through an intuitive CLI.

Features

  • Wallet Authentication: Seamless Bittensor wallet integration with secure token management
  • Developer Key Management: Create, list, and manage developer keys with invoice tracking
  • Pool Management: Create, list, and inspect subnet pools
  • Session Management: Automatic token caching and re-authentication support

Installation

pip install poolcli
or
uv add poolcli

Or install from source:

git clone <repository-url>
cd poolcli
pip install -e .

Requirements

  • Python 3.10+

Quick Start

1. Authenticate

poolcli auth login --wallet-name my_wallet

You'll be prompted for your hotkey (defaults to "default" if not specified).

2. View Your Wallets

poolcli wallet list

This displays all available coldkeys and their associated hotkeys with addresses.

3. Create a Developer Key

poolcli key create --wallet-name my_wallet

This command will:

  • Authenticate with your wallet
  • Create an invoice for a developer key
  • Prompt for payment in TAO
  • Optionally create a pool after successful payment

4. Create a Pool

poolcli pool create --wallet-name my_wallet

5. View Your Pools

poolcli pool list --wallet-name my_wallet

6. Initiate Refund

poolcli refund create --wallet-name my_wallet

Command Reference

Authentication (auth)

Manage authentication and sessions.

poolcli auth login

Authenticate with your Bittensor wallet.

poolcli auth login \
  --wallet-name my_wallet \
  --hotkey default \
  --force  # Force re-authentication

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --hotkey: Hotkey name (defaults to "default")
  • --backend-url: Backend API URL
  • --force: Force re-authentication even if a valid session exists

poolcli auth status

Check your current authentication status.

poolcli auth status --wallet-name my_wallet

poolcli auth logout

Clear all stored authentication tokens.

poolcli auth logout

Key Management (key)

Manage developer keys and invoices.

poolcli key create

Create a new developer key invoice and optionally proceed with payment.

poolcli key create \
  --wallet-name my_wallet \
  --hotkey default \

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --hotkey: Hotkey to use for the key (defaults to "default")
  • --backend-url: Backend API URL
  • --force: Force re-authentication

poolcli key list

List all developer keys for your wallet.

poolcli key list \
  --wallet-name my_wallet \
  --page 1 \
  --limit 15 \
  --status active

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --page: Page number for pagination (default: 1)
  • --limit: Number of keys per page (default: 15)
  • --status: Filter by status: active, expired, or unused
  • --backend-url: Backend API URL

poolcli key invoice get

Check the status of a specific invoice.

poolcli key invoice get <invoice-id> --wallet-name my_wallet

Arguments:

  • invoice-id: The invoice ID to check

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --backend-url: Backend API URL

Pool Management (pool)

Manage your Bittensor subnet pools.

poolcli pool create

Create a new pool for your wallet.

poolcli pool create \
  --wallet-name my_wallet \
  --hotkey default \

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --hotkey: Hotkey to use for the pool (defaults to "default")
  • --backend-url: Backend API URL
  • --force: Force re-authentication

poolcli pool list

List all pools for your wallet.

poolcli pool list \
  --wallet-name my_wallet \
  --page 1 \
  --limit 15

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --page: Page number for pagination (default: 1)
  • --limit: Number of pools per page (default: 15)
  • --backend-url: Backend API URL
  • --force: Force re-authentication

poolcli pool show

View detailed information about a specific pool.

poolcli pool show <pool-id> --wallet-name my_wallet

Arguments:

  • pool-id: The pool ID to inspect

Options:

  • --wallet-name (required): Your Bittensor wallet name
  • --backend-url: Backend API URL

Refund Management (refund)

Initiate Refund Process

poolcli refund create

Start the refund process by selecting the expired developer key.

poolcli refund create

poolcli refund list

Display all available refund invoices for a specific wallet.

poolcli refund list

poolcli refund get

Display all invoice details for a specific Refund ID.

poolcli refund get

Wallet Management (wallet)

Inspect your Bittensor wallets.

poolcli wallet list

Display all available coldkeys and their associated hotkeys with addresses.

poolcli wallet list

This command scans your wallet directory and displays public key information (no password required).

Global Options

poolcli --version      # Show version and exit
poolcli --commands     # Show all available commands and exit
poolcli --help         # Show help message and exit

Wallet Storage

Bittensor wallets are typically stored in ~/.bittensor/wallets/. The wallet list command reads from this directory.

Common Workflows

Complete Setup Workflow

# 1. View available wallets
poolcli wallet list

# 2. Authenticate
poolcli auth login --wallet-name my_wallet

# 3. Create a developer key
poolcli key create --wallet-name my_wallet

# 4. Check key status
poolcli key list --wallet-name my_wallet --status active

# 5. Create a pool
poolcli pool create --wallet-name my_wallet

# 6. View your pools
poolcli pool list --wallet-name my_wallet

Check Invoice Status

# Create invoice
poolcli key create --wallet-name my_wallet

# Check status later
poolcli key invoice get <invoice-id> --wallet-name my_wallet

Development

Installation for Development

git clone <repository-url>
cd poolcli
pip install -e ".[dev]"

License

GNU GENERAL PUBLIC LICENSE Version 2

Support

For issues, questions, or contributions, please create issue in github.

See Also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poolcli-1.1.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poolcli-1.1.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file poolcli-1.1.0.tar.gz.

File metadata

  • Download URL: poolcli-1.1.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.7

File hashes

Hashes for poolcli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 020be3506595ca13292f532c613ddd0c869f27af8d8a308766f7151ecda60f9f
MD5 3d7b7801095a49708bf449cbcb78efee
BLAKE2b-256 a97ae914f5c83253933fbee0cbb46db0254d943ee992fd37c9d0f8520e9552e0

See more details on using hashes here.

File details

Details for the file poolcli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: poolcli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.7

File hashes

Hashes for poolcli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd2e98fb5423c501ac0cb6a163a396c2a932604e9618f3f3cfc5dc1d91cf48ba
MD5 32420e5c00790082ae5da6b99cc16d33
BLAKE2b-256 4c951a96a6cf26ce2e05d8e251dc448d8bc0f4e37764413e6a266d367eaf8263

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page