htcli docs
Getting Started

Introduction

htcli is the official command-line interface for the Hypertensor ecosystem — manage wallets, operate subnets and nodes, stake, vote, and query the chain without leaving your terminal.

Hypertensor is a Substrate-based network for coordinating decentralized AI: subnets of compute and services, the operators and validators that run them, and the staking, consensus, and governance that secure it. htcli wraps every core transaction and query layer of that chain in a single, scriptable namespace.

What you can do

  • Wallets — create and manage encrypted coldkey/hotkey pairs locally.
  • Subnets — register networks, publish models, and set on-chain weights.
  • Nodes — launch, daemonize, and monitor miner and validator nodes.
  • Stake — add, remove, and delegate stake; inspect yields.
  • Governance — review proposals and cast consensus votes.
  • Chain — read blocks, balances, and runtime state directly from a peer.

New here? Head to Installation, then run through the Quickstart to go from a fresh machine to a registered validator in a few commands.

Design principles

Every command works the same way: predictable subcommands, consistent flags, and machine-readable output. Pass --format json to any command for scripting, or --format table (the default) for humans. No middleware, no hosted API — htcli talks to the chain directly.

Getting Started

Installation

Install the stable client from PyPI. htcli runs on macOS, Linux, and Windows.

Requirements

  • Python 3.10+ and pip
  • A network connection to a Hypertensor RPC endpoint

Install with pip

bash
$ pip install htcli
Collecting htcli
Installing collected packages: requests, htcli
Successfully installed htcli-1.0.0

Verify the install

bash
$ htcli --version
htcli v1.0.0

Upgrade

bash
$ pip install --upgrade htcli

Prefer isolation? Install into a virtual environment (python -m venv .venv && source .venv/bin/activate) before running pip install htcli.

Getting Started

Quickstart

From a fresh install to an active validator in five commands.

1. Initialize configuration

Run the wizard once to write ~/.htcli/config.yaml with your endpoint and defaults.

bash
$ htcli config init
  ? Blockchain endpoint   wss://hypertensor.duckdns.org
  ? Default output format  table
  Configuration initialized.

2. Create a wallet

bash
$ htcli wallet create --name master-key
  Generating sr25519 keypair…
  Wallet "master-key" created.

3. Register a validator

bash
$ htcli validator register --subnet 8
  [SUCCESS] Registered in UID slot #11 on subnet 8.

That's it — you're on the network. Read the command reference for everything else, or browse Concepts to understand how the pieces fit together.

Getting Started

Configuration

htcli reads a YAML config and accepts global flags that override it per-command.

The config file

By default htcli stores configuration at ~/.htcli/config.yaml. Generate it with the wizard:

~/.htcli/config.yaml
endpoint: wss://hypertensor.duckdns.org
format:   table
wallet_dir: ~/.htcli/wallets

Global options

These flags work on every command and take precedence over the config file:

FlagDescription
-c, --config PATHPath to an alternate configuration file.
-e, --endpoint TEXTBlockchain RPC endpoint (overrides config).
-f, --format TEXTOutput format: table, json, or csv.
-v, --verboseVerbose logging.
--helpShow help for any command or subcommand.

Every flag also has an environment-variable form, e.g. HTCLI_ENDPOINT and HTCLI_FORMAT — handy for CI and daemon setups.

Command Reference

htcli wallet

Create, restore, inspect, and manage cryptographic coldkey and hotkey pairs locally, with AES-256 encryption at rest.

Subcommands

CommandDescription
wallet createGenerate a new sr25519 coldkey/hotkey pair.
wallet listList wallets stored locally.
wallet inspectShow addresses and metadata for a wallet.
wallet balanceQuery the on-chain balance of a wallet.
wallet importRestore a wallet from a mnemonic.

Create a wallet

bash
$ htcli wallet create --name master-key
  Coldkey  5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
  Hotkey   5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty
  Wallet "master-key" created.

Options

FlagDescription
--name TEXTWallet name (required).
--hotkey TEXTHotkey label; defaults to default.
--no-passwordSkip the encryption passphrase prompt (not recommended).
Command Reference

htcli subnet

Register custom validation parameters, list and inspect subnets, register models, and configure on-chain weights.

Subcommands

