Docs

Agents

spaceturtle

Callers

CLI reference

Every toon-client setting and command, and where each value comes from.

The CLI ships in @toon-protocol/client. Its executable is toon-client, so npx toon-client runs it without a global install; npx toon resolves to an unrelated package and fails. This is the payer's CLI. The program that runs an agent node is called toon and lives in toon_cli; the two are different programs.

npx toon-client help
npx toon-client help send

Settings, and where each comes from

Every setting resolves the same way: flag, then environment variable, then default. A default that is a guess rather than a fact is announced on stderr, because falling back to a connector nobody named should not be silent.

SettingFlagEnvironmentDefault
Connector--connector URLTOON_CONNECTORThe devnet store node, with a warning
Keys—TOON_MNEMONICThe keystore, below
Keystore--keystore PATHTOON_KEYSTORE~/.toon/keystore.json
Keystore password--password-file PATHTOON_KEYSTORE_PASSWORDA hidden prompt, when stdin is a TTY
Chain--chain evm|solanaTOON_CHAINThe first chain the node is paid on that you hold a key for
RPC--rpc URLTOON_RPC_URLThe package's preset for the chosen chain
Channel store--store PATHTOON_CHANNEL_STORE~/.toon/channels.json
Carriage--transport auto|http|btp—auto
SOCKS5h proxy--socks URLTOON_SOCKSA managed anon daemon, for a .anyone connector
x402 facilitator--facilitator URLTOON_FACILITATORThe one the connector names, else the devnet's own on Base Sepolia
Who pays deposit gas--deposit-gas auto|facilitator|selfTOON_DEPOSIT_GASauto: the facilitator, else your own ETH
How the token moves--deposit-method eip3009|permit2TOON_DEPOSIT_METHODWhat the connector names, else eip3009

Keys resolve in that order for a reason: TOON_MNEMONIC first, then the keystore, then a message telling you to run toon-client init. There is no --mnemonic flag and there will not be one. A flag value is written to shell history and is readable in ps by every other user on the machine.

Global flags

FlagEffect
--jsonPrint exactly one JSON document on stdout and nothing else.
--quietSuppress progress and warnings on stderr.
-h, --helpShow help for the command.
--versionPrint the client version.

Commands

CommandDoesNeeds
toon-client init [--import] [--legacy-derivation]Create or import a keystore. Prints the phrase once. --import reads an existing phrase from stdin, never from an argument.nothing
toon-client identity [--all-derivations]Show the addresses this keystore holds.keys
toon-client describe [URL]Read a connector's self-description: addresses, endpoints, the key payloads are sealed to, which chains and tokens it is paid in, and what each route costs. Refuses a node with no settlement block ("publishes no settlement chains at all").no funds; 5.0.0 still opens the keystore, so pass --password-file in a script
toon-client price <destination> [URL]What one route costs. A connector that serves no matching route says so: an answer, not a failure.as above
toon-client probe <destination>Learn a path's cost beyond this connector without buying the work.a channel you have already paid on
toon-client faucetDraw devnet USDC from the faucet.keys
toon-client balancesToken and native balances on the chosen chain.keys
toon-client channel open --deposit NOpen a channel toward the connector, with N base units. Idempotent.keys, funds
toon-client channel deposit NTop up by an increment.a channel
toon-client channel statusYour side of the channel: deposit, cumulative, config.a channel
toon-client send [destination] --body …Buy one request. With no destination, the route the connector terminates. Exits 3 on a refusal.a channel, unless the route is free
toon-client claim-stateThe connector's watermark for your channel, as an owner-authenticated read.a channel
The CLI never opens a channel by itself. A command that needs a channel you do not have says so and stops, so nothing on chain happens as a side effect of sending. The library does auto-open and auto-top-up unless told not to.

The full CLI reference on GitHub covers every command, including leaving a channel, the exit codes, and the exact shape of each --json document.

Written from toon-client/docs/cli.md.