Skip to main content
The SELAT CLI is the terminal operator surface for SELAT agent payments: bootstrap a wallet, fund a Gateway balance, and discover, rank, and pay x402 services from a terminal or scripted workflow. This guide covers the selat command only; it does not install or configure the Router SDK for application code. It ships as the @selat-ai/selat-cli package, which installs the selat command.
selat is the high-level CLI. Under the hood it shells out to the lower-level @selat-ai/selat-pay payer and the Circle CLI — you install only @selat-ai/selat-cli, and selat init checks for the rest and tells you how to fix anything missing.

When to use it

  • You want to test a paid endpoint manually.
  • You want a shell-based flow for operators or CI.
  • You want an agent-friendly command layer without writing a custom client first.
For a TypeScript application integration, use the separate SELAT Router SDK documentation. Do not combine its package installation or signer setup with this terminal workflow.

Install

Verify the install:

Prerequisites

selat init checks these for you and tells you how to fix anything missing, but for reference the CLI needs:
  • Node.js 18 or newer
  • The Circle CLI (@circle-fin/cli) — wallet creation, MPC-backed signing, and Gateway deposits
  • The discovery skill (@selat-ai/selat-discovery) — the federated catalog and intent ranking that powers selat search and selat run. Ships as a dependency of the CLI; init verifies it.

Get started

The canonical first-run flow is init → fund → arm a budget → run, with selat search as the free preview of what run would pick.
1

Bootstrap your setup

selat init is idempotent — safe to re-run. It checks prerequisites, walks you through Circle Agent Wallet login (one email + one OTP), ensures agent wallets exist, and writes your config.
If you have no spendable USDC, init points you to selat fund.
2

Fund your Gateway balance

Top up the Gateway balance your payments draw from. fund previews the deposit and requires an explicit confirmation before moving anything ($0.50 minimum deposit). Prefer to buy with a card instead? selat fund --onramp mints a Circle Onramp browser-widget link — no deposit happens on the CLI side.
3

Discover and rank — for free

Describe what you want in plain language. search runs the same discovery and ranking as run, but stops before payment — no wallet, no spend.
4

Arm a session budget

Paid calls (run, skill run, compare --pay, verify --pay) refuse to execute until a session budget is armed. This is a separate, required gate from the wallet’s own Circle spending policy.
5

Pay for the best match

run discovers matching x402 services, ranks them, and pays for the best one in a single pipe — capped at $1.10 per call by default.
Before depositing more than ~$20, set spending caps with selat setup-policy. If anything looks off, selat doctor diagnoses your setup in one pass. Need to stop everything immediately — misbehaving agent, lost oversight, anything? selat freeze refuses all funding and paid calls from this CLI until you selat unfreeze.

Spending caps

A runaway agent is stopped at four independent scopes — none can be raised by anything running inside an agent session:

Commands

selat init

Bootstraps an agent-payment setup in one flow.

selat search "<intent>"

Runs the free front half of selat run: discovers matching endpoints across the federated catalogs and ranks them for the intent, without touching a wallet. No payment path exists in this command.
When an installed vetted skill (selat skill list --available) is a strong textual match for the intent, search surfaces it as a separate callout above the federated shortlist — a suggestion, never enforced.

selat run "<intent>"

Takes a natural-language intent and runs the discovery skill’s ranking + payment plan against it, paying for the top match. Requires an armed session budget (selat budget start) — see Spending caps.
Unknown flags are a hard error on run, not treated as intent text — this command spends real money, and silently dropping a flag like --dry-run would mean paying when you asked not to.

selat fund

Tops up your Gateway balance. Shows the plan locally, then requires you to confirm before depositing. Refused while selat freeze is on.
Settlement chain depends on the method: a direct deposit lands in Gateway on the chain you deposited from, while an eco deposit always lands in Gateway on Arc regardless of the source chain.

Buy USDC with a card (Onramp)

