Candle CLI
The candle CLI is Candle from the terminal: it authorizes a device, provisions and revokes API keys, holds your keys in an encrypted vault on your own machine, gives agents dedicated TEE wallets to trade from, and trades, launches and provides liquidity through them. An agent machine never needs a browser session of its own; the one browser interaction is a device approval on whatever machine you are already signed in on.
The CLI is open source under the MIT license. Its full source is in the public candledottv/cli repo, including the macOS Touch ID helper and the security-key helper, and every release binary is built and signed in candledottv/cli (releases through 0.12.0 in candledottv/agentic); see Verify a candle release.
Reading the output
Section titled “Reading the output”Human screens group facts in aligned fields and put warnings in their own wrapped blocks.
Vault recovery and backup keep their safety instructions separate from keys, paths and fingerprints;
copyable values stay whole. Tables adapt to terminal width. Times are short UTC values.
Use --plain for ASCII output without styling, or --json for the unchanged machine response.
For example, candle spend --plain with no payments and no stored API key shows:
Per-use spend
Today (UTC) 2026-10-28 Spent $0 Daily per-use limit $5 Per call at most $1 Payments enabled Candle credit -
- Candle credit not shown: no API key on this profile
- No x402 payments in the last 7 days.Install
Section titled “Install”Install the Candle CLI (macOS 13 or later, or Linux):
curl -fsSL https://candle.tv/install.sh | bash
or with Homebrew:
brew install candledottv/tap/candle
Then: candle setupThe installer checks the download’s SHA-256 and its Sigstore signature before it writes anything,
and needs nothing beyond curl and sha256sum or shasum. It checks the signature with cosign or
a signed-in gh when one is installed, and otherwise with Candle’s own candle verify, offline, from
a CLI release whose SHA-256 the script carries (it downloads that candle and checks it against the
SHA-256 before running it). If no check can run, it installs nothing.
candle setup authorizes this device from your browser, shows the agent wallets as funding
destinations, prints the skill and MCP install lines, and runs a full health check; candle auth login on its own does just the authorization step. The CLI targets production
(https://api.alpha.candle.tv) by default; --api-url https://staging.api.candle.tv points a profile at
staging for testing.
The npm package @candledottv/cli stays published for CI, programmatic use, and Windows until
install.ps1 ships; npx -y @candledottv/cli@latest <command> runs it once without installing.
It is also the way in on macOS 12 or earlier: the release binaries need macOS 13, and install.sh
and Homebrew refuse an older Mac rather than install a binary not built for it.
With no npm and no install.sh, bunx fetches the repo and runs the bin at its root:
bunx github:candledottv/agentic candle auth loginFor repeated use, clone once and run the same bin locally:
git clone https://github.com/candledottv/agentic.gitcd agentic && bun installbun packages/cli/dist/index.js auth statusEvery release is signed; see Verify a Candle release to check a download by hand.
Reading terminal output
Section titled “Reading terminal output”Human output groups facts into aligned fields and puts advice and warnings in separate blocks.
For example, candle --plain profile add sandbox --api-url https://staging.api.candle.tv prints:
ok Created profile sandbox. API https://staging.api.candle.tv
- Run: candle auth login --profile sandboxWallet lists keep the full IDs and addresses you need for the next command. On narrow terminals,
linked wallets use one field per line so their signer state stays visible. Confirmation prompts
still require the full key prefix or fingerprint. For scripts, pass --json; these human layouts
do not change the JSON result or the stream used for warnings.
Device authorization
Section titled “Device authorization”auth login runs an OAuth-style device flow:
- The CLI requests a device code and opens your browser to an approval screen (with
--no-browserit prints the URL and code for you to open anywhere, including on a different machine). The code expires; the screen shows its lifetime. Under--json, this progress is one JSON object on stderr ({"stage":"device_code","apiUrl":…,"userCode":…,"verificationUri":…,"verificationUriComplete":…,"expiresIn":…}), so stdout stays exactly the login result. - The screen shows the client name and the exact scopes being requested before anything is granted. A login with no
--scopesflag requests Write (five scopes,swap:writeincluded, nevertransfer:writeortransfer:bound), and the screen says so.transfer:boundis refused on a device login; grant it afterwards withcandle keys access <prefix> --access withdraw. Write trades and launches and cannot move funds; pass--scopesto narrow the grant, or widen the key to Withdraw withcandle keys accesswhen an agent needs to transfer. The minted key’s embedded wallet is denied unless--embedded-wallet allowis confirmed at a terminal, the same default askeys create. If that cannot be confirmed, the key is revoked and the login fails with nothing stored. - On approval the CLI exchanges the code for a device token and immediately provisions an agent API key with the approved scopes.
The device token is the owner’s credential on this machine. It can create, list, and revoke API keys and change their access, stop and resume a key, approve and remove key signers, rebind TEE wallets between keys, set a wallet’s launch permission, and clear a linked wallet’s trusted mark (or preview that change). Marking a linked wallet trusted needs a signed-in session. It cannot list or revoke other devices, approve another device’s login, or loosen a key’s spending, loss or perps limits (those need a signed-in session), so a leaked token cannot quietly widen its own reach. Where the API has the browser confirm on (below), every step it can take that widens authority also needs the owner’s approval in a signed-in browser. Device tokens expire 90 days after they are issued, and blocking the account ends them at once; you can also revoke them from the Authorized devices panel in your Agent access dashboard, and every key a device minted is labeled with that device, so containing a compromise is one action, not an investigation. See device authorization on the access page for the server-side view.
Browser confirm for owner steps
Section titled “Browser confirm for owner steps”Where the API has OWNER_CONFIRM_ENABLED on, an owner step made with the device token that widens what the account’s keys can do also needs one approval in your browser, signed in as the account owner. The API answers 403 OWNER_CONFIRM_REQUIRED and changes nothing; the CLI then:
- Prints what you are approving (a summary the server built),
Open <url>andCode: XXXX-XXXXon stderr, with “Only approve if you just ran this command.” When the API names the account the request was made as (0.13.24+), the first line readsThis needs your approval in the browser as <display name> (<short wallet>): <summary>and a following line says the browser must be signed in as that account — so a wrong-account browser is obvious before it answers “Request not found”. It opens the browser only with--open. Under--jsonit writes one line to stderr instead,{"ok":false,"pending":true,"code":"OWNER_CONFIRM_REQUIRED","ownerConfirm":{"userCode","verificationUriComplete","expiresIn","step","summary","account":{"wallet","displayName"}}}, and keeps stdout for the final result. - Waits, polling every few seconds. The code expires 5 minutes after it was issued.
- When you approve at
/dev/agent/confirm, sends the identical request again and prints its result. Deny it and the command exits 1 withDenied in the browser; nothing changed.; let it expire and it exits 1 withThe confirmation expired; nothing changed. Run the command again. - With
--no-waitit prints the code and exits 7 without waiting. The command does not resume later: run it again without--no-wait, or make the change in the console.
One approval covers exactly one request, from this device, for this account. The steps that ask for it: keys create (every key, a read-only one included), keys rotate, keys access when it widens, keys update --embedded-wallet allow, auth login --embedded-wallet allow when it allows the new key the embedded wallet, keys signer approve (not --reject), tee rebind (not the preview), wallets allow-launch, vault promote --to-key (one approval per wallet), keys limit when it raises, clears or changes the window of a transaction limit, perps thresholds set and clear when they loosen, and perps reduce-only off. The Candle Harness shows the same summary, URL and code when its core mints a key. Narrowing steps never ask: revoking or stopping a key, narrowing access, rotate --finish, tightening a limit, reduce-only on. An older CLI prints the server’s message, which carries the URL and code, but cannot finish the step: update the CLI before this is on. A signed-in console session never sees the confirm.
If key provisioning fails (agent access is not approved on an embedded wallet yet, or the account is at its 12-active-key ceiling), login still succeeds and stores the device token, and the output says exactly why the key was not issued. Fix the cause, then run candle keys create --access write for the same Write key a login without --scopes mints.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
| `auth login [—api-url | allow] [—no-browser] [—profile |
auth status | Show which credentials are stored and where |
auth logout [--keep-key] | Clear local credentials; --keep-key skips revoking the stored API key on the server, and the key is still removed from this machine |
agent profile show|set [--bio <text>] [--strategy <tag>] [--strategy-note <text>] [--models <list>] [--links <JSON>] [--avatar <URL>] [--banner <URL>] [--avatar-file <path>] [--banner-file <path>] | Read or edit this agent’s public page with its own key. Editing requires an acting scope, permission on and no admin lock. Name, slug and visibility remain owner-only. --models is comma-separated; empty clears. --links replaces website/X as a JSON object, or null to clear. The server validates fields and shares a 20-edit UTC-day quota across keys. File flags upload and save public PNG/JPEG/GIF/WebP artwork (at most 10MB) on uploads.candle.tv without another PATCH; banners must be wider than 1.5:1 or return BANNER_WRONG_SHAPE. Each file flag is exclusive with its corresponding URL flag. Images and any text PATCH are separate edits and may succeed independently |
agent post create --text <text> [--chain <solana|hood> --mint <address>] · agent post delete <post-id> · agent post list [profile-id] [--limit <n>] [--cursor <cursor>] | Publish, delete and read the posts on an agent’s own public page. A post is 1 to 500 characters of free text with line breaks, shown as plain text, with an optional token chip; it is tied to no trade or launch. create and delete act as this key’s profile and need an acting scope, permission on and no admin lock; the profile’s keys and its owner share 30 posts per UTC day. list is public: with no profile id it reads this key’s own profile |
agent <profile-id|slug> --perps [--window all|24h|7d|30d] [--json] | A published agent’s Hyperliquid perps summary for a window (all by default, or 24h, 7d, 30d): P&L and its parts, volume, fees to volume, rounds, win rate, largest win and loss, highest and average leverage, liquidations and max drawdown, each with its formula. These are the agent page’s figures. An agent with no perps history prints no summary. Public: no key is read or sent; a slug is resolved first. --json prints the API’s body |
agent positions <profile-id|slug> [--kind spot|perp] [--json] | A published agent’s open positions, spot tokens with their amounts and Hyperliquid perps with leverage, margin, P&L, liquidation price and funding (earned or paid), largest value first. Positions under $1 are counted, not listed. Public: no key is read or sent; a slug is resolved first |
agent record <profile-id> [--cursor <cursor>] [--json] | A published agent’s public measured record, newest first: spot swaps and certified closed Hyperliquid rounds (dex:COIN names kept) with entry and exit, largest size, recorded leverage (unknown when not recorded), fees, funding (positive earned), net P&L and ROE. --cursor pages older rows; --json preserves every field. Public: no key is read or sent. Private and hidden agents answer RECORD_NOT_FOUND. Added in CLI 0.13.35 |
agent round <profile-id|slug> <round-id|open:COIN> [--json] | One perp round of a published agent, open or closed: label, outcome, entry and exit, P&L and return on margin, Hyperliquid and Candle builder fees apart, every fill with its hash, funding, and for an open round the agent’s open orders on that coin. agent positions --orders adds the agent’s open limit and take-profit / stop orders to --json. No key |
perps market <coin> --agents [--json] | In @candledottv/cli 0.13.33 and later (BE-3777). The public market read, no key: Hyperliquid’s figures for one perp market (dex:COIN for a builder dex) and the published Candle agents long and short in it, with their open positions and recent closed rounds. No wallet address |
keys list [--scopes] [--all] | List the account’s live API keys (--all includes revoked): each key’s name, its Read, Write or Withdraw access, and whether it may use the embedded wallet (Wallet); --scopes adds the raw scopes |
keys create [--access read|write|withdraw|trade-perps | --scopes <a,b,c>] [--label <name>] [--expires-in <days>] [--tx-limit <usd> [--reset daily|weekly|monthly|never]] [--embedded-wallet deny|allow] [--no-store] | Create an API key over the device token; --access mints one of the three levels (withdraw can move funds out of the wallet it runs, to wallets you linked while signed in or marked trusted and to that wallet’s vault), --scopes names raw scopes, never both; --scopes telegram:notify (@candledottv/cli 0.13.29 and later) is accepted and changes nothing: every key holds telegram:notify (the owner’s own Telegram notifications) whatever it was minted with; to receive none, do not link or message Quant on Telegram. The older spellings read-write and read-write-transfer remain permanent aliases for write and withdraw. --access trade-perps (account:read plus perps:write) is in @candledottv/cli 0.11.33 and later. With neither, the key gets the API’s default set (launch:write, launch:read, account:read, activity:write), which cannot trade; pass --access write for a trading key. --embedded-wallet defaults to deny, so the key cannot spend the account’s embedded wallet; allow asks for a confirmation at a terminal. See the embedded-wallet permission. --expires-in sets the key’s lifetime in days; --tx-limit sets an optional USD volume cap, with --reset choosing its window |
keys access <prefix|label|self> --access read|write|withdraw [--yes] | Change an existing key’s level in place: same key, secret, wallets and caps. A preview on stderr, then a confirmation. Widening takes the device token and the key’s prefix typed back at a terminal; narrowing takes y, or --yes. self uses the profile’s own API key and can only narrow it |
keys access <prefix|label> --history | One key’s access changes, newest first: when, from, to, and the device or key that made each |
keys update <prefix|label> --embedded-wallet allow|deny [--yes] | Allow or deny a key the account’s embedded wallet, over the device token. A preview on stderr, then a confirmation. Allowing takes the key’s prefix typed back at a terminal; denying takes y, or --yes |
keys limit <prefix|label> (--tx-limit <usd> [--reset daily|weekly|monthly|never] | --clear) | Set or clear the USD transaction cap on an existing key, over the device token. --reset defaults to daily. --tx-limit and --clear are mutually exclusive |
keys limits <prefix> <asset>=<raw> [<asset>=<raw> ...] | Set a key’s per-asset caps (sol, usdc, cndl, eth, usdg), each a whole number of base units per transaction (SOL 9 decimals, USDC, CNDL and USDG 6, ETH 18), with the profile’s own API key. The list replaces the key’s caps, and it can only tighten: lowering a cap or adding the first one works, raising or removing one is refused with LOOSEN_REQUIRES_SESSION and is done in the web key manager. A device token cannot set these caps. keys limit is the separate USD transaction cap |
keys self embedded-wallet deny | The profile’s own API key gives up the embedded wallet, with no prompt, so a bot box can run it. A key can never allow itself; the owner does that with keys update or in the web key manager |
keys stop <prefix> | Pause one key using the device token. Its requests are refused with PROFILE_PAUSED until the owner resumes it in the signed-in console; the key and its local credential are kept. Repeating the command succeeds. |
keys resume <prefix> | A device token cannot resume a stopped key: the server answers LOOSEN_REQUIRES_SESSION and the key stays stopped. The owner resumes it in the signed-in console. An API key cannot stop or resume itself; a revoked key cannot be resumed. |
keys rotate <prefix|label> ([--grace <duration> | --now] [--force] [--yes] [--idempotency-key <key>] | --finish) | Give a key a new secret, keeping its prefix, label, access, limits, wallets and history. The old secret works through --grace (0, 90s, 30m, 24h; default 1h, at most 24h), or stops at once with --now; --finish ends an open window early. Confirmed by typing the prefix at a terminal, or --yes. The profile’s own key is replaced in the keychain; CANDLE_API_KEY and other copies must be updated by hand before the window ends, and doctor warns while a rotated secret is in use. A dropped connection is retried once with the same Idempotency-Key; if there is still no answer, rerun with the printed --idempotency-key to get the first secret back. See Rotating a key |
keys revoke <prefix> | Revoke one API key by prefix. A prefix can start with -; the key commands accept it as typed, and -- (keys revoke -- -QVeHyie) ends the options on any command |
keys wallets <prefix> | The wallets an agent profile can use. TEE wallets move between keys with tee rebind |
keys wallets set <prefix> --wallets <id,id> | Replace the profile’s wallet set. From a key it can only narrow the set. Granting a linked wallet to another key needs a signed-in agent console; a device token cannot do it. TEE wallets move with tee rebind |
keys wallets scope <prefix> --scope all|selected | selected limits the profile to its assigned wallets; all lifts that |
keys signer approve <code> --key <prefix|label> [--reject] | Approve (or reject) a key’s signer request as the account owner, over the device token. Shows the key, the full fingerprint and what happens to the key’s wallets, then asks for the full fingerprint the trading machine printed (hidden, all three groups; one group is refused) |
keys signer move <prefix|label> [--to-key <prefix|label>] | On the machine holding a wallet’s current signer: move every wallet on the key onto its active key signer, per-wallet (legacy) wallets included, signing each owner change here. The key’s API key or the device token. Resumable; deletes an old signer from this machine only after the server shows no wallet left on it, never the active one. --to-key moves a revoked key’s wallets to a live key (device token) |
wallet [--all] | Show the account’s launch and linked wallets (wallets is an alias). Disabled (revoked) linked wallets, such as demoted TEE wallets, are hidden unless --all |
wallet import --chain <solana|evm> [--address] [--label] [--key-file] [--signer-out] | Import a wallet you own; see below. A fresh key without solana-keygen: vault new-key --chain solana, vault export-key <label> --to <file>, import, then delete the file |
wallet authorize [--no-browser] [--no-wait] [--timeout <seconds>] | Give agents access to the account’s embedded wallets. Neither the CLI nor the API can grant it, because each wallet’s owner is you: this opens the Agents page’s grant step (/agents?authorize=1) in your browser, where you sign in, press Authorize and approve in Privy. No API key is created. With an API key on the profile it then waits (10 minutes by default) until every embedded wallet is delegated and prints them; without one, as on a new account, it opens the page and tells you to run candle auth login next. An account already delegated is told so and no page opens. --no-wait stops after opening; exit 1 if the wait runs out |
wallet revoke <wallet-id> | Stop a linked wallet’s agent; exit 0 only when the remote denial is verified, 3 while it is pending |
wallet allowlist [--all] | Print the account’s withdrawal allowlist (GET /api/v1/agent/withdrawal-addresses, any key): each approved address’s id, chain, address and label — the same rows candle transfer --to <allowlist label> resolves by. --all adds removed rows. Approving an address is the owner’s, in the agent console’s Wallets tab over a signed-in session; an API key cannot approve. An acting key can revoke an address; a read-only key cannot |
wallet trust <label|address|id|prefix*>... | Mark linked wallets as yours, as the account owner only: it takes the device token, never an API key. A trusted wallet counts as your own, like one you linked while signed in: a move into it from the embedded wallet is uncapped, and candle transfer from a TEE wallet may send to it (capped by the bound key). The server resolves the selectors in a preview; a screen, then type confirm |
wallet untrust <label|address|id|prefix*>... [--yes] | Clear the mark: moving funds into the wallet needs the withdrawal allowlist again. Same preview and confirm; --yes skips the prompt |
wallet allow-launch <label|address|id|prefix*>... | Deprecated. Where the server has TEE_LAUNCH_BY_SCOPE_ENABLED on, the bound key’s launch:write decides whether a TEE wallet can launch, allowLaunch is not enforced, and this command only saves the value (it prints one stderr line saying so and exits 0). A server with the switch off still asks for allowLaunch before candle launch from a TEE wallet, and this command turns it on, as the account owner only: it takes the device token, never an API key. The server resolves the selectors in a preview; a screen shows each wallet’s label, address and bound key, then type confirm. A wallet that is not a TEE wallet is named and left alone |
wallet disallow-launch <label|address|id|prefix*>... [--yes] | Deprecated. Where the server has TEE_LAUNCH_BY_SCOPE_ENABLED on it saves allowLaunch off but cannot stop a launch: it prints the server’s ALLOW_LAUNCH_NOT_ENFORCED message and exits 1. To stop a key launching, pause it (candle keys stop <prefix>), move it to Read (candle keys access <prefix> --access read) or rebind the wallet to a key without launch:write. With the switch off it stops TEE wallets paying for a launch; trading is unchanged. Same preview and confirm; --yes skips the prompt |
wallet close-empty [--wallet embedded|<tee address|label>] [--keep <mint>]... [--client-trade-id <id>] [--preview] [--yes] | Close a wallet’s empty token accounts and return their rent to it, after a preview. The embedded wallet by default (swap:write or transfer:write). --wallet naming a Solana TEE wallet bound to this key closes its accounts instead (swap:write): Candle builds the close transactions, this machine refuses any that is not CloseAccount alone with the wallet as fee payer, rent destination and owner over the previewed accounts, the key signer approves each through the relay, and Candle sends the whole batch. A close the chain has not settled yet prints recovering and exits 3; re-run with the same --client-trade-id to read it, which sends nothing. Off on a deployment until AGENT_TEE_CLOSE_EMPTY_ENABLED is on. A disabled or quarantined TEE wallet still closes with tee sweep. --keep spares a mint’s account; --yes skips the prompt. --preview prints what would close and closes nothing: under --json the whole preview is one JSON document on stdout (status: "preview"), with no prompt and no job read for a named --client-trade-id. Run headless without --yes, the CONFIRMATION_REQUIRED refusal (exit 1) carries that same preview under details, so a script sees what would close. See Closing empty token accounts |
vault init [--own-passphrase] | Create vault.enc: one passphrase factor and a 24-word recovery root. Creates no key. Progress distinguishes deriving the vault key from verifying the written vault. Security-key enrollment is a separate optional command: candle vault enroll security-key. The generated passphrase is shown once and is not typed back: save it where you keep passwords, because this CLI keeps no copy. --own-passphrase chooses your own (16+ characters), and the prompt offers that choice too. On a Mac with iCloud Drive it offers to back the new vault up. The Apple-account advice and the --to icloud shorthand appear on macOS only; on Linux and Windows the output names a path backup (vault backup --to <path>) instead |
vault status [--unlock] | What the vault holds and what opens it; --unlock adds the keys, counters and exposure flags, and reports any label more than one key shares; one line per key with optional balances is vault list |
vault list [<filter>] [--all] [--balances] [--rpc-url <url>] [--evm-rpc-url <url>] | One line per key: address, label, role, TEE lifecycle and derivation. The index is encrypted, so it prompts for the passphrase. An optional <filter> keeps the keys whose label or address contains it, case-insensitively. Retired TEE wallets (demoted and swept) are hidden and counted unless --all; --json reports the count as hiddenRetired, and hidden wallets are never sent for balances. Offline unless you ask for balances: --balances adds a SOL column and a total over the matched Solana keys, read from --rpc-url, else CANDLE_SOLANA_RPC_URL, else your profile’s RPC, else the public endpoint (which rate-limits, and sees every matched address), in one request per 100 matched keys. EVM keys are read over their own endpoint (--evm-rpc-url, else CANDLE_EVM_RPC_URL, else the built-in Hood RPC): ETH per key, and USDG when the chain id is 4663; that host is printed on stderr before the read, and the Solana endpoint is never sent an EVM address. Every matched address goes to its one endpoint together, which links them. SPL token balances are never read |
vault new-key --chain solana|evm [--label <name>] [--count <n>] [--labels-from <file>] | Derive the next Solana key (m/44'/501'/n'/0') or EVM key (m/44'/60'/n'/0/0, BIP-32 secp256k1, one address on every EVM chain) inside the vault. --count or --labels-from (one label per line) derives a batch of up to 256 under one unlock. The name must be free, and a batch refuses before it derives anything. Refuses in a vault built by restore |
vault rename <label|address|id> <new-label> [--id <entry-id>] | Rename one vault or external key. New labels are at most 64 characters, without edge whitespace, control characters or a leading -; names are never trimmed. Existing longer labels still work as targets. The address, the derivation path, the key blob and every envelope are unchanged; only the index is rewritten. Names a key by label, or by address, entry id or --id when more than one key shares a label. A TEE wallet is refused: its label also lives on the linked wallet Candle holds, and tee rename changes both. A retired TEE wallet (demoted and swept) is the exception: Candle disabled its linked wallet, so only the vault entry is renamed |
vault rename --pairs-from <file> [--dry-run] | Rename 1–256 vault or external keys (or retired TEE wallets) with one unlock and one commit. One <label|address|id> <new-label> per line, or CSV columns from,to picked by name; blank lines and # comments are skipped. Use CSV for names containing spaces. All findings are reported before any write; duplicate targets/new names and collisions outside the batch refuse the whole file. Swaps work. --dry-run prints the checked plan and writes nothing; --json returns { ok, renamed: [{ id, address, role, from, to }] } (plus dryRun: true for a dry run). A terminal is required |
vault phrase show | Show the 24-word recovery phrase, after a fresh passphrase or security key (PIN and touch). Terminal only, both ends; never in --json, a log or a pipe |
vault restore --phrase [--own-passphrase] [--count <n>] [--tee-count <k>] [--external-count <e>] [--evm-count <m>] [--evm-tee-count <k>] [--rpc-url <url>] | Rebuild a vault from the recovery phrase. Derived keys only, on all three Solana branches and, with --evm-count <m>, EVM indices 0 to m-1, and with --evm-tee-count <k>, Hood TEE wallets 0 to k-1 on m/44'/60'/n'/1'/0' (both default 0; the EVM branches are never gap-scanned, and --rpc-url stays the Solana endpoint). The sealed EVM record does not come back, so a later Hood sweep needs --from-block or --token; a gap scan needs --rpc-url on the command; no default or stored endpoint is used for it; see below. The restored vault gets a NEW passphrase: the one that opened the vault the words came from does not carry over. It is generated and typed back by default; --own-passphrase chooses your own |
vault reconcile-exposure | Re-read this account’s linked wallets and flag any that match. Adds exposure, never clears it |
vault factor list | The factors that can open this vault, with their domains and whether this machine can drive them |
vault factor add passphrase [--own-passphrase] [--label <name>] | Add a second passphrase factor; the vault is re-opened with it before this reports |
vault factor add security-key [--label <name>] [--device <id>] [--install-helper] | Enroll a FIDO2 security key (CTAP2 hmac-secret, user-verified): the key registers a credential, one assertion derives the vault’s key, and the vault is re-opened with the key before this reports. Three touches. Opens the vault with the passphrase or another security key; with two keys attached, --device names the one to add, or the CLI asks for it after the vault opens; a key already enrolled on this vault is refused (VAULT_KEY_ALREADY_ENROLLED). --install-helper first downloads and verifies this release’s candle-fido2 (the same checks candle update makes) when a release binary has none beside it, then enrols |
vault factor add touch-id [--label <name>] | Available in 0.13.23 with the signed macOS helper on an Apple silicon or T2 Mac. Enroll this Mac’s Secure Enclave behind Touch ID: the signed helper creates a P-256 key the Enclave holds, the vault’s key is wrapped to it, and the vault is re-opened with Touch ID before this reports. Opens the vault with the passphrase or a security key. This Mac only; never a recovery factor |
vault factor add passkey [--label <name>] | Unavailable in 0.13.23: the shipped helper has no associated-domain entitlement. Enroll a synced passkey (iCloud Keychain) through the same signed helper on macOS 15 or later: the platform registers a credential under cli.candle.tv with the PRF extension, one assertion derives the vault’s key, and the vault is re-opened with the passkey before this reports. Three passkey sheets. Opens the vault with the passphrase or a security key. Recoverable through the Apple account, and never counted as independent of anything else in it |
vault factor remove <id> | Remove a factor from this file. Not revocation; see below |
vault enroll <kind> [--label <name>] [--install-helper] | The same command as vault factor add <kind>, spelled shorter: passphrase, security-key, touch-id, passkey. Same flags, same refusals, same --json |
vault backup --to <path>|icloud [--accept-shared-domain] | Copy the vault and verify the copy in full, all eight checks (nine for a vault with Hood TEE wallets, which also writes its sealed EVM record beside the copy as <copy minus .enc>.evm-record.sealed). --to icloud is a shorthand for a timestamped file in ~/Library/Mobile Documents/com~apple~CloudDocs/Candle/. The copy is sealed unless it goes to a recognised local disk or removable drive: it carries the passphrase and any security key, never a synced passkey or Touch ID, so iCloud Drive, another cloud folder, and any path the CLI cannot place are all sealed; --accept-shared-domain writes the full copy |
vault verify-backup <path> | Verify an existing copy in full: the root, every key, and the address set against this vault, plus, for a vault with Hood TEE wallets, every line of the sealed EVM record beside the copy. Opens the copy with the passphrase or a security key it carries |
vault promote --in-place <label> --sweep-to <label> [--rpc-url <url>] [--to-key <prefix|label>] | Promote one vault key in place. Reads its holdings and, over your RPC, whether it is a token mint, freeze, program upgrade or stake authority (multisig membership is not checked); prints one sentence, the account, API key and API that will control it, read live; then the address in groups of four and confirm to promote it, and the word confirm again to accept. --to-key names the key the wallet ends up on, whose secret never touches the machine. With no key signer on it, the import runs under the calling key, then a rebind (device token) moves the wallet to the named key; a wallet whose rebind fails is named as still on the calling key with the tee rebind command that finishes. With a key signer, the CLI checks that signer against its pin before the unlock (the first time, you type its full fingerprint), then imports onto it and binds the wallet to the named key in one call; no signer is stored here and the wallet trades from the machine holding the key signer |
vault promote --from <label> [--label <name>] [--to-key <prefix|label>] | Promote a fresh key: derive the next key on the vault’s TEE branch (m/44'/501'/n'/1', a path wallet apps do not scan; for an EVM key, a Hood TEE wallet on m/44'/60'/n'/1'/0') and promote that, pinned to the cold vault key --from names as its sweep destination. --label names the new TEE wallet (default tee-<n>). The confirmation shows the pinned vault address and asks Type confirm to promote a new TEE wallet with pinned vault <address>: on both Solana and Hood. Promotion moves no funds. The new wallet starts empty; fund it with vault fund, which signs from that pinned key and takes no --from. Refuses in a vault built by restore. --to-key works as it does for --in-place. An EVM key, --from or --in-place, becomes a Hood TEE wallet: --sweep-to is then a cold EVM vault key, --rpc-url is the Hood RPC, and the vault moves to version 4 |
vault promote-batch --pairs-from <file> [--rpc-url <url>] [--to-key <prefix|label>] [--token-holdings] | Promote many vault keys in place under one unlock. Every row is checked against the whole set first, one acknowledgement covers the set (the word confirm), and each key is committed on its own. --to-key names the key the wallets end up on: the import runs under the calling key, then a rebind (device token) moves every promoted wallet to the named key in requests of at most 200; the target is checked before the unlock, a wallet whose rebind fails is named as still on the calling key, and re-running the same file rebinds the rows that landed. When the named key has a key signer, each import goes onto that signer and is bound to the named key in the same call, after the same pin check as vault promote. --token-holdings reads each key’s Solana token accounts into the table (refused on a Hood batch). A file of EVM keys promotes them to Hood TEE wallets; one file is one chain |
vault transfer <to> --amount <n|max> --asset SOL|<mint>|ETH|USDG|<0x token> --from <label> [--rpc-url <url>] | Sign a transfer locally from a vault key or a promoted TEE wallet. From a Solana key: SOL, or any SPL or Token-2022 mint. SOL max sends the balance minus the exact quoted fee and empties the plain system wallet (zero source rent reserve); nonce and program accounts are refused. The balance and fee are refreshed after confirmation, and a changed amount or fee must be confirmed again (at most three confirmations); an unavailable or unstable quote or insufficient balance refuses before signing. Token max sends the full source associated token account balance, with SOL still needed for fees and destination account rent; mint fees may reduce what arrives. Solana reads and sends over --rpc-url, else CANDLE_SOLANA_RPC_URL, else your profile’s RPC, else the public endpoint. From an EVM vault key: ETH (the chain’s native asset) or an ERC-20 (USDG on Hood, else its contract address), on Hood by default through the built-in RPC, or on any EVM chain by --rpc-url (else CANDLE_EVM_RPC_URL); the chain id is always read from the RPC, never from a flag, and max sends the balance minus the fee cap. One verification: the unlock, whose prompt names the amount, asset and destination. Then the transfer is decoded and displayed with the fee quote, the destination is printed in full in groups of four (for an ERC-20, the recipient decoded from the calldata, not the contract), and you type confirm; anything else signs nothing. There is no --yes. An EVM exit 0 means depth-confirmed (1 block on Hood, 2 elsewhere), not finalized; exit 3 with the hash means the transaction may still land, so do not resend blindly. From a promoted wallet it refuses while a sweep is pending, warns before the confirmation when the wallet is enabled (an agent may be trading it), and reports the finalized transfer to Candle’s history when the API key has activity:write. From 0.13.27 a Solana vault transfer or vault fund that would leave the paying wallet with more than zero but less than the rent floor of a plain account (650,240 lamports at present) is refused before signing as TRANSFER_INSUFFICIENT_FUNDS. For a SOL send, the refusal names the largest amount that leaves the floor after the fee, if that amount is greater than zero; otherwise, or for a token send, it asks you to fund the key with SOL first. Emptying the wallet (--amount max, available only on vault transfer) and leaving exactly the floor both pass. If the RPC refuses a signed send at preflight (a failed simulation, or a node behind the required slot), the command exits 1 with TRANSFER_REJECTED: nothing was broadcast and no fee was charged. Any other send failure keeps the uncertain outcome (exit 3), so do not resend blindly. |
vault fund <tee-address|external> --amount <n> [--asset SOL|USDC|ETH|USDG] [--rpc-url <url>] [--from <label>] | Sign a funding transfer from a vault key locally: to a TEE wallet from its pinned vault key, or to an external wallet (--from names the source when the vault has several keys). A Hood TEE wallet takes ETH or USDG from its pinned EVM vault key. One unlock that names the send, then decoded, displayed with the destination grouped in fours, and confirmed by typing confirm; there is no --yes |
vault demote <tee-address>... | --all --empty [--rpc-url <url>] [--emergency] [--sweep-to <label>] [--yes] [--token <0x...>] [--from-block <n>] | Stop a promoted wallet’s agent, then sweep everything it holds back to its pinned vault key, signed locally. It tries the stop request first. --emergency sweeps even when that request fails, for when the API or the key is unavailable or compromised; see tee sweep. A Hood wallet takes tee sweep’s --token and --from-block (one wallet only). Several addresses, or --all --empty (every Solana TEE wallet in the vault with nothing left to sweep: 0 SOL, no token accounts, no unsettled sweep; the rest are listed as skipped), demote one at a time under one unlock: every wallet and its sweep destination is listed, then you type confirm once (--yes skips it and stands in for each sweep’s confirm). A failure does not stop the rest; each wallet gets a result line and a summary counts done, incomplete, failed and skipped, with reasons. --json writes one document: wallets[] and summary. Since 0.13.10 |
vault export-key <label> --to <new-file> | Export one key as plaintext to a new file, through an interactive ceremony. The vault records the export, and the key is treated as exposed from then on |
vault import-legacy --tee [--from <path>] | Copy TEE wallets created with the older tee new flow from tee-wallets.enc into the vault as imported keys (the recovery phrase does not restore them); retire-legacy then renames the old store |
vault retire-legacy [--from <path>] | Rename the old tee-wallets.enc store once a verified backup of the vault exists |
external new [--label <name>] | Derive an external wallet on the vault’s third branch (m/44'/501'/n'/2') for outside tools: never delegated, never registered with Candle. Refuses in a vault built by restore; see below |
external list | The external wallets in the vault |
external sweep <external> --to <vault> [--rpc-url <url>] | Send everything an external wallet holds (SOL, SPL, Token-2022) back to a named vault key, signed locally with the external key; one unlock that names the send, then the vault key’s address grouped in fours and a typed confirm |
sign [--file <path>] --wallet <external>... [--rpc-url <url>] [--broadcast] [--yes] | Decode, simulate, display and sign a base64 transaction any tool built, with an external wallet only; --rpc-url is the RPC for the lookup tables, the simulation and --broadcast; see below |
sign message --wallet <external> [--file <path>] [--yes] | Sign an off-chain message: the exact bytes of the file or of stdin |
secrets set <name> | Store one of your own third-party API keys in the OS keychain, under a namespace separate from Candle’s credentials; the value is typed on a hidden prompt and never shown again |
secrets list | The names of the secrets stored for this profile |
secrets remove <name> | Delete a stored secret |
plugins | List the candle-<name> executables on your PATH, each of which runs as candle <name>; see below |
tee check <address|id|label>... [--label-prefix <p>] [--chain solana|hood] [--sign] [--max <n>] [--rpc-url <url>] | Check, without spending, that each named TEE wallet can really trade: payable membership, wallet record parity against the swap’s own listing, whether the wallet is active on its chain, and this machine’s signer. Each wallet is checked on its own chain, so a healthy Hood wallet passes beside a Solana one; --chain solana|hood checks every wallet against one chain instead, and a wallet on the other chain fails active with CHAIN_MISMATCH (any other value is USAGE, exit 2, before any read). --label-prefix selects wallets by label, --json prints one object per run with each wallet’s checks and a summary, and the exit code is 1 when any check fails. --sign also builds a tiny SOL/USDC quote on each Solana wallet, checks its spend, requests a relay signature, verifies it locally and simulates; it never broadcasts, is capped at --max wallets (default 10) and needs swap:write. On a Hood wallet sign is skipped (because: "hood") and nothing is built, because a Hood build holds the wallet; tee check never takes a Hood wallet lock |
tee new [--label <name>] | Add a Solana key to an existing tee-wallets.enc. With no store, refuses and points at vault new-key --chain solana then vault promote --from <label> --to-key <prefix>. --factor does not apply |
tee enable <address> --vault <address>|--vault-key <label> | Delegate the TEE wallet key to this profile’s agent with the sweep vault pinned; --vault-key names the vault key by label instead of address |
tee fund <address> --amount <n> [--asset SOL|USDC] | Print the funding instruction for your vault to sign; signs nothing |
tee status <address> [--rpc-url <url>] | The server’s lifecycle state and on-chain balances; for a Hood TEE wallet, ETH, USDG, the gas reserve and a low Gas field |
tee disable <address> | Stop the agent; typed state, exit 3 while remote enforcement is unconfirmed |
tee sweep <address> [--rpc-url <url>] [--emergency] [--token <0x...>]... [--from-block <n>] | Sign locally and move everything to the pinned vault, then re-check the balances; an open DAMM v2 LP position is closed first through a server-built close the CLI verifies before signing, and --emergency moves the position NFT instead. --emergency lets the sweep run when the API cannot be read (down, or the key revoked); if the API answers, a wallet still enabled is refused, so run tee disable first. On a Hood wallet, --token (repeatable) adds ERC-20s to sweep and --from-block sets where the Transfer-log scan starts; see below |
tee rebind <wallet...> --to-key <prefix|label> [--label-prefix <p>] | Move promoted TEE wallets to another API key on this account; this is how a key gets TEE wallets (keys wallets set from a key can only narrow its set). Name the wallets, or pass --label-prefix <p> for every TEE wallet whose label starts with <p>. As the account owner only: it takes the device token, never an API key, and never opens the vault. Preview, a screen, then type confirm; the funds do not move. Onto a key with no key signer each wallet keeps its signer, and the screen names the machine that holds it. Onto a key with a key signer, the owner moves to that signer with the binding, signed on this machine by the wallet’s current signer; the rebind refuses before confirm when this machine does not hold it. Not incident response: after a key leak the path is still stop, sweep, new wallet |
tee signer new --key <prefix|label> [--out <pem>] [--force] [--no-wait] | On the trading machine, with that key’s API key: generate the key’s signer here, request it, and wait for the owner’s approval. The key’s wallets on that signer then trade from this machine. Run it again to resume a pending signer: a retry re-attaches to the same live request. Refused while an earlier signer here still owns wallets, unless --force (it adds a signer; it moves, revokes and deletes nothing). --out also writes a plaintext PEM (mode 0600): the signer’s P-256 authorization key for Privy wallet RPC, for an SDK process. It cannot sign Solana transactions (the TEE signs them); the secret store keeps its copy. --no-wait exits 0 once the request is pending. With --json the command emits newline-delimited JSON: a pending event with userCode, verificationUriComplete, expiresAt and fingerprint at once, then the active result or an error if it waits. Warns when this machine also holds a device token. --no-wait and the event stream since 0.13.10 |
tee signer status --key <prefix|label> | Read the key’s signer state on the server once, without generating a key pair or requesting approval. --json prints one value; on the machine that made the request it includes the cached code and URL while that request is live. Since 0.13.10 |
tee signer remove --key <prefix|label> | Remove this machine’s key signer once it owns no wallets, and tell the server it is gone. Refuses while any wallet is still owned by it. Takes the device token or the key’s own API key |
tee rebinds [wallet] | List this account’s TEE wallet rebinds: time, wallet, from, to, actor and the device prefix that did it. A device token cannot revoke devices; revoke one you do not recognise from the portal |
tee rename <label|address|id> <new-label> | Rename one TEE wallet: the label Candle holds and, when the wallet’s key is in this vault, the vault entry. New labels are at most 64 characters, without edge whitespace, control characters or a leading -; names are never trimmed. As the account owner only: it takes the device token, never an API key. The server resolves the wallet by id, address or exact label. The funds, the address, the key and the bound API key do not change |
tee rename --pairs-from <file> [--dry-run] | Rename 1–256 TEE wallets with one server call, all or nothing, then one vault commit. One <label|address|id> <new-label> per line, or CSV columns from,to picked by name; blank lines and # comments are skipped. All findings are reported before any write. The vault is unlocked once, only when a named TEE wallet may be in it, and a new name that a vault key outside the rename already has refuses before the server is called. --dry-run prints the checked plan and changes nothing; --json returns { ok, renamed: [{ id, chain, address, from, to, server, vault }] } (plus dryRun: true for a dry run). If the vault write fails after the server accepted, the command prints address-keyed rows to re-run (rerun under --json): a re-run leaves the server label alone and finishes the vault |
swap <from> <to> --amount <n>|--percent <n> --wallet <tee> [--to <tee>] [--slippage-bps <n>] [--client-trade-id <id>] [--rpc-url <url>] [--yes] [--wait] [--hide] [--dry-run] | Quote, confirm and swap on one chain through the TEE wallet’s bound key, or bridge SOL or USDC and ETH or USDG into the same key’s TEE wallet on the other chain (below). Every plan can buy and sell a token that was not launched on Candle. --client-trade-id makes a retry safe, --yes skips the confirmation. On a Hood TEE swap the quote is a read-only preview and the operation is built only after you confirm, so a run that stops at the quote holds nothing (below); a bridge still builds before it asks (below). --wait follows a bridge, or a Hood TEE swap’s trade and fee legs, for up to ten minutes. --dry-run checks the TEE payer and the quote, then stops: it never signs, sends, prompts or saves a local operation, and refuses --yes, --percent, --wait and --client-trade-id. On a Hood TEE swap and on every bridge pair it reads Candle’s previews only, so it builds nothing and takes no lock, and reports the fee, legs, gas, route and verified destination; on a Solana same-chain swap it builds the quote and checks its spend. Embedded payers are unsupported. With --json stdout is the per-check results and the quote. --hide keeps one token buy or sell out of the public activity stream (no entry, no agent mark, no Candle handle); it is set when the order is placed, a base-asset swap, a bridge and --dry-run refuse it, and it fails closed: if the server does not confirm hide: true, nothing is signed and the command exits 1. |
swap status <id> [--kind trade|swap|launch] [--wait], swap status --operation <operationId> [--wait] | Read an operation without resending it; for a bridge, whether the deposit landed, the fill or refund, and whether it still holds a sweep. --operation reads a Hood TEE operation and its wallet guard. --wait follows either for up to ten minutes; on --operation it exits 0 when every leg completed, 1 when it failed, and 3 when partial, unresolved or timed out. Neither form finishes, cancels or releases an operation; swap cancel does |
swap cancel --operation <operationId> | Release a Hood TEE trade, swap or Hood-origin bridge operation that this key opened and never signed a leg of, so the wallet is free at once. cancelled prints “released; nothing was signed” and unchanged says it already ended (both exit 0). MAY_BE_SIGNED exits 3: a leg may have been signed, so it is not released and the trade must not be repeated. Another key’s operation (NOT_OPERATION_OWNER), a launch or transfer (CANCEL_UNSUPPORTED), a guarded wallet or a leg already sent (NOT_CANCELLABLE), incomplete proof (PROOF_INCOMPLETE) and an unknown id (OPERATION_NOT_FOUND) exit 1, as does a server with cancel switched off (FEATURE_DISABLED, the hold ends with its window) or an API too old to cancel (CANCEL_UNAVAILABLE) |
transfer --to <address|wallet name|allowlist label|vault> --asset <SOL|USDC|CNDL|ETH|USDG>|--mint <mint>|--token <0x...> --amount <decimal|max> [--wallet <tee>] [--client-id <id>] [--rpc-url <url>] [--yes] | Move funds out of a TEE wallet through its bound Withdraw key: to the wallet’s own pinned vault (--to vault, any token, max allowed) or to another of the account’s wallets you linked while signed in or marked trusted (base assets, counted against the key’s caps, which must include a per-asset cap for the asset; a USD transaction limit binds only if the owner set one). Where the server has TEE_WITHDRAWALS_ENABLED on, also to an address on the account’s withdrawal allowlist, named by its label, id or address, on the same terms as a trusted wallet; a linked wallet’s name wins over an allowlist label. The destination and its kind are shown before you confirm; Candle builds, the relay signs, Candle broadcasts. ETH, USDG or --token moves out of a Hood TEE wallet (below). --rpc-url is your own Solana RPC, or on Hood the EVM RPC a --token’s decimals are read over --client-id <id> (1 to 128 of letters, digits, . _ : -) names the transfer yourself: reusing an id for a transfer already built or sent is IDEMPOTENCY_CONFLICT naming that transfer, so a retry never sends twice. From the embedded wallet (the payer when no TEE wallet is bound or named), the transfer goes through POST /agent/transfer, the rail MCP candle_transfer uses: --to is a plain address (one of the account’s own wallets or an owner-approved withdrawal address), the key needs transfer:write, and Candle signs; see Retrying a transfer safely for --client-id there. |
transfer status <transfer id|client id> [--json] | Where a transfer stands, by the id the build returned or the --client-id it was sent under: built (signable until expiresAt), expired, submitted with its signature, unconfirmed (may still land; check the chain or candle activity before using a new client id), or failed. Candle keeps the answer for 24 hours; an older transfer is in candle activity. An unknown id is JOB_NOT_FOUND. An embedded-wallet transfer is in the same ledger: read it by its --client-id, or the clientTransferId the CLI printed. |
launch --name <name> --symbol <symbol> --image <path>|--image-url <url> --wallet <tee>|embedded [--banner <file|URL>] [--description <text>] [--website <url>] [--x <url>] [--telegram <url>] [--discord <url>] [--buy <amount>] [--quote-asset <asset>] [--dex-version v3|v4] [--mode <mode>] [--curve-v <V> --curve-g <G>] [--creator-fee-bps <bps>] [--staker-allocation-bps <bps>] [--visibility production|test|local|hidden] [--pool-fee 25|50|100] [--pool-fee-from <bps> --pool-fee-minutes <min>] [--pool-open legacy|curve_price] [--exp-pool-shape floor|full_range] [--fee-wallet <address>|--fee-wallet-multisig <address> [--fee-wallet-multisig-vault-index <n>]] [--require-fee-wallet] [--open-in <duration>] [--max-buy-per-wallet <amount> --cap-window <duration>] [--allowlist <path> --allowlist-window <duration>] [--dev-buy-max <amount>] [--snipe-fee-start-bps <bps> --snipe-fee-decay <duration>] [--snipe-exempt <0x,...>] [--team-recipient <0x-address> --team-percent <percent> --team-cliff-days <days> [--team-vesting-days <days>]] [--hide] [--dry-run] [--check] [--client-trade-id <id>] [--yes] | Create a token from the named wallet, with an optional first buy. --hide keeps the launch and its dev buy out of the public activity stream; the API must echo hide: true on the dry run or build, or the launch is refused (HIDE_NOT_CONFIRMED) before anything is signed, and the creator wallet stays public on chain. --wallet embedded (or main) uses /launch/headless on Solana or Hood, with or without --buy; every plan can use it with launch:write and the key’s embedded-wallet allowance, without swap:write. It previews through /launch/headless/dry-run, shows the quote for confirmation, then sends one headless request. A Solana buy is a creator bundle signed by Candle, preserving bundleId in the result; a Hood buy is best effort after creation. The server’s slippage floor applies; there is no separate CLI build-floor comparison. TEE wallets use /launch/self and need Pro or Max, launch:write, the bound key and verified signing authority; a server with TEE_LAUNCH_BY_SCOPE_ENABLED off also asks for the owner’s allowLaunch (deprecated). A TEE first buy works unless the server turns it off with TEE_LAUNCH_BUYS_ENABLED=0 (on by default), and with TEE_LAUNCH_BY_SCOPE_ENABLED on it also needs swap:write (a key without it gets SCOPE_MISSING); Solana creator buys also need AGENT_TRADING_ENABLED and a configured Jito engine. No gate or plan default changes. --buy is a decimal in whole quote units (SOL/USDC/CNDL on Solana, ETH on Hood; USDG has no first buy); zero or empty means no buy. A Hood launch needs --dex-version v3|v4. --description and the four absolute http(s) socials flags travel with every preview/build: --x maps to socials.twitter. --staker-allocation-bps accepts 50–1000; --visibility is production, test, local or hidden (test keys need test or hidden). --mode exp-custom needs --curve-v and --curve-g in whole quote units; ranges and common help come from the shared launch definition and appear in candle launch --help. --pool-fee sets the Solana graduated pool fee (default 50 bps); --pool-fee-from and --pool-fee-minutes add a fall to that rate. Preset --pool-open curve_price opens at the curve’s last price and burns the rest; omitted it applies when allocations fit graduation.maxStakerCarveBps, otherwise falls back to legacy. Exp --exp-pool-shape is floor or full_range. --image-url is https; --image uploads a local PNG/JPEG/GIF/WebP up to 10MB. --banner takes a wide local file or https URL. On a real launch, uploads are public and permanent before confirmation, even if you decline. With --dry-run, local image and banner files are checked for type, size and shape, and nothing is uploaded. --dry-run stops at the preview without claiming the launch id. Reuse --client-trade-id for recovery, and always pass --json in scripts. --check answers which launch path works before any of it, in one call (GET /api/v1/launch/preflight): the key’s tier and embedded-wallet allowance, each bound TEE wallet’s allowLaunch (served true where the server has TEE_LAUNCH_BY_SCOPE_ENABLED on) and verified-active state, and the server’s TEE_LAUNCH_BY_SCOPE_ENABLED, TEE_LAUNCH_BUYS_ENABLED and AGENT_TRADING_ENABLED switches. No name, symbol or image is needed, nothing is uploaded or sent, --wallet <name> narrows the answer to one wallet, and it exits 1 when no launch path works. On Solana, --fee-wallet <address> (an on-curve wallet, or a Squads v4 vault with --fee-wallet-multisig <address> and --fee-wallet-multisig-vault-index <n>) sets the wallet the launch’s curve and pool fees earn to; without it the fees earn to the wallet that launches the token where the server has LAUNCH_FEE_WALLET_FROM_LAUNCHER on (an embedded launch already earns to its embedded wallet), otherwise to the account wallet; the preview, the confirm and --check name which, a live launch warns on stderr when it defaults, and --require-fee-wallet refuses the launch without one. On Solana, where the server has CURVE_LAUNCH_RULES_ENABLED on, launch rules are fixed at launch and enforced by the curve program: --open-in delays the open (until then only the launching wallet may buy, up to --dev-buy-max, which defaults to --buy), --max-buy-per-wallet with --cap-window caps what each wallet spends on the curve after the open, and --allowlist <path> (one address per line, or comma separated, at most 4,096) with --allowlist-window lets only the listed wallets buy. Durations are seconds or 90m, 6h, 2d (the open at most 7 days away, each window at most 24 hours); amounts are whole quote units. The CLI checks each value before any request with the API’s bounds, sends the request’s nested launchRules in raw units, and the preview prints a Launch rules block from the API’s answer. Nobody can change the rules after the launch. On Hood, where the server has HOOD_GEN2_LAUNCH_ENABLED on, candle launch sends generation 2 options as top-level request fields: launch rules (--open-in, --max-buy-per-wallet with --cap-window, --allowlist of 1 to 10,000 0x addresses with --allowlist-window, --dev-buy-max, plus --snipe-fee-start-bps <0..2500> paired with --snipe-fee-decay <duration> up to 600s), --snipe-exempt <0x,...> (0 to 32 comma-separated 0x addresses), --fee-wallet <0x-address> (an EOA or Safe; --fee-wallet-multisig stays Solana-only), --creator-fee-bps <0..9999> (keeping 100 + creatorFeeBps + snipeFeeStartBps < 10000), and --team-recipient <0x-address> --team-percent <0.01..5> --team-cliff-days <30..3650> [--team-vesting-days <0..3650>] (sent as teamAllocation, vestingDays defaulting to 0). Solana keeps --creator-fee-bps at 0|100|200 on exp-* curves and refuses the Hood-only flags before any request. --quote <mint> (a Solana token mint that is not a listed pair) launches against that quote with --wallet embedded or a TEE wallet: the CLI runs the quote check first, prints it, and sends its economics digest with the launch, so the server deploys the economics the check showed or refuses QUOTE_ECONOMICS_CHANGED (run the check again; the same digest cannot succeed). --buy is refused with a new quote (launch first, then candle swap), as are --mode exp-*, launch rules, a team allocation and --creator-fee-bps. Only an open or exclusive curve, Solana legacy SPL; a Hood quote or a symbol that is not a listed pair stays refused (QUOTE_LAUNCH_UNAVAILABLE). |
launch status <mint-or-client-launch-id> [--wait] | One launch state, build, signed, confirmed, trading, bonded or migrated, for a mint or a clientLaunchId. Reads GET /api/v1/launch/status/{id} (launch:read) and reports the market’s own lifecycle and migration fields, plus (from 0.13.27) quoteAsset, quote paused, quote split (with the multiplier and any scheduled one) and, when new launches against the quote are blocked, quote launches: blocked with the reason. quoteAsset is printed whenever the status includes quoteMint. The quote paused, quote split and quote launches: blocked lines depend on quoteState from the quote watcher and are left out when it does not cover the quote token. --wait follows it until the token is trading, the launch has failed, or ten minutes pass. Nothing is sent. |
image upload <path> | Upload a PNG, JPEG, GIF or WebP file, at most 10MB, and print the https:// URL Candle hosts it at, ready to be a launch’s imageUrl. The file becomes public and permanent. Needs launch:write; --json adds the content type and the size in bytes (more) |
pnl [--profile <name>] [--dust] [--json] | P&L: realized net, fees, unrealized and total, then open positions with average entry, mark and unrealized. The figures are the console’s, to the cent for the same moment: Total is the server’s totalUsd. Without --profile it is the account’s books, one ledger for every profile, the web app and the CLI, and needs a key with the Read scope (account:read); it adds a By agent table (each key, then Manual for web-app trades, then the account total the rows sum to). --profile <name> reads that profile’s key’s share of the same P&L: realized on the sales it made and on positions its buy opened that closed through a sale made by hand in the web app or an exit outside Candle, plus the open positions that belong to it (the wallet’s bound key, else the key whose buy opened them), with a row per wallet that sums to the total. Positions live in wallets: each wallet is its own average-cost pool, one token in two wallets is two rows (a WALLET column where the API names the wallet), and a recorded move between the account’s wallets carries its cost and realizes nothing. Both show a Solana block, a Hood block, then the combined figure, the closed positions as money made, minus money lost, plus partial sells, and a CHAIN column on positions and wallet rows; --json passes the API’s body through, with chain on each, solana and hood (account) or pnl.byChain (profile), and the additive fields (totalUsd, closed, openPositionsExDust, dust, byAgent). A bridge between Solana and Hood is not a trade: it opens and closes nothing, and bridge and Relay costs are not netted from P&L. Unpriced positions are shown as unpriced, never valued at zero; a position worth under one cent is dust: counted in every figure but hidden from the positions list unless you pass --dust (a note says how many are hidden); a truncated history says so. DAMM v2 LP positions are included as their own lines and table: realized (withdrawals against the cost basis at the add, plus claimed fees), unrealized (open positions at their share of the pool plus unclaimed fees, at current marks, against that basis) and vs holding (what the deposited tokens would be worth held); Total stays the console’s token figure and Total with LP covers tokens and LP. A position that is unpriced, unreadable, or closed outside the ledger (a sweep close writes no confirmation) is shown as such and never valued. With --profile, a separate Hyperliquid section shows the key’s realized perps P&L (gross, funding, fees, net), never added to the spot or LP total; unrealized perps are left out, and coverage is limited to the wallet’s current binding |
portfolio [<filter>] [--chain solana|hood] [--rpc-url <url>] [--evm-rpc-url <url>] [--no-perps] [--no-vault] [--json] | Every wallet on Solana and Hood in one table: vault, TEE and embedded, each token with its chain, amount, price and value, then subtotals per group and per chain and a total. TEE and embedded balances on both chains come from Candle. Solana vault and external wallets are read over --rpc-url, else CANDLE_SOLANA_RPC_URL, else your profile’s RPC, else the public endpoint, and Candle is sent only the mints they hold, for prices, never a vault address. EVM vault keys are read over --evm-rpc-url, else CANDLE_EVM_RPC_URL, else the built-in Hood RPC, for ETH and USDG only (the CLI cannot list an EVM key’s other tokens), priced by asset and never by address; an RPC that is not Hood (chain id 4663) is refused with EVM_CHAIN_MISMATCH. --chain shows one chain and reads nothing on the other. Unpriced tokens are shown as unpriced and left out of the total, and a Hood token says why (no-market-row, stale-mark, unusable-price, source-unavailable); empty wallets are counted, not listed; a wallet that could not be read in full exits 3, and the footer names its chain. When Candle listed only part of the account’s wallets, the result stays partial even if every wallet shown was read, and no match says so. --json carries chain on every wallet and holding, byChain subtotals, and unread halves (sol, tokens, eth, usdg, hood-tokens). Each Solana TEE wallet’s DAMM v2 LP positions follow the tokens in a second table (share of the pool plus unclaimed fees, valued by Candle at the same marks, no Meteora code in the CLI) and count in the wallet, group and total figures; a position whose pool could not be read is shown as not read, left out, and exits 3 With <filter>, only the wallets whose label or address contains it are read and shown, in every group (case-insensitive, no glob): vault keys it leaves out are never sent to your RPC, the subtotals and total are for the matched wallets, and the first line says how many matched. After the totals, a Hyperliquid section (live from Hyperliquid, not in the ledger, never in the total) lists each EVM TEE wallet’s Hyperliquid account value, unrealized P&L, positions and risk at the default thresholds, read from Hyperliquid’s public API on this machine; a failed read there exits 3. --no-perps and --chain solana send nothing to Hyperliquid, and --json carries it as hyperliquid. The vault is read only for its addresses, so portfolio needs no terminal: without one, --factor touch-id or --factor passkey still unlocks it, and otherwise the vault group is read: false with the reason, a note on stderr says why, the other groups are shown, and the result is partial (complete: false, exit 3). --no-vault leaves the vault out on purpose (complete, exit 0 when everything else was read): no unlock, and no vault address goes to your RPC. |
scan <contract address> [--chain solana|hood] [--json] | The token card for one contract, as a Quant group gets it: ticker, name, chain and launchpad, then price, market cap, the all-time high since launch, 5 minute change, liquidity, volume, buys and sells, bundles, snipers, insiders, fresh-wallet shares, mean wallet age, tracked wallets and signals in the last hour, the same-name token that leads, forensics coverage and the Candle page, with a Sources block naming where each figure came from. Facts only, no score. A field with no source prints a dash, never a guess. The chain is read from the address (0x is Hood, base58 is Solana) unless --chain names it; any other address is refused before a request. Reads GET /api/v1/tokens/:chain/:mint/card; free for every plan, needs no key and sends none. Off on a deployment until TOKEN_CARD_ENABLED is on; until then it answers TOKEN_CARD_DISABLED |
signals scorecard [--date YYYY-MM-DD] [--json], signals records [--source pattern|quant_call|holder_band|launch_read] [--before <id>] [--limit <n>] [--json], signals record <source> <source-id> [--json], signals list [--chain solana|hood] [--pattern <p>] [--group <g>] [--min-score <n>] [--limit <n>] [--json], signals catalog [--pattern <p>] [--json], signals stream [--chain solana|hood] [--pattern <p>] [--after-id <id>] [--me] [--max-events <n>] [--json] | hacc’s live signal tape, pattern catalog, SSE/WS stream (with --after-id cursor resume, gap reporting and --me personal stream) and public signal records, read-only, with this profile’s production agent key (cndl_live_). Every scorecard, records and record output ends with the fixed line “Measured record, not a forecast.” and every --json value carries it as measure, on errors, empty pages and 404s too. A record is a fact about the past, never a forecast or advice |
preflight <solana|hood> <mint> [--usd <n>] [--fresh] [--json] · preflight --batch <file-or-csv> [--usd <n>] [--fresh] [--json] | Single-call or batch (up to 50 items) execution and safety preflight against hacc (GET /v1/preflight/:chain/:mint and POST /v1/preflight/batch) using this profile’s production agent key (cndl_live_). Read-only; never signs or trades |
intel prices|tokens|dev-trades|risk|trade-fee|clusters|leaderboard|token-pnl ... [--json] | Direct hacc market and wallet intelligence reads using this profile’s production agent key (cndl_live_): batch prices and token summaries (up to 50), deployer trades, RugCheck risk reports, trade fees, funding clusters, leaderboard PnL, and per-token wallet PnL (up to 50 wallets). Read-only; never signs or moves funds |
token forensics <mint> [--chain solana|hood] [--wallet <vault key>] [--yes] [--json] | The pre-buy forensics report (GET /api/v1/markets/:chain/:mint/forensics): deployer history, deploy-window buyers, coverage and safety. No key needed; a configured API key is sent, as before. On Hood that key also lets the report carry hacc’s EVM contract safety (safety.evm), read on the key’s own hacc research plan and charged by hacc (researchCredits); a device token alone sends no x-api-key, so a Hood report then reads no_key. Past the free rate with x402 per-use on, the key’s account credit or a vault payment (--wallet) pays Candle’s per-use price, which is separate from hacc’s research credits |
token clusters <mint> [--chain solana|hood] [--json] | Optional third-party Solana cluster estimates with a linked-wallet caveat. Every unavailable reason, including transport failures, exits 0. No key |
token exit <token> [--wallet <0x address|main>] [--recover [--amount <tokens>] | --enter-recovery | --claim-team] [--dry-run] [--yes] [--json] | Hood only. Where a holder of a Candle Hood launch stands if it does not migrate: the state (none, awaiting migration, Recovery can be opened, Recovery, rescue pending, rescued), the API’s one-sentence disclosure printed verbatim, when Recovery opens (the creator after 7 days, anyone after 30), the fixed Recovery rate and what is left, any rescue request, the team vesting escrow, and for the wallet its balance, what Recovery would pay it and the actions it may take now. The read needs no key; the wallet is --wallet, else the account’s embedded Hood wallet when a key is selected. --recover (approves the exact --amount, default all, then redeems), --enter-recovery and --claim-team run that action through Candle with the embedded Hood wallet (swap:write for the Recovery actions, launch:write for --claim-team): the API’s dry run is shown first, then the CLI asks, or takes --yes; --dry-run stops after it and sends nothing. There is no destination: Recovery pays the wallet that redeems and a team claim always pays the escrow’s recipient. A refusal prints the API’s code beside the disclosure. Exit codes: 0 done, 1 refused or partial (the approval landed and the claim did not: run it again), 3 indeterminate (a call was sent and its result is not known yet: read again before running it again), 5 you declined the prompt and nothing was sent. candle portfolio marks Hood positions whose launch is in Recovery, has a pending rescue or was rescued, and points at this command. |
token edit <mint> [--chain solana|hood] [--description <text>] [--website <url>] [--x <url>] [--telegram <url>] [--discord <url>] [--clear <field>]... [--idempotency-key <key>] [--json] | As the token’s creator, set Candle’s copy of its description and links: a flag sets a field, --clear removes one, fields not named keep their value. Name, symbol and image cannot be changed, and nothing is written on chain. Needs a launch:write key from the account that launched the token. A Hood token with on-chain metadata answers ONCHAIN_METADATA_TOKEN. Retries once on no answer with the same Idempotency-Key; exit 3 means the outcome is unknown. |
token history <mint> [--chain solana|hood] [--limit <n>] [--cursor <c>] [--json] | The token’s metadata edits, newest first, with what each field changed from and to. Public; sends no key. With a section (token history <address> <thesis|tokenomics|lore>) it is the About section’s history instead |
token events <mint> [--chain solana|hood] [--kind trade|signal|callout] [--since <iso-8601>] [--limit <n>] [--before <cursor>] [--json] | One token’s signals, callouts and tracked-wallet trades, one event per line: time, kind, name or short address (with the wallet’s kind), action and size, sells with W or L when known. Reads GET /api/v1/tokens/:chain/:mint/events; no key needed, and a configured key is sent so group names follow its tier. --kind filters the fetched page locally (the route has no kind filter), so a filtered page can be shorter than limit while older events of other kinds remain behind the same cursor: keep paging with --before until there is none. Off on a deployment until TOKEN_EVENTS_ENABLED is on; until then it answers TOKEN_EVENTS_DISABLED |
token about <address> [--chain solana|hood] [--capabilities] [--json], token claim <address> [--creator [--challenge [--message-out <path>] | --challenge-id <id> --signature <sig>]], token section set|restore <address> <thesis|tokenomics|lore> --file <path>|--version-id <id> --base-revision <n>, token history <address> <section> [--limit <n>] [--cursor <c>], token flag <address> --content <id> --reason <reason> [--detail <text>] | The token’s About page. about and history are public and send no key; about --capabilities reads this account’s own eligibility (token-pages:read). claim, section set, section restore and flag act as the key’s account under token-pages:write; neither scope is in a preset, so grant them with keys create --scopes token-pages:read,token-pages:write. Candle checks on every write that the account’s Candle-known wallets hold at least 0.5% of current supply (any positive balance to flag). A creator proof is a message, never a transaction: claim --creator --challenge prints the exact bytes to sign, you sign them on your own machine (for example candle sign message), and --challenge-id with --signature sends the signature. Section text comes from --file, is checked here first (UTF-8, 32 KiB, thesis 280 characters, tokenomics and lore 5,000) and is only read. Writes send an Idempotency-Key and retry once with it when nothing answers. Exit 0 done, 1 refused, 2 usage or local input refused, 3 outcome unknown (rerun with the printed --idempotency-key), 4 revision conflict (the file is untouched). Token page switches ship off; an off server answers feature_off or not_found |
token update <address> --file <path>, token comment <address> --file <path>, token comments <address>, token post delete <address> <post-id> | Holder updates and comments on the token’s page. update posts an immutable holder update (1,000 characters) and comment an immutable comment (500 characters, never pushed to holders), both from --file; comments lists the comments, newest first, with tombstones; post delete removes your own update or comment, also after you sell. Off on Candle’s deployments today: updates and comments each have their own token page switch, which ships off, and an off server answers feature_off or not_found. The holding rule and token-pages:write above apply |
plans [--json] | The plans this API serves: prices, fees, limits and what each can do. No key |
fees | candle fees reads the account’s claimable creator fees. A Phantom-signup account’s Solana fees read as wallet_not_signable: the agent cannot sign for that external wallet. |
fees claim <mint> [--dry-run] | candle fees claim <mint> [--dry-run] claims creator fees only to the recipient fixed at launch; there is no destination option. --dry-run sends no transaction. The CLI signs Solana claims only: a Hood claim is sent by the account’s embedded wallet, and the CLI refuses to sign one for a TEE wallet (TEE_WALLET_REQUIRED). From 0.13.27 a Hood claim prints its Outcome (complete; partial, run the claim again for the rest; unknown, a call was sent and its result is not known yet, check before running it again; or nothing was sent), and gas_estimate_unavailable reads “the network fee could not be estimated; retry”. |
stake [--wallet <wallet>] | Read Solana CNDL/sCNDL, withdrawals, rewards, pool wait and eligibility notes |
stake add <amount> [--wallet <wallet>] [--client-stake-id <id>] [--yes] | Stake decimal CNDL; embedded by default or a TEE wallet with a local relay signer |
stake remove <amount> [--wallet <wallet>] [--client-stake-id <id>] [--yes] | Start a withdrawal of decimal sCNDL, without instant unstake |
stake finish [<withdrawal>] [--wallet <wallet>] [--client-stake-id <id>] [--yes] | Finish after the pool wait; omit only when exactly one withdrawal is ready |
stake claim <rewardId> [--wallet <wallet>] [--yes] | Pay a Solana staking reward to its recorded owner |
stake claim --all [--wallet <wallet>] [--yes] | Claim all listed rewards for the selected wallets |
lp pools <token> [--page <n>] | Meteora DAMM v2 pools listing a token: liquidity, fee rate, 24h volume and an estimated yield (indexed figures, not a quote) |
lp add <pool> --amount <n> <token> --wallet <tee> [--position <nft>] [--slippage-bps <n>] | Open a DAMM v2 position, or add to one, from a TEE wallet through its bound key (lp:write, opt-in); the other side follows the pool’s ratio, both pool tokens’ Token-2022 warnings are shown before you confirm, and there is no Candle fee |
lp positions [--wallet <tee>] | Every DAMM v2 position across your TEE wallets, with unclaimed fees and USD marks where a price exists |
lp remove <position> --percent <n> [--wallet <tee>] [--slippage-bps <n>] | Withdraw part of a position; at 100% it also claims the fees and closes the position, returning its rent |
lp claim <position> [--wallet <tee>] | Claim a position’s fees and any rewards |
lp add|remove|claim ... --wallet embedded, lp positions --wallet embedded | The same operations from the account’s embedded wallet (lp:write): Candle builds, signs and broadcasts in one call, so nothing is signed or sent from your machine and --rpc-url sends nothing. remove and claim use it by default when the key has no TEE wallet, and say so. An outcome that may still land exits 3 with its signature |
lp status <clientTradeId> | An LP operation’s state; an embedded one that may still land is settled from the chain. Exits 3 while it may still land |
keys list shows live keys by default, with short UTC dates and relative last-use times. Its footer counts live and revoked keys; use --all to include revoked rows and --scopes to add raw scopes. Narrow terminals drop secondary columns, while key prefixes stay full. --json always returns the complete API payload, including revoked keys.
keys create --no-store prints the new key without saving it as the profile’s working key or changing its prefix or scopes. Without --no-store, the new key is stored only when the profile has no working key. --json reports stored: false when storage is skipped; intentional --no-store exits 0. Save the one-time key in the intended agent’s secret store.
keys create prints the full new key once, followed by the warning Shown once. Store it now., aligned fields and a scope group with fund-moving permissions called out. auth login groups approval values and stored credential prefixes; it never prints the plaintext credentials. auth status groups credential fields and wraps check details.
Every lp write (add, remove, claim) also takes --rpc-url <url> (your own Solana RPC), --client-trade-id <id> (the same id never deposits or withdraws twice) and --yes (skips an ordinary confirmation). --slippage-bps is 0 to 1000, default 100.
| Command | What it does |
|---|---|
perps deposit <amount> <SOL|USDC|ETH|USDG> [--wallet <tee>] [--to <evm tee>] [--id <clientDepositId>] [--slippage-bps <n>] [--rpc-url <url>] [--yes] [--no-submit] | Move funds onto the key’s Hyperliquid account through Relay, from the key’s Solana or Hood TEE wallet (swap:write). From Solana, --to names the EVM TEE wallet whose account receives it and --rpc-url is the RPC the deposit check reads; --id is the idempotency id (default: a new one); --slippage-bps is Relay’s slippage (default 100); --no-submit is a dry run: Candle checks the deposit and holds no wallet, limit or id |
perps setup [--wallet <tee>] | After the first deposit has landed, approve Candle’s Hyperliquid builder fee (0.1%) once for the key’s EVM TEE wallet, and show the Hyperliquid account’s mode and balance. Idempotent: nothing is signed when the approval is already there. Refused with nothing signed while Hyperliquid has never credited the account: deposit first |
perps deposit status <id> | Read one deposit by its id |
perps open <coin> <long|short> <size> [--price <px>] [--tif Gtc|Alo|Ioc] [--slippage-bps <n>] [--tp <px>] [--sl <px>] [--hide] | Open or add to a perpetual position on Hyperliquid’s main perp exchange from the key’s EVM TEE wallet (perps:write, opt-in): at market (IOC within the slippage bound) without --price, a limit order with it, and optional reduce-only take-profit and stop-loss triggers. Candle builds the action within the key’s limits; the CLI recomputes its hash and checks the action type and Candle’s builder before anything is signed, then the relay signs and the CLI submits to Hyperliquid. Every plan except Max pays Candle a builder fee on each order (0.1% today; candle plans shows the rate in force); Max pays none. --no-submit stops after the check |
perps close <coin> [--size <n>] [--slippage-bps <n>] [--wallet <tee>] [--hide] | Close all or part of a position with a reduce-only IOC order. It reserves nothing, so a key at its USD cap can still close |
perps cancel <cloid> | Cancel an order Candle built (an open, or one of its take-profit or stop-loss legs) by its cloid |
perps orders [--wallet <tee>] [--limit <n>] | Open orders on Hyperliquid, and every action Candle built for the wallet with what the venue shows for it |
perps positions [--wallet <tee>] | Positions, account value and withdrawable balance, read live from Hyperliquid by the wallet’s address. From @candledottv/cli 0.11.33 it adds the section 4 table (mark, liquidation distance, funding paid since open, level), the account line and the risk line, read from Hyperliquid directly. --json keeps every field it had and adds rows, accountLine and risk |
perps account [--wallet <tee>] [--since <30m|24h|7d|ISO>] | In @candledottv/cli 0.11.33 and later. Account value and margin used (totals), cross account value, free margin, withdrawable, the cross margin ratio, and realized P&L, fees and funding over a window (default 24h, at most 30 days), read from Hyperliquid directly. Exit 0 on a read |
perps risk [--wallet <tee>] | In @candledottv/cli 0.11.33 and later. The level now (ok, warn, critical) with what drives it, at the key’s thresholds. Exit 0, 10 or 11; unknown (an unreadable account mode or a stale read) and failed reads exit 1 with a PERPS_* code. Stateless |
perps watch [--interval <s>] [--heartbeat <s>] [--on-warn <cmd>] [--on-critical <cmd>] [--once-level-change] | In @candledottv/cli 0.11.33 and later. Polls from this machine (default every 10 s, about 136 of Hyperliquid’s 1,200 request weight a minute) and prints one JSON line per level change, heartbeat or error, with hysteresis. Hooks run once per rise with the line on stdin. Exits with the last level’s code on SIGINT or SIGTERM |
perps thresholds [--key <prefix|label|self>] / thresholds set [--warn-distance <pct>] [--critical-distance <pct>] [--warn-margin-ratio <r>] [--critical-margin-ratio <r>] [--clear-band <pct>] [--key <prefix|label|self>] / thresholds clear | In @candledottv/cli 0.11.33 and later. Show, set or clear the key’s risk thresholds. As self (the default) a key may only tighten; a prefix or label uses the device token and may loosen. In @candledottv/cli 0.13.32 and later, thresholds --key <prefix|label> also shows that key’s stored perps limits (an owner read with the device token) |
perps leverage <coin> <x> [--isolated] | Set a market’s leverage and margin mode on the account, within the key’s maximum leverage |
perps close <coin> --pct <1-100> | Close a percentage of the position (at most 4 decimals), rounded down to the market’s size step; a zero result is refused, never rounded up |
perps modify --cloid <cloid> [--price <px>] [--size <n>] [--hide] | Change a resting order Candle built; side, time in force and reduce-only are kept from Hyperliquid’s record |
perps margin <coin> --amount <usd> / --mode cross|isolated [--leverage <n>] | Add isolated margin (positive only), or set the coin’s margin mode keeping its leverage; a mode change needs no position and no resting order in the coin |
perps tpsl <coin> [--take-profit <px>] [--stop-loss <px>] [--remove-tp] [--remove-sl] [--target-tp <cloid>] [--target-sl <cloid>] [--hide] | Attach, move or remove take-profit / stop-loss legs sized to the position now. A move cancels the old leg first (a protection gap); legs Candle did not build are listed and left alone |
perps schedule-cancel <seconds> / schedule-cancel --clear | Set (at least 5 s ahead) or clear Hyperliquid’s cancel-all timer. Wallet-wide: it cancels every open order, protection included, and no positions |
perps flatten | Cancel every open main-perp order, then close every main-perp position, then read again; at most 100 signed steps a run. Spot, HIP-3 and vaults are not reached |
perps spot markets [--all] [--limit <n>] · spot balances [--wallet tee] · spot buy|sell <pair> <size> [--price <px>] [--tif Gtc|Alo|Ioc] [--slippage-bps <n>] [--client-id <id>] [--hide] [--yes] [--no-submit] · spot cancel <cloid> | In @candledottv/cli 0.13.30 and later (BE-3771). Hyperliquid spot from the key’s EVM TEE wallet (perps:write; the embedded wallet is not offered). <pair> is a name such as HYPE/USDC or Hyperliquid’s index (@107); <size> is in the base token. Pairs must be quoted in USDC, have a live two-sided book and $100k of 24h volume (a sell is not held to the volume floor). A buy spends the wallet’s spot USDC, which is separate from the perps balance, and reserves its notional against the key’s USD window and max position; a sell cannot exceed the free base balance and is allowed under reduce-only. Orders go through the same path as perps: Candle builds the action, the CLI checks it against its own read of Hyperliquid before anything is signed, the relay signs, the CLI submits. markets lists tradable pairs with mid, 24h volume and fees, balances the wallet’s spot balances. --hide (0.13.42 and later, BE-4215) keeps a buy’s or sell’s fills out of the public activity stream, as for perps; the CLI refuses to sign a build that does not echo it |
perps reduce-only [on|off] [--key <self|prefix|label>] | Read or set the key’s reduce-only restriction. The key may turn itself on; off, or another key, needs the device token. Limits new Candle builds only |
perps activity [--wallet <tee>] | In @candledottv/cli 0.13.32 and later (BE-3758). The wallet’s resting Hyperliquid orders across the default perp dex and every builder-deployed dex (each row names its dex), plus withdrawals still in flight. Needs account:read; reads only. A list that could not be read prints not read, not none |
perps fills|funding [--wallet <tee>] [--start-time <ms>] [--end-time <ms>] [--limit <n>] [--cursor <cursor>] | In @candledottv/cli 0.11.33 and later. One page of the wallet’s fills or funding payments, read directly from Hyperliquid |
perps transfer --to-dex <dex> <amount> · transfer --from-dex <dex> <amount>|--all · transfer status <id> | In @candledottv/cli 0.13.31 and later (BE-3765). Move USDC between the key’s own Hyperliquid main perps and a builder dex balance (perps:write), with --wallet, --id, --yes, --no-submit. The destination is fixed to the wallet itself and the typed data is checked before signing; --to-spot and --from-spot are refused. Needs a wallet whose transfer policy has been migrated |
perps withdraw <amount> --to solana|hood [--wallet <evm tee>] [--id <id>] · perps withdraw status <id> | Bring USDC back from the key’s Hyperliquid account to its own Solana or Hood wallet through Relay (perps:withdraw, opt-in), confirmed at the terminal. In @candledottv/cli 0.11.32 and later. The routes are on production, switched off until HYPERLIQUID_WITHDRAW_ENABLED is on: until then every write answers PERPS_WITHDRAW_DISABLED |
setup, open, close, cancel, leverage, modify, margin, schedule-cancel, tpsl and flatten also take --sign-only (build, check and sign through the relay; submit nothing), --no-submit (build and check only) and --yes (skip the confirmation). Declining a confirmation exits 5 (CANCELLED), distinct from a refusal’s 1, with nothing signed; the same exit 5 marks a declined quote, preview or typed confirm across the trading commands. On tpsl and flatten, which are plans of several steps confirmed once, --no-submit builds and checks only the first step and --sign-only signs only the first; the rest is reported as planned. A plan that does not finish exits 1, and 3 when a signed step’s submit did not answer.
| Command | What it does |
|---|---|
profile list | Profiles on this machine, with their cached accounts |
profile add <name> --api-url <url> | Create a profile before authenticating it |
profile use <name> | Make a profile the active one |
profile rename <old> <new> | Rename a profile |
profile remove <name> --yes | Delete a profile and its stored credentials |
profile set <name> --rpc-url <url> | --clear-rpc-url | Store this profile’s Solana RPC, used when --rpc-url and CANDLE_SOLANA_RPC_URL are not given, or clear it. Stored in config.json (not a secret store: a provider key in the URL sits in plain JSON on this machine); only its host is ever shown, in profile list and on every command’s host line |
setup [--no-browser] | One wizard: authorize, fund, connect an agent, verify |
mcp [--tools <a,b,c>] [--read-only] [--print-config] | Run the Candle MCP server, built into the binary; see below |
tui | Open the Candle Harness, a trading terminal with your own AI agent beside you. Looks for candle-harness on PATH first, then candle-tui for older installs. Requires an interactive terminal. It runs its own core, which holds its agents’ keys; this profile’s own keys stay where they are |
core mcp [--token <harness token>] | Preview, from an earlier design of the Candle Harness. A stdio MCP server attached to core serve. The Candle Harness doesn’t use it: it runs its own core and its own MCP server |
core serve | Preview, from an earlier design of the Candle Harness. Run a local core for the profile in play, which takes the profile’s Write key and device token; commands that need either are then refused with PROFILE_CORE_OWNED. The Candle Harness doesn’t use it: it runs its own core with keys of its own |
doctor [--role owner|bot|auto] | Diagnose CLI setup: credentials, storage backend, API reachability, wallet delegation, the account’s plan and trade fee, security key helper. --role picks which rows apply; auto (the default) is bot when an API key is stored and no device token is |
verify <file> --bundle <path> [--identity <uri>] [--issuer <url>] | Verify a release asset against its Sigstore bundle. --identity is required when no latest.json sits beside the bundle; --issuer defaults to GitHub Actions’ token issuer |
update [--check] [--to <tag>] | Update the CLI and its security key helper to the latest signed release |
updates [--limit <n>] [--surface all|traders|developers|agents|web|cli|mcp|tui] [--json] | Read published Candle product updates from https://candle.tv/updates.json (keyless; override with CANDLE_UPDATES_URL) |
completion <zsh|bash|fish> | Print a shell completion script to stdout; see below |
help [<command>] [--more] | One column of grouped commands, or a topic with a short intro, wrapped usage, subcommands, flags and examples. candle help <command> --more includes the full rules and row descriptions locally. Shared environment variables are listed once at the top level (candle --help) |
Global flags: --plain (plain ASCII: no banner, boxes, color or animation), --no-color (no color or decorative animation, terminal layout kept), --full (print ids in full where a table would shorten them), --api-url <url>, --profile <name>, --json for machine-readable output, --factor <id|kind> and --device <id> (vault commands: which envelope or security key unlocks), --no-verify-account (skip the check that the stored key belongs to the profile’s account), --help (-h), --version (-v).
Every command that reads or writes vault.enc (vault *, tee new, enable, fund, status, disable and sweep, external *, sign, portfolio) takes -k <path>, the short form of --keystore <path>, for one invocation. For a permanent location set CANDLE_CONFIG_DIR instead: it moves vault.enc, tee-wallets.enc, the credentials and the config together, and it is state you can see in your shell. A path that still begins with a literal ~ is refused rather than expanded, on every flag and positional whose value is a file the CLI reads or writes, because a shell leaves ~name alone when no such user exists and guessing at a path that holds keys is worse than stopping.
Two escape hatches stay off the help screen on purpose. --accept-older-copy (most vault commands) opens a vault file older than one this machine has already seen, for when you restored an older copy deliberately. --accept-unknown-exposure (vault promote, vault promote-batch, tee enable, and vault demote on Hood) admits a key whose history is unknown, as every key in a restored vault is.
The MCP server
Section titled “The MCP server”The CLI carries the Candle MCP server inside its own binary, so candle mcp starts it with no download and no Node runtime on the host. The key comes from the CLI’s credential store at launch, which is what keeps it out of your MCP client’s config file:
candle mcp --print-configThat prints a ready-to-paste block naming this binary by absolute path. --read-only pins the server to the nine tools that authenticate with nothing; --tools <a,b,c> takes an explicit allowlist. The MCP server page documents the tools themselves and the other two ways to run it.
The vault
Section titled “The vault”candle vault is self-custody on your own machine: vault.enc in your config directory, holding one data key wrapped once per factor, one encrypted blob per private key, and a 24-word BIP-39 root every derived key comes from. No API, no relay and no server ever sees a vault key, and there is no environment variable and no --yes that opens one. Every vault command reads its passphrase from a hidden prompt on a terminal, and refuses without one.
candle vault init # one passphrase factor, a recovery root, no key yetcandle vault new-key --chain solana --label treasury # derives m/44'/501'/0'/0' and verifies it re-readscandle vault new-key --chain evm --label hood-cold # derives m/44'/60'/0'/0/0, one address on every EVM chaincandle vault list # addresses, labels, rolescandle vault status --unlock # keys, derivation counters, exposure flagscandle vault backup --to /Volumes/BACKUP/vault.enc # copies, then verifies the copy in full- The passphrase is generated by default.
vault initshows eight words from a 7776-word list, about 103 bits, once, and does not ask you to type them back: save them in your password manager or on paper, because this CLI keeps no copy and cannot recover them. If you lose them, the 24-word recovery phrase is the way back in.--own-passphrasetakes 16 characters or more that are not on an embedded list of common ones, and records that this CLI cannot know its entropy. Under--jsonthe generated form is refused (exit 2), because the words are shown only on the terminal and never inside a JSON value; pass--own-passphrasethere, forvault factor add passphrasetoo. Keep the passphrase and the recovery phrase outside the Apple account that holds a synced passkey. - A backup is verified, not just copied. Opening a vault authenticates its header and its index and nothing else, so a copy whose root blob is corrupt, or whose key blob you have not needed yet is unrecoverable, would compare equal and be worthless on the day you needed it.
vault backupandvault verify-backupdecrypt the root, decrypt every key one at a time, check each against the address recorded for it, re-derive every derived key from the root along its recorded path, and compare the copy’s addresses against the live vault. Anything short of all of that fails, records nothing, and leaves the copy in place. A copy is sealed unless it goes to a recognised local disk or removable drive: it carries the passphrase and any security key, and no synced passkey or Touch ID envelope, so a synced passkey that lives in the same Apple account cannot open it, and the output says so; the live vault keeps every factor. A sealed copy opens with the passphrase it was sealed under, which may predate a passphrase rotation, or with a security key it carries (its PIN and a touch). Removing a key from this vault later does not remove it from this copy. iCloud Drive and other cloud folders are sealed for that reason, and so is any path the CLI cannot place, because it cannot tell whether that path syncs to an account: a network share, an rclone or WebDAV mount, or a sync client it does not recognise. The output says that in those words, and names the flag.--accept-shared-domainwrites the full copy instead andvault statusrecords that you accepted it.vault verify-backupverifies a sealed copy with the passphrase or a security key it carries. Keep the passphrase outside the Apple account, and treat the live vault plus the recovery phrase as the everyday path. - The recovery phrase is an export ceremony.
vault phrase showruns only on a terminal at both ends, asks for a fresh factor: the passphrase, or a security key’s PIN and a touch, makes you acknowledge what you are about to do, records in the vault that the phrase was exported before the words reach the screen, and then asks you to type three of them back. It is refused under--jsonand it is refused through a pipe, so an agent driving this CLI cannot obtain the phrase. A process running as you that allocates a terminal still can; the record and the read-back are what make that visible afterwards. Remove a security key from the machine when you step away: with the key left plugged in, its PIN alone is what stands between an unattended terminal and this ceremony. - A restored vault does not mint new addresses.
vault restore --phraserebuilds a vault from the 24 words, derives the indices you bound it to with--count,--tee-count,--external-countand--evm-count(or gap-scans the Solana branches with--rpc-url; a gap scan needs--rpc-urlon the command, no default or stored endpoint is used for it, and the EVM branch is never scanned), and reads your account’s linked wallets to flag any of them that this account has already imported. It cannot know how many addresses the phrase produced elsewhere, so every key it recovers is marked as having an unknown history, andvault new-key,vault promote --fromandcandle external newrefuse in that vault permanently. The way forward is a secondvault initwith a fresh root andvault transferto move the funds across. Keep the derivation countersvault statusprints beside your written-down phrase: they are the two numbers a restore wants. - Which Solana RPC a command uses. Every command that reads or broadcasts on Solana resolves one endpoint, in this order:
--rpc-url, elseCANDLE_SOLANA_RPC_URL, else the acting profile’s RPC (candle profile set <name> --rpc-url <url>), else the public endpointhttps://api.mainnet-beta.solana.com. The URL itself is never printed; before its first request the command prints the host on stderr, asSolana RPC: <host> (<source>). The first time the public endpoint is used on a machine, a notice says that it rate-limits heavily and sees every address the CLI asks it about, and names the two ways to set your own; the notice is recorded inconfig.jsonaspublicRpcNoticeand shown once per machine. A rate-limited read is retried once (after the server’sRetry-After, capped at 10 seconds, else 2 seconds); a second rate limit before anything is signed stops the command withRPC_RATE_LIMITED, exit 1, and the fix command. A rate limit after a signature is the uncertain outcome: exit 3 with the local signature, and nothing is ever re-sent, not even the same bytes.vault restore’s gap scan is the one exception to the default: it runs only with--rpc-urlon the command. Candle never proxies these reads: a Candle-operated RPC would teach Candle’s server every vault address, which the vault exists to prevent. - EVM vault keys are a bank, not a signer.
vault new-key --chain evmderives one secp256k1 key onm/44'/60'/n'/0/0, which is one address on every EVM chain. It signs exactly two shapes, both throughvault transfer: the native asset to an address, and an ERC-20transfer(address,uint256). No contract call, no approval, and no message or EIP-712 signing. An agent reaches an EVM key only once it is promoted to a Hood TEE wallet. Hood (chain id 4663) is built in; any other EVM chain is--rpc-url, and the chain id is read from the RPC every time, never typed.vault promote,vault promote-batch(one chain per file),vault fund,vault demote,tee sweepandtee statusalso work on Hood TEE wallets;tee new,external sweepandcandle signare Solana-only and refuse an EVM key named to them withSOLANA_COMMAND_EVM_KEY, and auto-selection of a Solana key never picks an EVM one. The transfer’sconfirmedis depth-confirmed (one block deep on Hood, two elsewhere) and is not finality;--jsoncarriesdepthandfinalized: falseso a script cannot mistake it for Solana’s exit 0. - A batch of promotions is one decision about a set.
vault promote-batch --pairs-from <file>promotes many vault keys in place under one unlock. The file is one<label> <destination>per line, or a CSV withlabelandsweep_tocolumns picked by name (order,label,family,sweep_to,value_usdis accepted as is;value_usdis echoed, never computed). Every row is checked against the whole set before anything is written, against the vault as it will be once the rows above it have run, so a batch never promotes key 90 and then refuses key 91. Before the table it reads how many linked wallets the account has room for, and refuses the whole batch when the keys it would promote exceed that room, so a Pro account never promotes ten keys and then exposes an eleventh it cannot link. One sentence above the table says what you are accepting: a permanent copy of these keys in Privy’s TEE that demoting does not remove. On every run the batch reads, over your RPC, whether each key is a token mint, freeze, program upgrade or stake authority (ninegetProgramAccountsper key, group by group, up to eight in flight), prints any finding in the row’sauthoritycolumn and counts them in the footer; a scan your endpoint refuses is named as not read and never blocks the batch, and multisig membership is never checked. Directly above the prompt it prints which Candle account, API key (prefix and name) and API the keys will be registered to, read live from the API, and refuses the whole batch when that cannot be read rather than print a cached value. The acknowledgement is the wordconfirm, one attempt, and anything else writes nothing. Each key is committed on its own, so an interrupted batch keeps what landed, and re-running the same file skips the rows that landed, resumes an interrupted one, and refuses a row whose destination disagrees with the vault. There is no non-interactive form: no flag, no environment variable and no--yessupplies the acknowledgement.--to-key <prefix|label>names the API key the wallets end up on instead of the one that imports them: the import runs under the calling key as before, then the promoted wallets are moved to the named key throughtee rebind’s route (device token, at most 200 per request), so the target’s secret never touches the machine. When the named key has a key signer, each import instead goes onto that signer and is bound to the named key in the same call, with no rebind after. The target is checked before the unlock (it is on this account, active, a production key withswap:write, with room if it is scoped to selected wallets), the block names it as the controller, and a wallet whose rebind fails or is never reached is reported as still on the calling key, with the exactcandle tee rebind ... --to-keycommand that finishes; re-running the same file picks up where it stopped. - A security key is a factor, not a recovery factor. It is also not a second step: any one factor opens the vault on its own, so enrolling a key adds another way in, and the passphrase still opens the vault without it. There is no two-factor unlock.
vault factor add security-keyenrolls a FIDO2 key that supports thehmac-secretextension and has a PIN set (or a built-in biometric); a key without either is refused with a typed code and nothing is written. The CLI collects the PIN on its own hidden prompt and hands it to the bundledcandle-fido2helper inside a piped request; the helper never reads the terminal. Every command that opens the vault then takes--factor <id>(orpassphraseorsecurity-key) to say which envelope to use. Without--factor, on a terminal, the CLI lists the factors that can open the vault here by the labels you gave them, marks a security key as attached when it is plugged in, lists attached keys first, and takes the row’s number. It always asks.--factoris how you skip the question. Without a terminal it never asks.--device <id>names the key when more than one is attached; with two keys attached and none named, the key you pick at the prompt is used; with--factorand no--device, the command refuses and lists both rather than touching either. One key is not a recoverable factor (a lost key is a lost factor); two envelopes on two different keys are a pair. A second key can be enrolled while the first opens the vault:vault factor add security-keyopens with the passphrase or another security key (never Touch ID or a synced passkey), and with a key as the opener--devicenames the key to add, or, with only the opening key attached, the CLI asks you to swap keys after the vault opens; a key that already holds this vault’s credential cannot be enrolled twice (VAULT_KEY_ALREADY_ENROLLED, checked by the CLI and by the key itself). The helper loads libfido2 at run time (brew install libfido2on macOS; your distribution’slibfido2package on Linux, plus its udev rule for/dev/hidraw*), and the npm package ships no helper, so there the factor isVAULT_HELPER_MISSINGuntil a release build’scandle-fido2is installed andCANDLE_FIDO2_HELPERpoints at it. The installer script placescandle-fido2besidecandle, andcandle updatereplaces both together; a release binary that has no helper beside it (one that was only ever updated by an oldercandle update) is refused at enrolment with the remedies named, one of which is--install-helper: it downloads this release’s helper, checks it exactly ascandle updatedoes, and installs nothing on any failure.candle doctorreports the helper’s state in its own row. - Touch ID is a daily-use factor for one Mac. Available in 0.13.23 with the signed helper from the macOS release; the npm package ships no native helper, so install the matching signed bundle and set
CANDLE_ENCLAVE_HELPERif using npm.vault factor add touch-idasks the signedcandle-enclave.apphelper to create a P-256 key inside this Mac’s Secure Enclave, bound to the fingerprints enrolled at that moment, wraps a fresh random key to it with Apple’s ECIES, and re-opens the vault with one Touch ID prompt before it reports. Every unlock afterwards is one Touch ID prompt whose text names the operation, and a transfer names the amount, asset and destination in that unlock prompt before the typedconfirm. Before trusting the helper the CLI verifies its code signature with/usr/bin/codesignagainst the team id and bundle id the envelope recorded; an unsigned, re-signed or wrong-team helper isVAULT_HELPER_UNTRUSTED, a missing oneVAULT_HELPER_MISSING, an Intel Mac without a T2 chip a typed refusal, and Linux always a typed refusal. The key never leaves the Mac: the same vault file on another Mac opens with the passphrase, andvault statuslists the envelope as unavailable there. The Enclave resists extraction of its key; it does not stop a process running as you from asking the helper to unwrap, which is why the prompt shows the operation.--factor touch-idselects it. - A synced passkey is a recoverable factor that lives in your Apple account. (Unavailable in 0.13.23: the signed helper has no
webcredentials:cli.candle.tventitlement, sovault factor add passkeyrefuses withVAULT_FACTOR_UNSUPPORTED_ON_PLATFORMand names the missing entitlement. A future release needs macOS 15 or later, a provisioning profile with Associated Domains, and a matchingapple-app-site-associationoncli.candle.tv. Passkey enrollment has not yet been checked on real Macs.)vault factor add passkeyasks the platform authenticator for a discoverable, user-verified passkey undercli.candle.tvwith the PRF extension, derives the vault’s key from one assertion, and re-opens the vault with the passkey before it reports; unlocking afterwards is one passkey sheet (Touch ID or the account password). Every missing gate is a typed refusal before any sheet appears: macOS 14 or earlier, a helper without the entitlement or the profile, or a domain that does not serve the association file (the refusal states exactly what must be served), and nothing else is tried instead. The credential syncs through iCloud Keychain, so it follows your Apple account to a new Mac and counts as recoverable; two synced passkeys are one factor, not two, and a passkey the platform reports as not synced is refused rather than recorded. The PRF output and the vault’s key never leave the Mac.--factor passkeyselects it. Keep the passphrase and the recovery phrase outside that Apple account. - Removing a factor is not revocation.
vault factor removedeletes an envelope from the file on this machine and nothing else. The data key never rotates, so any copy of the vault made while that factor existed still opens with it, and the key that yields opens every blob in the current file, including keys you create afterwards.vault statuslists the removed ids from then on so you know which copies to worry about. The only revocation of a compromised factor is a new vault and moving the funds to its keys. wallets.encis not read.wallets generateandwallets exportwere removed in 0.10.0 and the vault never opens the file they wrote. If one is sitting in your config directoryvault statussays so; a key in it that you imported is already a linked wallet, and one you never imported opens with CLI 0.9.2’swallets export, from which you move the funds on chain to a vault key.
TEE wallets
Section titled “TEE wallets”candle tee is a dedicated, capped agent wallet. The way to get one is to promote a vault key with vault promote (see Custody tiers); the vault then holds its key and its pinned sweep destination, and the relay signer that approves its trades sits in this machine’s CLI secret store (the OS keychain, or credentials.enc), so trade it from the machine that promoted it. To trade from another machine instead, give the key a key signer there and promote with --to-key. candle tee new only adds a key to a tee-wallets.enc that already exists. With no store it refuses and points at vault new-key then vault promote; --factor does not apply to it. An existing store is still a separate file with its own passphrase, never read from the environment, delegated to exactly one API key on the trade rail, funded explicitly from your vault, and recovered by a sweep the CLI signs locally after the agent is stopped. The remote signer is never needed to get funds back. The account owner can move a wallet to another key on the same account with tee rebind (the device token, a preview and a typed confirm; nothing changes on Privy and the funds stay put); that is a routine move, not a response to a compromise.
candle vault new-key --chain solana --label coldcandle vault promote --from cold --to-key <prefix>candle tee fund <tee-address> --amount 0.5 --asset SOL # prints what your vault should signcandle tee disable <tee-address> # exit 0 = verified stop, 3 = pendingcandle tee sweep <tee-address> # tokens first, SOL last, finalized receiptsThe server admits a TEE wallet on the trade rail, and on swap and self-signed launch where Candle has enabled them. Every other route is refused. A same-chain TEE swap uses SOL, USDC or CNDL on Solana, or ETH and USDG on Hood, and returns to its payer. The API has a separate bridge path for SOL/USDC and ETH/USDG pairs; it needs no spend cap, and it honours any cap or USD budget the key has. See TEE bridge API. candle swap runs that bridge between two TEE wallets on the same key; see Bridging between Solana and Hood. Only the bound key may pay. Other trades and swaps are held to the caps the owner set, while transfers, LP deposits and launches need no cap of their own and are held to any cap the key has. A TEE wallet key has no plaintext export path. Once enabled, a copy of the key stays in the TEE for good, so after a sweep the address is retired, never reused.
- A stop is recorded before it is requested.
tee disablewrites the stop intent into the sealed store first, then asks the server. If the server cannot be reached, or the API key no longer works, the command exits 1 and says that remote enforcement is unconfirmed;tee fundrefuses the address from then on, and you re-run the disable (or revoke the linked wallet from your Candle session) until the stop is verified. - Recovery never needs the API key.
tee sweepreads the server’s lifecycle state when it can and waits forquarantined. When it cannot (no key, a revoked key, the API down),--emergencysweeps with only the local key and the pinned vault, prints the race warning, and reports the state as pending: a sweep never claims the remote signer is gone. - Open LP positions sweep too. The sweep lists the wallet’s Token-2022 accounts over your RPC and treats an account holding raw amount 1 of a decimals-0 mint as a Meteora DAMM v2 position NFT; it never asks the server which positions exist. For each one, an ordinary sweep fetches one unsigned close from
POST /api/v1/agent/lp/positions/<mint>/close-build(the bound key, nolp:write, refused while the wallet is still enabled) and verifies every close before signing any: the server’s ordered account keys are rebuilt element for element from the v0 message and its lookup tables, every top-level program is on a fixed allowlist, a simulation with signature verification off must succeed with every gain landing on the TEE wallet or its vault and the NFT account emptied, and every writable account is classified (the wallet, its vault, the pool’s own vaults, DAMM v2 state, or a not-yet-created associated token account of the wallet or vault; anything else refuses). A close that cannot be fetched is the leftoverDAMM_POSITION_CLOSE_UNAVAILABLE; one that fails a check isDAMM_CLOSE_TRANSACTION_REFUSED, and neither stops the token and SOL transfers. The tokens a close withdrew are swept in the same run.--emergencynever fetches a close: it moves the position NFT itself to the pinned vault under Token-2022, to be unwound later from a fresh TEE wallet. sweptis decided after finality. Once the transfers finalize the CLI re-reads the SOL balance and every token account. Anything still there (a deposit that landed mid-sweep, a token account it could not close) is listed as a residual and the address stays quarantined for another pass; exit 0 and the server’ssweptrecord need an observed-empty wallet. The server refuses the record while the remote authority is still pending, and the CLI then reports the address as pending, not quarantined.- Receipts are kept, so a retry finishes the job. Every sweep transaction is recorded inside the sealed store as pending before it is broadcast, and as a receipt once it finalizes. A transfer that is still unconfirmed when the 90-second wait ends is reported as uncertain, never as failed; the next
tee sweepchecks it first, turns a finalized one into a receipt, drops one that failed at finality or that was never seen and can no longer be admitted (blockhash expired, confirmed by a second status read) and sweeps that balance again, and signs nothing new while one is still in flight or while the RPC’s answers are inconclusive. The transaction’s own signature, known before it is sent, is the identity used throughout; the RPC’s echo never replaces it. If recording the sweep fails (an outage, a lost key, an emergency sweep whose stop was verified later), re-runningtee sweepreconciles the retained receipts against a fresh inventory and records them without another transfer. A repeat after success is a no-op that exits 0. - Two commands cannot lose a key. Every write to
tee-wallets.enctakes a lock (tee-wallets.enc.lock, a directory beside the file) and re-reads the file before writing, so a key another command sealed meanwhile is carried forward. A lock left behind by a crash is never broken automatically; the command names it and you remove it once nothing else is running.
Hood TEE wallets: trading
Section titled “Hood TEE wallets: trading”candle swap works on Hood as well as Solana. There is no --chain flag: with --wallet, the wallet’s chain is the operation’s chain, and an asset from the other chain is CHAIN_MISMATCH before anything is built. Without --wallet, the assets decide (ETH, USDG or a 0x... token is Hood; SOL, USDC, CNDL or a base58 mint is Solana), and the key’s single wallet on that chain pays, as on Solana. The embedded Hood wallet can trade tokens; ETH to USDG needs a Hood TEE wallet.
candle swap ETH USDG --amount 0.05 --wallet hood-agentcandle swap ETH 0xToken... --amount 0.01 --wallet hood-agentcandle swap 0xToken... ETH --percent 100 --wallet hood-agentcandle tee status 0xYourHoodTeeWallet- One leg at a time. A Hood trade can be up to four transactions: an approval, a Permit2 approval, the trade, and the fee. For a Hood TEE wallet Candle returns only the next one, with the nonce, gas and fees it set itself. The CLI relay-signs that leg exactly as built (
eth_signTransaction), checks the signature covers that leg and nothing else, posts it, and waits for the server to read its receipt before it is given the next. The fee is only ever offered after the trade landed. The quote lists every leg, the first leg’s gas and the gas reserve before you confirm. - The quote is a preview; the build waits for you. For a Hood TEE payer (a token trade or ETH to USDG) the CLI first asks Candle for a read-only preview: venue, price impact, tier fee, minimum received, legs, first-leg gas and the gas reserve. The preview takes no lock and builds nothing. So a run that stops there holds nothing: a non-interactive run without
--yesisCONFIRMATION_REQUIREDwithwalletHeld: falseand nooperationId, a decline exits 5 withwalletHeld: false, and too little gas isGAS_INSUFFICIENT. A wallet another operation already holds isWALLET_BUSYbefore any prompt, naming thecandle swap cancel --operation <id>that would release it (or, for a guarded wallet, its status command).--dry-runruns the same preview and stops. - The confirmed build. Only after you confirm does the CLI build, with the same
--client-trade-idand the previewed minimum and fee as a bound. If the quote got worse in between, the build answersQUOTE_MOVED, the CLI prints the previewed and current figures and exits 1, and nothing is held. From the build on, the operation holds the wallet for its 30-minute window, and another Hood trade, bridge or sweep from it isWALLET_BUSYuntil it ends. If the run stops after the build but before a leg is signed, the CLI printscandle swap cancel --operation <id>(alsodetails.cancelCommandin the JSON envelope); run it to free the wallet at once. - Against an older API with no preview route, the CLI falls back to building first and asking second. On a decline or
CONFIRMATION_REQUIREDit then cancels the operation it just built; if that API cannot cancel either, it prints when the hold ends, as before. - Outcomes. A leg that fails or reverts exits 1 and lists the legs that landed, with their hashes. A leg whose receipt was not seen exits 3 with its hash;
candle swap status <id>reads the operation without resending anything. --wait.candle swap ETH <token> --amount <n> --wallet <hood-tee> --yes --waitfollows the operation after the legs it signed until the trade and fee legs have both landed, for up to ten minutes, and prints the same{ success, operation }response ascandle swap status --operation <id>. Exit 0 means completed, 1 failed or expired before the trade landed, and 3 partial execution, unresolved settlement, a timeout or a status that could not be read. Waiting only reads: it does not recover, release or re-sign a leg.candle swap status --operation <id> --waitdoes the same for an operation already running. On an embedded wallet or a Solana same-chain swap,--waitisUSAGE, and the message namescandle swap status --operation <id>for a Hood swap andcandle swap status <client-trade-id>for a job.- The gas reserve. Candle keeps enough ETH in the wallet to sweep it home at twice the current fee, and refuses a trade that would spend it (
GAS_INSUFFICIENT, with thecandle vault fundcommand).candle tee status <0x address>shows ETH, USDG, the reserve’s floor over your EVM RPC, and a lowGasfield when ETH is under twice it. - Reads only over your RPC. A token’s decimals and a
--percentbalance are read over--rpc-url,CANDLE_EVM_RPC_URLor the built-in Hood RPC, and the host is printed. Nothing is sent there: the server broadcasts every leg. - The sealed EVM record. After each leg lands, the CLI appends the traded token to the sealed EVM record beside your vault, without unlocking it, so a later sweep knows to look for it. An append that cannot run never fails the trade; it prints a notice naming
--tokenand--from-block.
Launching with an image file
Section titled “Launching with an image file”A launch takes its image as an https:// URL. When the image is a file on your machine, the CLI uploads it for you, from @candledottv/cli 0.11.24:
candle launch --name Demo --symbol DEMO --image ./logo.png --wallet agentcandle image upload ./logo.pngcandle launch --image <path>uploads the file, then launches with the URL Candle returns. Pass--imageor--image-url, never both. The upload runs once, after every check this machine can make (the wallet, the chain,--buy, the Solana RPC) and before the launch id is claimed. If the upload fails, the launch was not started and the same--client-trade-idcan be used again. Re-running a launch that already started resumes it and uploads nothing. The file is still read and checked on every run, so leave it in place until the launch has finished.candle image upload <path>does only the upload and prints the URL on stdout, socandle image upload logo.pngcan feed another command. Use it when you want the link without launching, or when you launch through the hosted connector, which runs on Candle’s servers and cannot read your disk: upload here, then pass the URL asimageUrl.- The file is checked before any request. It must be a PNG, JPEG, GIF or WebP of at most 10MB. The type is read from the file’s first bytes, not its name, so a text file renamed
logo.pngis refused (IMAGE_TYPE_UNSUPPORTED), as is a larger file (IMAGE_TOO_LARGE) or a path that cannot be read (IMAGE_UNREADABLE). A path that begins with a literal~is refused as it is for every other file the CLI reads. candle mcpwithCANDLE_IMAGE_DIRlets an agent on the local connector launch with a file itself. Set the variable to an absolute directory path in the environmentcandle mcpstarts with, and the two launch tools acceptimagePathfor a file inside that directory (more). From@candledottv/cli0.11.25. A launch uploads the file and publishes it; a dry run only checks it and uploads nothing.- An upload is a publication, and it cannot be undone. Candle pins the file to public storage and the URL cannot be withdrawn. With
candle launch --imagethis happens before the confirm prompt, so the file is public even if you decline or the launch fails. A square image keeps its original bytes, including any metadata such as EXIF or GPS data; other shapes are cropped to a square. Upload only an image you mean to be public. - What it costs. No funds, and nothing against the daily launch cap. It uses the key’s
launch:writescope and the plan’s uploads-per-minute limit (10 on Free, 30 on Pro, 60 on Max); past it the route answersRATE_LIMITED, which the CLI passes through with the route’s own message, as it doesUPLOAD_INVALID. --image-urltakes only anhttps://URL. Anything else, a local path included, is refused before any request with a message naming--image.- A banner needs
--banner. Without it the route crops to a square, so a banner sent as a plain upload comes back cropped and a launch refuses it (BANNER_WRONG_SHAPE).candle image upload ./banner.png --bannerhosts the image uncropped, if it is wider than 1.5:1 (for example 2171x724), and prints the URL to pass asbannerUrl. A square image is refused as a banner: send the wide original, not a cropped copy.candle launch --banner ./banner.pnguploads that wide original itself, and--banner https://example.com/banner.pngpasses through an already-hosted URL. The launch result reportsbannerUrl. Both file uploads happen before confirmation and are public and permanent, even if the launch is declined or fails. With--dry-run, neither file is uploaded: each is checked by the API (POST /uploads/agent-image?dryRun=true, nothing hosted) and the dry run is sent withimageChecked/bannerCheckedinstead of URLs; the result reportsimageCheckedand noimageUrl. A same-id atomic retry reuses the saved banner URL.--banneris in@candledottv/cli0.11.36 and later; an older CLI refuses it as an unknown flag.
Retrying a transfer safely
Section titled “Retrying a transfer safely”Pass --client-id <id> and a retry cannot send twice. The id rides the build as clientTransferId, and the receipt carries it back. If the first attempt died before you saw the result, run candle transfer status <id> (the transfer id or your client id): submitted shows the signature, built means nothing was sent yet, and expired means the build lapsed unsent. unconfirmed keeps the signature and the client id bound even after the build expires: it may still land, so check the chain or candle activity before doing anything else or using a new client id. failed means a definite revert or a refusal before broadcast. Running the same candle transfer --client-id <id> again while the earlier one is pending, built, sent or unconfirmed is refused with IDEMPOTENCY_CONFLICT, naming the transfer. Status is kept for 24 hours; older transfers are in candle activity.
From the embedded wallet (candle transfer through POST /agent/transfer, from @candledottv/cli 0.13.26) the same id names the transfer, and the CLI picks one when --client-id is absent and prints it before it sends; the receipt and every failure carry it. A repeat of a sent transfer replays its answer and sends nothing; a repeat with a different request, or of a transfer that may have landed, is IDEMPOTENCY_CONFLICT; a failed one may be retried under its id. Any failure that is not a definite refusal (no answer, a timeout, a 5xx, TRANSFER_FAILED) exits 3 and names the id: read it with candle transfer status <id>, or check candle activity or the chain, before sending again, because a new id sends again.
SOL transfers with max
Section titled “SOL transfers with max”candle transfer --asset SOL --amount max (including --to vault from a TEE wallet) sends the balance minus 10,000 lamports of fee headroom and the RPC-reported rent-exempt minimum for a zero-byte system account. It keeps the payer rent-exempt. If no positive amount remains, Candle refuses before signing with TRANSFER_AMOUNT_UNAVAILABLE; the message reports the spendable lamports, fee headroom and rent minimum. The returned amountRaw is the amount the transaction moves.
Hood TEE wallets: launch and transfer
Section titled “Hood TEE wallets: launch and transfer”candle launch --name Demo --symbol DEMO --image-url https://example.com/d.png --wallet hood-agent --dex-version v4candle swap ETH 0xNewToken... --amount 0.01 --wallet hood-agentcandle transfer --to vault --asset ETH --amount max --wallet hood-agentcandle transfer --to vault --token 0xToken... --amount max --wallet hood-agentcandle transfer --to cold --asset USDG --amount 250 --wallet hood-agent- Launch. The wallet decides the chain, so a Hood TEE wallet launches on Hood.
--dex-version v3|v4is required there, and--quote-assetiseth(the default) orusdg. A flag from the other chain (--quote-asset sol, or--dex-versionwith a Solana wallet) isCHAIN_MISMATCHbefore anything is built. Without--buythe launch creates the token only, and the first buy is a separatecandle swap, gated like any trade. With--buy <amount>(ETH; a USDG launch takes no dev buy) Candle adds its own curve buy for exactly that amount as the last leg and reserves it against the key’s spend window when the operation opens; this is on by default; a server turns it off withTEE_LAUNCH_BUYS_ENABLED=0. If the buy leg never lands, the token exists with no first buy. Its legs, the curve, then the fee when one applies, then the buy, run one at a time as a trade’s do, and the launched token is appended to the sealed EVM record. A leg whose receipt was not seen exits 3 with its hash; re-running with the same--client-trade-idposts nothing while the operation still holds the wallet, and once it has let go it records the launch from the legs Candle sent, without re-signing anything. - Transfer. Through a Withdraw key, with Solana’s rules: the pinned vault takes any token (
--token <0x...>) andmax, uncapped; a trusted linked wallet takes ETH or USDG only, counted against the key’s caps. Candle refuses ETH above the agent-wallet wei ceiling to either. ETHmaxis the balance minus this send’s gas and the gas reserve. The one leg runs through the same loop, and before it is signed the CLI checks it moves exactly the confirmed amount of that asset to that destination.
Bridging between Solana and Hood
Section titled “Bridging between Solana and Hood”A swap between a base asset on each chain, SOL or USDC on Solana and ETH or USDG on Hood, in either direction, is a bridge. It runs through Relay from a TEE wallet into the same API key’s TEE wallet on the other chain, and nowhere else: not a vault, not a linked wallet, not an address you type. Candle resolves that destination on its server and charges no fee; you pay Relay’s fees and gas. The key needs swap:write; a cap on the origin asset is honoured if the key has one, but is not required. Every other cross-chain pair, CNDL or a token, is still CHAIN_MISMATCH: swap it into a base asset first.
The vault never bridges. Vault to vault is four commands:
candle vault fund <sol-tee> --amount 1 --asset SOLcandle swap SOL ETH --amount 1 --wallet <sol-tee>candle swap status <id> --waitcandle tee disable <hood-tee> && candle tee sweep <hood-tee>- The destination. With one TEE wallet on the other chain bound to the key, it is used. With several, name one with
--to <label|id|address>; with none, the command refusesBRIDGE_DESTINATION_MISSINGbefore anything is built, andvault promoteputs one on the key. The CLI refuses a quote whose recipient is not a TEE wallet it lists for the key, and a quote that carries a Candle fee. - The quote. Venue
relay, the destination wallet, the minimum received (Relay’s estimate less the slippage bound), Relay’s fees and estimated time as Relay reports them,Candle fee: none, and on Hood the legs, then the usual confirmation (--yesskips it). - A bridge builds before it asks. Unlike a Hood swap, a bridge has no preview step on a real run: the quote you confirm comes from the build. A non-interactive bridge with no
--yesstops atCONFIRMATION_REQUIRED; a declined one exits 5 withstatus: "cancelled". From Solana, that build isbuiltandnot_broadcast, nothing is signed or sent, and it holds nothing: the next call, a confirmed bridge included, goes ahead at once. From Hood (ETH or USDG), the build is a sequenced operation like a Hood trade’s, so it holds the Hood wallet for up to 30 minutes; a decline prints itsoperationIdand when the hold ends, and the next Hood call’sWALLET_BUSYnamescandle swap cancel --operation <id>. The bridge itself does not cancel on a decline. Cancel accepts the operation, because a Hood bridge is a swap operation, and refuses once the approval or deposit may have been signed. --dry-runbuilds nothing.candle swap SOL ETH --amount 1 --wallet <sol-tee> --dry-run(any of the eight SOL/USDC and ETH/USDG pairs) reads Candle’s preview: Relay’s quote, fees, legs, gas and the destination wallet, checked as a real run checks it. It takes no lock, prompts for nothing and signs nothing.- This machine checks Relay’s deposit before it is signed, from its own copy of the pinned Relay addresses. On Hood: at most one approve, only for USDG, to Relay’s depository, for exactly the amount (a USDG bridge whose allowance already covers the amount is the deposit alone; an ETH bridge never has one), then the deposit to the depository with this wallet as depositor, the origin token and exactly the amount. On Solana: the transaction decodes, every lookup table resolves (one that does not is a refusal, never skipped), this wallet is the fee payer and only signer, and Relay’s depository is the only program, with no Compute Budget instruction. Anything else is
RELAY_STEP_REFUSEDand nothing is signed. Candle’s server runs the same checks, and on Solana also simulates the deposit. - It returns after the deposit. The command prints the deposit hash and
filling, and exits.--wait, orcandle swap status <id> --wait, follows it for up to ten minutes: deposit landed, filling, filled with the amount received, failed or refunded to the source wallet (Relay reports both the same way), or uncertain. The status also prints Relay’s status URL, where the destination transaction is named. - A sweep waits for it. From its build until it fills, fails or is refunded,
tee sweepof the source or the destination wallet refusesBRIDGE_IN_FLIGHTfor two hours, naming the operation. After two hours an unresolved bridge is a warning and the sweep goes ahead; a fill or refund that lands later needs a second sweep.tee disableis never blocked and says a bridge is still open.tee sweep --emergencyasks Candle nothing, so it cannot see a bridge; it says so.
Bring your own services
Section titled “Bring your own services”Candle is never a party to a transaction you make on another service. There is no Candle API key for an exchange, no Candle server in the request path, no fee or markup, and no Candle-offered private transfer. What the CLI does is make it easy to supplement it with your own keys and tools for any crypto service: your secrets stay in your keychain, a plug-in runs on your machine with only what you hand it, and an external wallet signs for outside tools without ever touching the vault’s cold keys or a TEE wallet.
candle secrets set EXCHANGE_KEY # typed on a hidden prompt; never sent to Candle, never shown againcandle external new --label desk # a key on the vault's third branch, never delegated to Privycandle vault fund desk --amount 0.5 # vault-signed; check the desk address, type confirmcandle mytool --secret EXCHANGE_KEY --wallet desk buy 0.1 # runs candle-mytool with only those two valuescandle sign --file tx.txt --wallet desk # decode, simulate, confirm, signcandle external sweep desk --to treasury # everything back to a vault key- Secrets live in their own keychain namespace.
candle secretsstores your third-party API keys under a keychain service of its own (tv.candle.cli.secrets), distinct from the one holding Candle’s device token and API key, so a keychain grant or an approved prompt for one never reaches the other; on the encrypted-file fallback they are two files (secrets.encbesidecredentials.enc, both opened byCANDLE_KEYRING_PASSPHRASE).setreads the value on a hidden prompt;listshows names only; nothing here is ever sent to Candle or logged. A name is uppercased, and a plug-in receives it asCANDLE_SECRET_<NAME>only when you pass--secret <name>. - A plug-in’s environment is an allowlist, built from empty. An executable
candle-<name>on yourPATHruns ascandle <name>. It inherits nothing from the shell that launched the CLI except what a process needs to run and reach the network as you:PATH,HOME,TMPDIR,TERM,TZ,LANG,LC_*and the proxy variables. On top of those it receivesCANDLE_PLUGIN_NETWORK(solana-mainnet),CANDLE_PLUGIN_RPC_URLwhenCANDLE_SOLANA_RPC_URLor your profile names an RPC (in that order; a plug-in is never given the public default), the external wallet addresses you name with--wallet <label>asCANDLE_PLUGIN_WALLET_<LABEL>, and the secrets you name with--secret <name>asCANDLE_SECRET_<NAME>. No parentCANDLE_*variable reaches it: notCANDLE_API_KEY, notCANDLE_DEVICE_TOKEN, notCANDLE_KEYSTORE_PASSPHRASE, and never a private key.--secretand--walletare consumed by the CLI and stripped from the arguments the plug-in sees; everything else after the plug-in name is passed through verbatim. A plug-in cannot make a Candle-held key sign: the only way it reaches one is to hand a transaction tocandle sign, which refuses any signer that is not an external wallet. Candle ships no plug-in for any service and endorses none. - An external wallet is the key that signs for outside tools.
candle external newderives it on the vault’s third branch,m/44'/501'/n'/2', a change index neither the vault branch (0') nor the TEE branch (1') can reach and one no wallet app scans. It is never delegated to Privy and never registered with Candle, so the vault stays cold and TEE wallets stay on Candle’s rails. It is funded from the vault byvault fund <external>, a vault-signed transfer that is decoded, displayed with the external address grouped in fours, and confirmed by typingconfirm, with no--yes: what an external wallet holds is exactly whatcandle sign --yescan spend, so fund a session, not a float.external sweep <external> --to <vault>sends everything back, signed locally with the external key; both ends are named on the command, neither is inferred, and the address shown before you typeconfirmis the vault key’s. External addresses are read over your own RPC; Candle is not in their transactions. - The vault format moves to version 3 with the first external key. The external branch adds a counter, an exposure list and a role the version 2 format has no field for, so the write that allocates the first external key rewrites the vault as
version: 3. Nothing else changes: the same envelopes, key blobs and root, byte for byte. A vault you never runcandle external newin stays version 2 and opens in CLIs that predate the external branch; a version 3 vault is refused by those CLIs withVAULT_VERSION_UNSUPPORTED, and nothing is written.vault restore --phrasetakes--external-count <e>on the same rules as the other two counts (1 when another count is given, a gap scan with--rpc-url), and recovers external keys as external keys; like every recovered key their history is unknown, and becausecandle external newis an allocation it refuses in a restored vault withVAULT_ALLOCATION_BOUNDARY_UNKNOWN. Funding, sweeping, signing and listing keep working on a recovered external key, since moving funds off a key of unknown history is the right move. candle signis a wallet’s approval screen for one key. It takes a base64 transaction built by any tool (from--fileor stdin), legacy or v0, and refuses anything that is not exactly one such transaction (SIGN_TRANSACTION_UNDECODABLE) before displaying anything. A v0 message only commits to lookup tables and indexes, so the CLI fetches every table over your RPC and rebuilds the account list in compiled order first; a table it cannot fetch isSIGN_LOOKUP_TABLE_UNRESOLVED. It then simulates the transaction with signature verification off, and a simulation that fails, or an RPC it cannot reach, isSIGN_SIMULATION_FAILEDwith the program error and logs: there is no “sign anyway”. Every required signer, the fee payer included, must be one of this vault’s external wallets: a vault key, a TEE wallet, or an address the vault does not hold isSIGN_SIGNER_NOT_EXTERNAL, and an external signer you did not name with--walletisSIGN_SIGNER_NOT_PROVIDEDrather than a half-signed transaction. What you see before the prompt: the fee payer, every program called, the signing wallet’s own balances before and after (SOL and each token account, with the mint’s decimals), every other account that gains a balance, and the Token-2022 warnings for every mint involved, with a note that a simulation is evidence and not a guarantee. A change of control over any account a signing wallet owned (a new owner, a new or larger delegate approval, a close authority, or the wallet itself assigned to another program) is shown as aCONTROLline and refused withSIGN_CONTROL_CHANGE,--yesincluded: a balance that does not move can still be taken. The prompt is your vault factor a second time;--yesskips that prompt and nothing else, so a scripted plug-in can sign on a terminal you have already unlocked, bounded by whatvault fundput in the wallet. The signed transaction is printed to stdout for the tool to send, or--broadcastsends it over your RPC (SIGN_BROADCAST_FAILEDstill prints it).candle sign messagesigns the exact bytes of a file or of stdin, never a command-line argument: it always shows the byte length and the SHA-256, shows the text only when it is UTF-8 with no control character other than newline, and shows hex otherwise, so nothing that dropped or altered a byte is ever signed.- Paying a deposit to a service you have an account with is
vault transfer <address>from the vault, orcandle signandexternal sweepfrom an external wallet. Nothing in the CLI knows or checks what an address belongs to.
Importing a wallet you own
Section titled “Importing a wallet you own”Linked wallets (Pro and Max; see Agent wallets & spend limits and candle plans) let the rail trade from a wallet you already control. The import is the most security-sensitive command the CLI has, and its shape reflects that:
candle vault new-key --chain solana --label tradingcandle vault export-key trading --to ./trading.jsoncandle wallets import --chain solana --key-file ./trading.json --label "trading wallet"rm ./trading.json- The private key never appears in the command line. It comes from
--key-file(accepts anid.jsonbyte array, base58, or hex) or, with no flag, a hidden terminal prompt. There is no argv or environment form, so the key cannot land in shell history or process listings. - A wrong key cannot import silently. For Solana the CLI derives the wallet’s address from the decoded secret; if you pass
--addressand it doesn’t match, the import refuses before any network call. EVM keys can’t be address-derived without keccak, so--addressis required there and the server validates. - Only ciphertext leaves your machine. The key is HPKE-sealed locally to Privy’s receiver key (the same RFC 9180 exchange the SDK import documents); Candle never sees plaintext.
- The signer stays in your keychain. The import generates a P-256 signer keypair; the public half registers with the wallet, and the private half, which every later trade from this wallet signs with, is stored in the same OS keychain as your credentials, keyed by wallet id.
--signer-out <path>additionally exports a PEM (written owner-only) for use on another machine; treat that file like the private key it is. On the same machine, no export is needed at all: the SDK’sKeychainSecretStorereads the CLI’s storage directly, so an agent process trades from the imported wallet with zero manual key handling.
candle wallets revoke <wallet-id> (the same command as candle wallet revoke) stops the wallet at Candle as soon as the revoke is accepted. It removes the stored signer and exits 0 only when that stop is verified (quarantined). While remote policy verification is pending it exits 3, keeps the signer, and prints the command to re-run. The wallet id is the id printed at import time, also visible via candle wallets. Both outcomes are in Disconnect (unlink) a linked wallet.
A wallet an API key imported is not trusted: from an ordinary wallet an agent can move funds into it only through the withdrawal allowlist, capped by the key’s limits, and from a TEE wallet it cannot move funds into it at all. candle wallets shows a Trusted column. To say “these are mine” in one step, run candle wallets trust 'tr-*' 'dest-*' (a selector is a label, address, id, or a prefix ending in *; quote it so the shell leaves it alone). It needs the device token from candle auth login; a profile with only an API key is refused with DEVICE_TOKEN_REQUIRED. The same marks can be set from the Wallets tab of the agent console. Revoking a wallet ends its trust, and re-importing the address starts untrusted.
Where credentials live
Section titled “Where credentials live”Secrets never land in a plaintext dotfile. The CLI picks the strongest backend the machine has:
| Platform | Backend |
|---|---|
| macOS | Keychain, via security (the secret is piped, so it never appears in process arguments) |
| Linux | libsecret, via secret-tool |
| Anywhere else | An AES-256-GCM encrypted file, unlocked by CANDLE_KEYRING_PASSPHRASE |
auth status and doctor both name the backend in use. Non-secret configuration (the stored API URL, the device label) lives in a plain config file; CANDLE_CONFIG_DIR relocates it, which is also how tests and multi-account setups isolate themselves.
Headless and CI use
Section titled “Headless and CI use”Environments without a keychain or a browser skip storage entirely and inject credentials through the environment:
Every variable the CLI reads is below, in the order candle --help prints them, so the two lists cannot disagree. A test pins them together: a variable added to the code and documented in neither place fails CI.
| Variable | Meaning |
|---|---|
CANDLE_CONFIG_DIR | Where vault.enc, tee-wallets.enc, credentials and config live (default ~/.config/candle). Set it once instead of passing --keystore |
CANDLE_PROFILE | The profile to act as, when --profile is not given |
CANDLE_API_URL | API base URL, when --api-url is not given |
CANDLE_API_KEY | An agent API key; takes precedence over any stored key |
CANDLE_API_KEY_FILE | CLI 0.13.22 and later: an absolute path to a file holding the agent API key (mode 0400 or 0600, owned by you, at most 4096 bytes, one printable token). Refuses with API_KEY_SOURCE_CONFLICT if CANDLE_API_KEY or CANDLE_AGENT_API_KEY is also set; other refusals are API_KEY_FILE_UNSUPPORTED, API_KEY_FILE_UNREADABLE and API_KEY_FILE_INVALID. No fallback; read once at startup |
CANDLE_DEVICE_TOKEN | A device token, for key-management commands |
CANDLE_KEYRING_PASSPHRASE | Unlocks the encrypted-file backend where no OS keychain exists |
CANDLE_SOLANA_RPC_URL | Solana RPC endpoint, when --rpc-url is not given. Beats the profile’s (candle profile set <name> --rpc-url); the public endpoint when none is set |
CANDLE_EVM_RPC_URL | EVM RPC endpoint for an EVM vault key, when --rpc-url (transfer) or --evm-rpc-url (list, portfolio) is not given; without it the built-in Hood RPC is used |
CANDLE_FIDO2_HELPER | Path to the candle-fido2 helper, when it is not beside the binary |
CANDLE_ENCLAVE_HELPER | Path to the signed candle-enclave.app helper (macOS) |
CANDLE_HYPERLIQUID_BUILDER | candle perps: Candle’s Hyperliquid builder address, pinned for the check every build passes before it is signed; without it the release’s, else the one the server reports |
CANDLE_HYPERLIQUID_NETWORK | candle perps: set to testnet to trade Hyperliquid testnet |
CANDLE_NO_UPDATE_NOTIFIER | Set to 1 to silence the update notice |
CANDLE_KEYSTORE_PASSPHRASE | Refused: no command reads its value, and vault and tee commands stop while it is set |
Authorize once on a machine with a browser (or use --no-browser and approve from your phone), copy the key into your runner’s secret store, and the runner itself never performs a login. A bot that trades TEE wallets from its own box follows the same rule and holds a key signer as well: see Run a bot on a headless machine.
Shell completions
Section titled “Shell completions”candle completion <shell> prints a completion script to stdout; install it by redirecting it where your shell looks:
candle completion zsh > "${fpath[1]}/_candle" # then: autoload -Uz compinit && compinitcandle completion bash > ~/.local/share/bash-completion/completions/candlecandle completion fish > ~/.config/fish/completions/candle.fishThe scripts are generated from the same data candle help prints, so they offer exactly the commands, subcommands and flags the help documents, and never one that does not run. They are static: profile names, key labels and factor ids are not completed, because doing so would mean reading config or opening the vault at tab time. Regenerate after every candle update.
Troubleshooting
Section titled “Troubleshooting”candle doctorfirst: it checks stored credentials, the storage backend, and API reachability in one pass, and its output is designed to be pasted into a bug report.- A
404onauth loginusually means the profile points at an old API URL.candle profile listshows each profile’s host; production ishttps://api.alpha.candle.tv. bunxcaches the fetched repo per temp directory and can serve a stale build after the repo updates. Clear it withrm -rf "$TMPDIR"/bunx-*agentic*and rerun.
Next steps
Section titled “Next steps”- Agent quickstart: the whole first-call path this CLI slots into.
- Agent access & API keys: scopes, tiers, and the server-side device authorization model.
- Skills for coding agents: let an agent run these workflows for you.
- Verify a Candle release: checksum, provenance, and signature checks for every download.
CNDL staking
Section titled “CNDL staking”candle stake reads eligible Solana wallets’ CNDL/sCNDL, withdrawals, rewards, pool wait and
eligibility notes. Writes require swap:write and the staking rail (on at api.alpha.candle.tv), and
MOVE REAL FUNDS. Approve the displayed wallet, amount and SOL costs before passing --yes.
| Command | Purpose |
|---|---|
candle stake [--wallet <wallet>] [--json] | Read all eligible wallets, or one by main (embedded), id, address or label |
candle stake add <amount> | Stake decimal CNDL in the selected wallet |
candle stake remove <amount> | Start a withdrawal of decimal sCNDL |
candle stake finish [<withdrawal>] | Finish after the pool wait; omit only when exactly one withdrawal is ready |
candle stake claim <rewardId> | Pay the reward to its recorded owner |
candle stake claim --all | Claim all listed unclaimed rewards for the selected wallets |
Builds default to the embedded wallet; --wallet <tee> selects a TEE wallet whose relay signer
is on this machine. Ordinary linked wallets use SDK builds and external signing. Reuse
--client-stake-id <id> on a retry: the signed TEE transaction is stored before submit and a
rerun posts it to submit again without re-signing. The server reads the chain for that signature
first, so it lands once. The signed transaction is kept in the CLI operations directory for that retry.
Embedded calls replay the saved build before another balance preview.
No agent surface offers instant unstake. Pending withdrawal CNDL counts toward nothing for Pro.
sCNDL in any eligible wallet of the account earns Solana and Hood rewards and counts toward Pro.
See the staking reference.
Hyperliquid market reads (local clients)
Section titled “Hyperliquid market reads (local clients)”These are in @candledottv/cli 0.11.33, @candledottv/agent-sdk 0.6.3 and @candledottv/mcp 0.10.19.
A configured Candle agent key of any scope is required; no wallet, signer, or perps:write is needed. Without a key, these reads fail with PERPS_KEY_REQUIRED before any request. Market data goes directly from your machine to Hyperliquid’s public /info; only the gate configuration is read from Candle’s /api/v1/agent/perps/config.
CLI (all support --json) | Local MCP tool | SDK method |
|---|---|---|
candle perps markets [--sort <metric>] [--limit <1-500>] [--all] | candle_perps_markets({ sort?, limit?, all? }) | client.perpsMarkets(opts) |
candle perps market <coin> | candle_perps_market({ coin }) | client.perpsMarket(coin) |
candle perps book <coin> [--depth <1-20>] [--sig-figs <2-5>] | candle_perps_book({ coin, depth?, sigFigs? }) | client.perpsBook(coin, opts) |
candle perps candles <coin> [--interval <i>] [--count <1-5000>] [--end <time>] | candle_perps_candles({ coin, interval?, count?, end? }) | client.perpsCandles(coin, opts) |
markets defaults to all markets Candle’s build gate allows, descending by 24-hour notional volume; --all includes refused markets with reasons. --sort accepts volume, oi, funding, change or name. Name sorting is ascending; the other sorts are descending. Funding is hourly (four decimal places for %/h); APR is a simple annualization, not a forecast. OI caps are reported separately: Hyperliquid can reject OI-increasing or overly aggressive orders at the cap even when candle.tradeable is true. Tradeability is the build gate at read time, not a promise of execution. On a server/client network mismatch it is null (networkMismatch), and rows remain visible so you can inspect the selected network.
market adds margin tiers, impact prices and size/price rules. book defaults to 20 levels per side and reports spread and mid; aggregation passes nSigFigs to Hyperliquid. candles defaults to 1h and 100 candles, oldest first. Intervals: 1m 3m 5m 15m 30m 1h 2h 4h 8h 12h 1d 3d 1w 1M. End time is ISO 8601 or epoch milliseconds, no later than now. The requested window is [end - count * interval, end], using 31 days per 1M step, trimmed to the newest count. Returned volume is base volume.
Every JSON result carries network, epoch-ms readAt, gate: { minOpenInterestUsd, source }, and warnings. Decimals are strings; USD display values use two decimals. The config is read once per SDK client/local MCP configuration (once per CLI command). If unavailable, the OI floor falls back to 1,000,000 USD, labeled gate.source: "default" with a warning. Predicted-funding or OI-cap failures produce null fields and warnings; core Hyperliquid failures give retryable PERPS_UNAVAILABLE. Unknown or ambiguous coins give PERPS_MARKET_NOT_FOUND. The CLI exits 0 on success (including warnings), 1 on runtime failure, 2 on usage error.
SDK and local MCP cache market reads for five seconds; book and candle snapshots are never cached. CLI/MCP select testnet with CANDLE_HYPERLIQUID_NETWORK=testnet; SDK uses hyperliquidNetwork: "testnet". These four tools are local-only and are absent from hosted MCP tool sets. MCP uses the existing CANDLE_API_KEY or CANDLE_AGENT_API_KEY configuration, with no signer PEM required. No signing, relay or /exchange request occurs.