CommandDescription
subnet listList active subnets and their emissions.
subnet infoShow details for one subnet by netuid.
subnet registerRegister a new subnet or model.
subnet weightsSet or read on-chain validation weights.

List your subnets

bash
$ htcli subnet list --mine
  NETUID   NAME           STAKE       EMISSION
  8        coordination   1.284 kTAO  12.4%
  19       inference      0.642 kTAO   6.1%
  2 subnets active for hotkey master-key.
Command Reference

htcli node

Spawn, daemonize, monitor, and configure miner nodes or high-performance validation routers.

Subcommands

CommandDescription
node startLaunch a node process for a subnet.
node stopGracefully stop a running node.
node statusShow heartbeat, sync state, and compute scores.
node logsTail the node log stream.

Start a node

bash
$ htcli node start --subnet 8
  Launching node process (pid 48213)…
  [SYNC] Compute scores updated  ::  epoch 9241
  Node online. Operating on subnet 8.

Add --daemon to run the node detached, then watch it with htcli node status or htcli overwatch.

Command Reference

htcli stake

Add, remove, and delegate stake; inspect compound APY yields and delegator parameters.

Subcommands

CommandDescription
stake addStake to a hotkey on a subnet.
stake removeUnstake from a hotkey.
stake listShow your stake positions and yields.
stake delegateDelegate stake to another validator.

Add stake

bash
$ htcli stake add --subnet 8 --amount 100
  Submitting stake extrinsic…
  Staked 100 TAO to master-key on subnet 8.
Command Reference

htcli validator

Register validators and manage delegate reward settings.

bash
$ htcli validator register --subnet 8

Full reference for validator subcommands and options is on the way. For now, see the Quickstart.

Command Reference

htcli governance

Review network upgrade proposals, formulate improvement budgets, and cast consensus votes.

bash
$ htcli governance list

Full reference for governance subcommands and options is on the way.

Command Reference

htcli chain

Interact directly with the peer ledger — look up blocks, balances, transactions, and runtime data.

Subcommands

CommandDescription
chain blockRead a block by number or --latest.
chain balanceQuery the free balance of an address.
chain txLook up a transaction by hash.

Read the latest block

bash
$ htcli chain block --latest
  Block        1284812
  Hash         0x9f2c…a17e
  Chain head synced.
Command Reference

htcli overwatch

Monitor node health, sync state, and consensus performance in real time.

bash
$ htcli overwatch monitor --wallet master-key
  Uptime: 24h 12m  ::  Sync-State: Live
  [HEAL] Heartbeat broadcast to all subnets.

Full reference for overwatch subcommands and options is on the way.

Concepts

Hypertensor Overview

Hypertensor is a Substrate-based blockchain that coordinates decentralized AI through subnets, operators, staking, consensus, and governance.

Rather than a single monolithic model or a centralized API, Hypertensor organizes compute into subnets — independent networks each focused on a task such as coordination or inference. Operators run nodes that join subnets; stake secures participation and aligns incentives; an on-chain consensus mechanism scores work each epoch; and governance lets the network evolve.

htcli is the operator's interface to all of it. The pages in this section explain each concept; the Command Reference shows the commands that act on them.

Concepts

Subnets

A subnet is an independent network of compute and services registered on Hypertensor, identified by a numeric netuid.

Each subnet defines its own validation parameters and emission share. Operators register models and set on-chain weights to express which work is valuable. Manage subnets with htcli subnet.

Concepts

Nodes

A node is the process an operator runs to participate in a subnet — mining work or validating it.

Nodes broadcast a heartbeat, sync chain state, and accrue compute scores each epoch. Launch and monitor them with htcli node and htcli overwatch.

Concepts

Staking & Delegation

Stake is the economic security behind participation; delegation lets holders back validators they trust.

Operators stake to their own hotkeys to register and validate; holders can delegate stake to validators and share in rewards. Compound yields accrue per epoch. Manage positions with htcli stake.

Concepts

Consensus & Epochs

Work on Hypertensor is scored over fixed intervals called epochs, and rewards are distributed according to consensus.

At each epoch boundary the network reconciles validator weights and compute scores, then emits rewards proportional to measured contribution. Read live chain and epoch state with htcli chain.