Skip to main content

Commands

Global Flags

Available on all commands: The CLI is long-flag only - there are no single-character aliases (not even -h/-v). --path (agent project directory, default: current dir) is on the project commands - new, pull, check, run, unwind, upload. --var KEY=VALUE (inject an environment variable into the agent, repeatable) is on upload, run, unwind.

circuit new Flags

circuit run Flags

circuit unwind Flags

unwind always runs in auto mode, so it has no --mode, --amount, or --setting. run and unwind print one transaction diagnostic per attempt, for example tx confirmed [ethereum:8453]: https://basescan.org/tx/0x... or tx failed [ethereum:8453]: <error>. Under --json these are output event envelopes in the NDJSON stream.

circuit check Flags

No command-specific flags - --path (project directory) and the global flags only.

circuit pull Flags

Used by Agent Builder’s Continue locally command:

circuit upload Flags

circuit auth token

Default prints nothing but the bare bearer token (the passkey-signed wire string), so TOKEN=$(circuit auth token) captures it for CI/CD. --json wraps the same value as { "token": "..." }. --decode prints the decoded pre-b64 permit (payload + WebAuthn proof) instead - a local decode, not a verification. circuit auth whoami shows identity + what the token grants, but never the raw token itself.

circuit kraken

circuit kraken connect seals a Kraken API credential to your Circuit account. It prompts for Credential label, Kraken API key, and Kraken private key; for headless use, set KRAKEN_CREDENTIAL_LABEL, KRAKEN_API_KEY, and KRAKEN_API_SECRET. By default the credential is connected with read and trade permissions; add --read-only to connect without trade permission. circuit kraken list prints id, label, permissions, and status. Use the id as the credential to select when starting an agent that declares [exchangeCredentials.kraken]; agents that declare trade = true also require minimumAllocationUsd in circuit.toml and a Kraken allocation at start - the user-declared Kraken allocation target for that session. The runtime exposes the selected credential as agent.credentials.kraken.

circuit check Output

Validates offline (no auth, no network):
  • circuit.toml exists at the project root (exactly one)
  • Config structure (valid circuit.toml fields)
  • DESCRIPTION.md present (optional)
  • Project structure - TypeScript (index.ts + package.json + bun.lock) or Python (main.py + pyproject.toml)
  • Settings definitions
  • Starting asset ([startingAsset]) configured
circuit check does not run a language type-checker or Python syntax check - your IDE / pre-commit hooks own that. It does provision the environment-provided SDK and install dependencies first, so editors resolve circuit:sdk / circuit_sdk again.

File Exclusion (Upload)

Automatically excluded from uploads: Additional patterns via filesToExclude in circuit.toml. TypeScript uploads require an up-to-date bun.lock.

Environment Variables

  • Source: .env in project root + --var CLI flags (flags take precedence)
  • Supported commands: run, unwind, upload
  • Local execution (run, unwind): Env vars are injected into the spawned agent process
  • Upload: Encrypted at rest, decrypted at deploy time
  • Access: process.env.KEY (TypeScript) / os.getenv("KEY") (Python)
  • Limit: 4 KB total (including system vars)
  • Rotation: Re-upload to update

Auth Storage

Credentials stored in ~/.circuit/auth.toml after circuit auth login: a passkey-signed permit (circuit_permit_<payload>.<proof>) used as the API auth token. There is no separate wallet-execution token - the api resolves wallet-signing material server-side from the permit’s wallet.sign capability. One file with a [production], [staging], or [local] section per environment - set CIRCUIT_ENV to switch which section the CLI reads. (Same single-file pattern as ~/.aws/credentials or gh hosts.yml.)

CI / headless auth

Set CIRCUIT_TOKEN to an API auth token (a passkey-signed permit) to skip circuit auth login entirely. The CLI reads this env var before looking for a config file, matching the convention used by GH_TOKEN, NPM_TOKEN, etc. Hosted-runtime commands resolve wallet-signing material from the permit, so no separate wallet-execution token is needed. Capture the token from a logged-in machine:

RPC URLs (embedded mode)

Embedded runs use the shared execution adapter’s public RPC endpoints by default. Override them when you need a private provider, deterministic endpoint, or local fork. Persistent overrides live in ~/.circuit/rpc.toml:
Network IDs follow the canonical wire format: ethereum:<chainId> for EVM, bare solana for Solana. Per-call override via --rpc <networkId>=<url> (repeatable).