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://rpc.htcli.io/
  ? Default output format  table
  Configuration initialized.

2. Create keys

bash
$ htcli wallet generate-coldkey --name master-key
$ htcli wallet generate-hotkey --coldkey master-key --hotkey master-hot
  Coldkey "master-key" and hotkey "master-hot" created.

3. Register a validator, then a node

Register a validator first; it returns a validator_id that your subnet nodes register under.

bash
$ htcli validator register --hotkey master-hot --delegate-rate 10 --coldkey master-key
  Validator registered :: validator_id 11

$ htcli node register --validator-id 11 --subnet-id 8 --hotkey node-hot --stake 100 --coldkey master-key
  [SUCCESS] Node registered on subnet 8 under validator 11.

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://rpc.htcli.io/
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 config

Initialize, view, and validate htcli configuration — the chain endpoint, output format, and wallet paths.

Subcommands

CommandDescription
config initRun the interactive wizard and write the config file.
config showPrint the resolved configuration.
config pathPrint the configuration file path.
config editOpen the configuration file in your editor.
config validateCheck the configuration for errors.
config setSet a configuration value (--key, --value).
config getRead a configuration value.

Initialize configuration

bash
$ htcli config init
  Configuration written to ~/.htcli/config.yaml

See Configuration for the file format and global flags.

Command Reference

htcli wallet

Generate, import, rotate, and inspect cryptographic coldkey and hotkey pairs locally, with encrypted storage in ~/.htcli/wallets/.

Subcommands

CommandDescription
wallet generateGenerate a new key pair.
wallet generate-coldkeyGenerate a new coldkey.
wallet generate-hotkeyGenerate a new hotkey owned by a coldkey.
wallet restore-coldkeyRestore a coldkey from a mnemonic.
wallet restore-hotkeyRestore a hotkey from a mnemonic.
wallet listList stored keys.
wallet deleteDelete a stored key.
wallet balanceShow a wallet's on-chain balance.
wallet transferTransfer balance between accounts.
wallet update-coldkeyUpdate a stored coldkey reference.
wallet update-hotkeyUpdate a stored hotkey reference.
wallet rotate-coldkeySecurely rotate a coldkey.
wallet rotate-hotkeySecurely rotate a hotkey.
wallet describeShow addresses and metadata for a wallet.
wallet check-hotkey-ownerShow which coldkey owns a hotkey.
wallet upgradeUpgrade the wallet key-storage format.
wallet identitySet on-chain wallet identity metadata.

Generate a coldkey

bash
$ htcli wallet generate-coldkey --name master-key
  Generating ECDSA keypair…
  Address  0xBbCdFE56402109104dcA757B0B644035Ac3Fd321
  Coldkey "master-key" created in ~/.htcli/wallets.

Options

FlagDescription
--name TEXTKey name (required).
--password / --no-passwordEncrypt the key with a passphrase (or skip it).
--copy-mnemonicCopy the recovery mnemonic to the clipboard.
Command Reference

htcli subnet

Register and activate subnets, and inspect subnet information and network-wide statistics.

Subcommands

CommandDescription
subnet listList subnets on the network (add --mine for yours).
subnet costShow the cost to register a subnet.
subnet registerRegister a new subnet.
subnet check-activationCheck a subnet's activation status.
subnet activateActivate a registered subnet.
subnet pausePause a subnet.
subnet unpauseResume a paused subnet.
subnet updateUpdate subnet parameters.
subnet transferTransfer subnet ownership.
subnet acceptAccept a subnet ownership transfer.
subnet removeRemove a subnet.
subnet set-emergency-validator-setSet the emergency validator set.
subnet clear-emergency-validator-setClear the emergency validator set.
subnet add-bootnode-accessGrant bootnode access.
subnet remove-bootnode-accessRevoke bootnode access.
subnet add-bootnodeAdd a bootnode.
subnet remove-bootnodeRemove a bootnode.
subnet infoShow subnet details.
subnet nodesList a subnet's nodes.
subnet bootnodesList a subnet's bootnodes.

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

Register, list, inspect, and monitor nodes across the subnets you operate.

Subcommands

CommandDescription
node registerRegister a node on a subnet (requires a validator id).
node listList nodes on a subnet.
node allList all nodes across subnets.
node statusShow heartbeat, sync state, and compute scores.
node infoShow details for a node.
node overwatch-commitsShow a node's overwatch commit records.
node overwatch-revealsShow a node's overwatch reveal records.
node removeRemove a node from a subnet.
node updateUpdate node parameters.

Register a node under a validator

Nodes register under a validator, so pass the validator_id returned by htcli validator register (see validator).

bash
$ htcli node register --validator-id 11 --subnet-id 8 --hotkey node-hot --stake 100 --coldkey master-key
  [SUCCESS] Node registered on subnet 8 under validator 11.

Then check it with htcli node status --subnet-id 8 --node-id <id>, watch it live with htcli overwatch, or filter listings with --mine.

Command Reference

htcli stake

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

Subcommands

CommandDescription
stake addAdd stake to a subnet node.
stake removeRemove stake from a node.
stake claimClaim unbonded stake.
stake listList your stake positions.
stake coldkeyShow a coldkey's stake summary.
stake delegate-addAdd delegated stake to a subnet.
stake delegate-removeRemove delegated subnet stake.
stake delegate-swapSwap delegated subnet stake.
stake delegate-transferTransfer delegated subnet stake.
stake delegate-donateDonate delegated subnet stake.
stake delegateShow subnet delegated-stake info.
stake list-delegateList delegated-stake positions.
stake node-delegate-addAdd delegated stake to a node.
stake node-delegate-removeRemove delegated node stake.
stake node-delegate-swapSwap delegated node stake.
stake node-delegate-transferTransfer delegated node stake.
stake node-delegate-donateDonate delegated node stake.
stake node-delegateShow node delegated-stake info.
stake swap-node-to-subnetMove stake from a node to a subnet.
stake swap-subnet-to-nodeMove stake from a subnet to a node.
stake swap-updateUpdate a pending stake swap.
stake verify-proofVerify a stake proof.
stake verifyVerify stake state.

Add stake

bash
$ htcli stake add --subnet-id 1 --node-id 1 --amount 100
  Submitting stake extrinsic…
  Staked 100 TENSOR on subnet 1, node 1.
Command Reference

htcli chain

Query the chain directly — network statistics, account info, balances, and blocks.

Subcommands

CommandDescription
chain infoShow network info and global statistics.
chain statsShow detailed chain stats.
chain costShow on-chain operation costs.
chain blockRead a block.
chain txLook up a transaction by hash.
chain accountLook up account information and balance.

Network info

bash
$ htcli chain info
  Block        1284812
  Validators   256   ::   spec_version 142
  Chain head synced.

Add --format json or --format csv to any query for scripting.

Command Reference

htcli consensus

Participate in consensus — submit proposals and attestations for the subnets you validate.

Subcommands

CommandDescription
consensus proposeSubmit a consensus proposal for a subnet.
consensus attestSubmit an attestation for the current epoch.

Submit a proposal

bash
$ htcli consensus propose --wallet master-key --subnet 1 --data 0x123
  Proposal submitted for subnet 1.
Command Reference

htcli governance

Set on-chain network parameters that govern how Hypertensor operates.

Subcommands

CommandDescription
governance set-paramSet an on-chain network parameter (--wallet, --param, --value).

Set a parameter

bash
$ htcli governance set-param --wallet master-key --param max_subnets --value 64
  Parameter update submitted.
Command Reference

htcli overwatch

Register and operate overwatch nodes that monitor network health and consensus.

Subcommands

CommandDescription
overwatch check-qualificationCheck whether a coldkey qualifies for overwatch.
overwatch registerRegister an overwatch node.
overwatch removeRemove an overwatch node.
overwatch listList overwatch nodes.
overwatch infoShow overwatch node details.
overwatch set-peer-idSet the overwatch node peer id.
overwatch add-stakeAdd stake to an overwatch node.
overwatch remove-stakeRemove stake from an overwatch node.

Register an overwatch node

bash
$ htcli overwatch register --coldkey master-key --hotkey master-hot --stake 1000
  Overwatch node registered.
Command Reference

htcli validator

Register validators and manage their delegation settings, keys, and on-chain identity.

Subcommands

CommandDescription
validator registerRegister a validator and set its delegation.
validator update-delegate-rateUpdate a validator's delegate rate.
validator update-delegate-accountSet or clear the delegate account and its rate.
validator update-hotkeyChange a validator's hotkey.
validator update-coldkeyChange a validator's coldkey.
validator update-identitySet a validator's on-chain identity metadata.

Register a validator

bash
$ htcli validator register --hotkey master-hot --delegate-rate 10 --coldkey master-key
  Validator registered :: validator_id 11

Register a validator first — the returned validator_id is what subnet nodes register under (htcli node register --validator-id <id> …, see node).

Key switches

CommandSwitches
register--hotkey, --delegate-rate, --delegate-account, --delegate-account-rate, --coldkey
update-delegate-rate--validator-id, --delegate-rate, --coldkey
update-delegate-account--validator-id, --delegate-account, --delegate-account-rate, --clear, --coldkey
update-hotkey--validator-id, --hotkey, --coldkey
update-coldkey--validator-id, --new-coldkey, --coldkey
update-identity--validator-id, --name, --url, --image, --discord, --x, --telegram, --github, --hugging-face, --description, --misc, --clear, --coldkey
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.