No crypto yet? selat fund --onramp lets you start from a debit or credit card. It mints a one-time Circle Onramp session through the SELAT catalog (free; the Onramp key stays server-side) and gives you a browser link. You pick the amount and pay inside Circle’s widget — the CLI never sees your card, never prompts for an amount, and moves no money itself.
Funding by card is two steps:
1

Buy USDC in the widget

Run selat fund --onramp. In a terminal it offers to open the link in your browser; in an agent (non-interactive) shell it prints the link for the agent to relay into chat. Links expire after about 30 minutes — re-run the command any time for a fresh one.The session is scoped to USDC only, on the chains selat fund can deposit from: Base, Ethereum, Arbitrum, Polygon, Avalanche, Unichain, and Arc. (Circle’s widget doesn’t carry USDC on Optimism, so it isn’t offered.) The purchase lands on-chain in your agent wallet on the chain you choose.
2

Deposit it into Gateway

Once the purchase has landed on-chain, deposit it into your Gateway balance like any other USDC — pass --chain for the chain you bought on:
The widget’s identity check (KYC) may continue on your phone. When it asks for an email, use the same email as your Circle Agent Wallet login — a different email breaks the link between the verified identity and the wallet being funded. The CLI prints your login email next to the link when it can read it.
A few more things to know:
  • First run. selat init offers the same path when your wallet is empty — answer card at the send / card / skip prompt.
  • Other wallets. --address funds any agent wallet. If it isn’t the configured SELAT wallet, the CLI warns you — paid calls still spend from the configured wallet.
  • Kill switch. --onramp is refused while selat freeze is on, like every other funding path.
  • Not Transak. This is SELAT’s built-in onramp. Circle CLI’s circle wallet fund --method fiat is a different, Transak-backed onramp.
  • If the link can’t be minted (catalog unreachable), the command exits with an error — crypto funding with selat fund --amount <usd> still works.

selat refund claim | query <quote-id>

Files or checks a refund claim for a prior settled quote (a selatx… ID from a paid call’s receipt), authenticated through selat-pay with a signed wallet-ownership proof (an EIP-712 signature that can’t move funds). This is authentication, not a payment — it doesn’t touch the session budget or --max-amount. Every claim is reviewed; what comes back depends on whether the upstream captured the payment — see Refunds follow capture.

selat budget

Read-only view of the wallet’s Circle spending caps and the remaining per-window budget, plus the commands to arm or disarm the session spending tripwire that paid calls require. See Spending caps for how this fits with selat setup-policy and selat freeze.

selat freeze / selat unfreeze

A local, instant kill switch — no Circle round-trip. While frozen, this CLI refuses selat fund (deposits and --onramp) and any paid call; selat-pay also refuses to sign. Free discovery (search, skill list, doctor) keeps working. It does not touch Circle wallet policy, which stays governed by selat setup-policy.

selat history

Shows locally recorded Gateway micropayments.

selat spend

Prints a unified, read-only spend report: settled spend from the local selat-pay ledger plus Apify prepaid-token utilization from the token store.

selat setup-policy

Interactively sets Circle spending caps (per-transaction, daily, weekly, monthly) on your Agent Wallet. Requires an email OTP per chain — Circle gates policy writes for security, and there is no batch write. Recommended before any deposit over ~$20. With all four caps given as flags, the prompts are skipped and the only interactive step left is Circle’s emailed code(s).

selat doctor

Runs a one-pass diagnosis of common setup problems (skill install, PATH, Circle auth, wallet, config, catalog freshness).

Agent skills

Beyond ad-hoc selat run, the CLI can install and run agent skills — named, reusable payment recipes from the public selat-skills registry (or a local path).

Configuration

selat init writes your config to $XDG_CONFIG_HOME/selat-pay/.env (mode 0600). Values are layered: shell env > cwd .env > this file. You can also set these in the environment to override defaults:
There is no raw-private-key signing path in the current CLI — every signature goes through the Circle Agent Wallet. SELAT_SESSION_BUDGET in the shell env or a cwd .env cannot arm or invent a session budget either; only selat budget start --amount <usd> (writing session.json) does that. See Spending caps.