Skip to main content
The SELAT CLI is the operator-friendly path to SELAT agent payments: bootstrap a wallet, fund a Gateway balance, and discover, rank, and pay x402 services straight from the terminal or a scripted workflow. 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.

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.
If you’re building an application, use the SELAT Router SDK instead.

Install

npm install -g @selat-ai/selat-cli
Verify the install:
selat --version   # 0.6.3
selat --help

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 agent-payment discovery skill (selat-agent-payments) — the federated catalog and intent ranking that powers selat run

Get started

The canonical first-run flow is init → fund → run.
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.
selat init
If you have no spendable USDC, init offers a small welcome drip or 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.
selat fund --chain base --amount 2
3

Discover, rank, and pay

Describe what you want in plain language. run discovers matching x402 services, ranks them, and pays for the best one in a single pipe.
selat run "summarize the latest news on gold prices"
Before depositing more than ~$20, set spending caps with selat setup-policy. If anything looks off, selat doctor diagnoses your setup in one pass.

Commands

CommandDescription
selat initFull bootstrap: skill, Circle auth, Agent Wallet, selat-pay, and config. Idempotent.
selat run "<intent>"Discover + rank + pay for an x402 service in one pipe.
selat skill <subcommand>List, install, run, and author agent skills (see below).
selat fundTop up your Gateway balance. Dry-runs first; requires explicit confirmation.
selat historyShow locally recorded Gateway micropayments.
selat setup-policySet Circle spending limits on your Agent Wallet (requires an email OTP).
selat doctorDiagnose setup problems (skill, PATH, auth, wallet, config).
selat --help, selat --versionShow help (-h) or version (-v).

selat init

Bootstraps an agent-payment setup in one flow.
FlagDescription
--forceRe-create / ensure wallets non-interactively (skips the reuse-or-create prompt).
--no-dripSkip the welcome-drip step.
--router-url=<url>Override the router URL for this run (default https://router.selat.ai). Must be https://.

selat run "<intent>"

Takes a natural-language intent (everything not starting with --) and runs the discovery skill’s ranking + payment plan against it.
selat run "find USDC price news and summarize"

selat fund

Tops up your Gateway balance. Shows the plan locally, then requires you to confirm before depositing.
FlagDefaultDescription
--chain <key>baseChain to deposit from (e.g. base, optimism, arbitrum, arc).
--amount <usd>2USDC amount to deposit. Must be a positive number.
--method <direct|eco>directdirect deposits on the chain you fund from (settles on that same chain). eco performs a gasless Eco deposit from Base, Optimism, or Arbitrum — no native gas needed in the wallet — and always settles into Circle Gateway on Polygon. eco is not supported on Arc.
selat fund --chain base --amount 2                    # direct: settles on Base
selat fund --chain optimism --amount 2 --method eco   # eco: gasless, settles on Polygon
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 Polygon regardless of the source chain.

selat history

Shows locally recorded Gateway micropayments.
FlagDefaultDescription
--address <addr>SELAT_AGENT_WALLET_ADDRESSWallet to filter by.
--chain <key>Chain key to filter by (e.g. base).
--limit <n>20Number of records to show (positive integer).
--jsonEmit structured JSON.

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.

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-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).
selat skill list --available                 # browse the catalog (with reliability badges)
selat skill install market-snapshot          # install a skill by name (or ./path)
selat skill run market-snapshot              # run it
selat skill run token-price --symbols ETH,USDC
SubcommandDescription
skill list [--available]List installed skills, or available ones (with reliability) to install.
skill install <name|path> [--force]Install a skill by name (from the registry) or a local path.
skill run <name> [--p value ...]Run an installed skill, passing its params as --flags. Payment overrides: --chain <c>, --max-amount <usd>, --raw-key.
skill new <name> [--dir <dir>] [--force]Scaffold a new skill folder (SOP layout) to contribute.
skill verify <path> [--pay] [--p value ...]Live-check each endpoint (real 402 price/rail); --pay makes a capped paid call. Also accepts --chain / --max-amount.
skill register <path> [--index <path>]Add or update the skill’s entry in index.json.
skill submit <path> [--dry-run]Open a PR to the selat-skills repo (gated on a passing verify receipt).
selat skill run web-search --query "USDC news" --chain arc --raw-key   # pay from an Arc EOA Gateway balance
selat skill verify ./skills/token-price --symbols ETH --pay            # capped real call

Configuration

selat init writes your config to $XDG_CONFIG_HOME/selat-pay/.env. You can also set these in the environment to override defaults:
VariablePurpose
SELAT_AGENT_WALLET_ADDRESSDefault wallet address (used by history and payments).
SELAT_PRIVATE_KEYSigning key for the payer, when not using a Circle Agent Wallet.
SELAT_ROUTER_URLRouter URL used at runtime (must be https://).
SELAT_DEFAULT_ROUTER_URLDefault router URL used by selat init.
SELAT_PAY_BINPath to the selat-pay binary, if not auto-resolved.
SELAT_SKILLS_DIR, SELAT_SKILLS_REPO, SELAT_SKILLS_REF, SELAT_SKILLS_RAW_BASEOverride the skills registry source.
SELAT_DEBUG=1Print stack traces on fatal errors.