Setup
The consensus command gives you the whole network from a terminal: tunnels, proxying, WebSockets, and leased IPs. Run it with no arguments for the full-screen TUI, or call a command directly.
1. Install
Section titled “1. Install”The CLI runs on Bun 1.3.0 or newer. Install Bun, then the package:
curl -fsSL https://bun.com/install | bashnpm install -g @canister-software/consensus-cliCheck that it works:
consensus help2. Set up credentials
Section titled “2. Set up credentials”During the public beta the network runs in free mode, so you can skip this step: every command works without credentials.
When payment is enabled, run setup once:
consensus setupIt offers two modes:
- Self-managed keys (recommended). Enter an EVM private key, a Solana keypair, and optionally the path to an ICP PEM file. Setup writes them as
CONSENSUS_EVM_KEY,CONSENSUS_SVM_KEY, andCONSENSUS_PEM_PATHto your shell profile, and payments are signed locally. Keys never leave your machine. Run thesourcecommand setup prints, or open a new shell, to load them. - Managed wallet. Creates a wallet from your Coinbase Developer Platform credentials, set as
CDP_API_KEY_ID,CDP_API_KEY_SECRET, andCDP_WALLET_SECRETin a.envfile. The keys are held by the proxy service.
Payments settle on test networks: Base Sepolia, Solana Devnet, and ICP’s TESTICP ledger. Setup prints your addresses with faucet links so you can fund them.
To start over, run consensus setup --force.
3. Try it
Section titled “3. Try it”Expose a local web server on a public HTTPS URL:
consensus tunnel http localhost:3000Send one request through the network:
consensus proxy fetch https://api.example.com/prices --verboseList nodes, then pin your traffic to one of them, and so to its IP address:
consensus ip list --region east-usconsensus ip lease <node-id-or-domain>Usage lists every command and option.
Where the CLI keeps its state
Section titled “Where the CLI keeps its state”The CLI stores its configuration, leased node, preferences, and session history in ~/.consensus/. Self-managed keys live in your shell profile, not in that directory.