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.
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.
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 powersselat searchandselat run. Ships as a dependency of the CLI;initverifies it.
Get started
The canonical first-run flow is init → fund → run, withselat 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.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.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
Pay for the best match
run discovers matching x402 services, ranks them, and pays for the best one in a single pipe.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.
selat run "<intent>"
Takes a natural-language intent and runs the discovery skill’s ranking + payment plan against it, paying for the top match.
selat fund
Tops up your Gateway balance. Shows the plan locally, then requires you to confirm before depositing.
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 — Circle gates policy writes for security. Recommended before any deposit over ~$20.
Also sets the local quarantine period — how many days of recent charged 5xx failures (with nothing settled) keep an endpoint excluded from ranking picks. --quarantine-days <n> (whole days, 1–90; default 30) saves it to the selat config with no Circle write and no emailed code, so it works non-interactively too — given alone, the command saves it and exits without touching Circle. See First-Party Transactability for how the quarantine clock relates to the 90-day evidence window.
selat doctor
Runs a one-pass diagnosis of common setup problems (skill install, PATH, Circle auth, wallet, config). Run it whenever something looks off. Takes no flags.
Agent skills
Beyond ad-hocselat 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. You can also set these in the environment to override defaults: