selat-cli
Setup helper and runner for SELAT Agent Payments.
The package is @selat-ai/selat-cli; it installs the selat command.
Install
Install from npm:
npm install -g @selat-ai/selat-cliThat exposes the selat command on your PATH.
Then run:
selat initThat command:
- Checks your
node. - Checks whether the agent-payment skill is installed.
- Checks that Circle CLI is installed.
- Walks you through Circle Agent Wallet login (one email + one OTP code).
- Prompts to reuse your existing agent wallet or create a new one, then ensures wallets exist across all Circle-supported chains. (
--forcere-creates non-interactively.) - Checks whether
selat-payis onPATH. - Writes
~/.config/selat-pay/.envwith your router URL and wallet address. - Checks for spendable USDC — on-chain balance across Base / Optimism / Arbitrum / Polygon and your Gateway balance (broken down per chain, so you can see which chain holds it) — and, if there's none, points you to
selat fund.
Then either describe an intent and let the CLI discover + pay:
selat run "summarize the latest news on gold prices"…or install and run a packaged agent skill:
selat skill install twitter-profile-lookup
selat skill run twitter-profile-lookup --handle openaiEither way you get a real paid API response. No API keys, no manually-acquired USDC, no scheme branching, no Unix-streams jargon.
Commands
| Command | What it does |
|---|---|
selat init |
Full bootstrap. Idempotent — safe to re-run. |
selat run "<intent>" |
Discover + rank + pay in one pipe. Sugar for the discovery skill's rank.mjs --pick payment plan. |
selat skill list [--available] |
List installed skills, or the catalog of skills available to install — each with a live reliability badge (● ok / ● degraded / ● down / ○ unknown) from the selat-skills auto-verify registry. |
selat skill install <name|path> [--force] |
Install an agent skill by name (from the public selat-skills registry) or from a local path. |
selat skill run <name> [--param value ...] |
Run an installed agent skill, passing its params as --flags. |
selat fund [--chain ... --amount ... --method direct|eco] |
Top up Gateway balance. Dry-runs first; requires explicit confirm. --method direct deposits on-chain; the balance stays on the chain you deposited from. --method eco is gasless (no ETH/native gas needed) — you can source from Base, Optimism, or Arbitrum, but the resulting Gateway balance settles on Polygon regardless of source chain. After an Eco deposit, pay and check balance with --chain polygon (not the source chain), or the call fails with insufficient_balance. |
selat setup-policy |
Set Circle spending caps on your Agent Wallet. Requires an email OTP (Circle's policy-write security). Recommended before any deposit > $20. |
selat doctor |
Diagnose setup problems in one pass. Run when something looks off. |
selat --help |
This page. |
Agent skills
Beyond ad-hoc selat run, the CLI can install and run agent skills — named,
reusable recipes composed of one or more catalogue API endpoints, paid via
selat-pay and the SELAT Router. Each skill is a declarative manifest (no
executable code), so installing one only ever writes data.
selat skill list --available # browse the catalog (with reliability badges)
selat skill install twitter-profile-lookup # install a skill
selat skill run twitter-profile-lookup --handle openai # run it
selat skill run person-lookup --query "Patrick Collison Stripe"- Where skills live: skill content is maintained in the separate, public repo
SELAT-AI/selat-skills. The CLI ships
no skills itself —
selat skill installfetches the manifest on demand and anonymously overraw.githubusercontent.com(no GitHub auth required) into~/.config/selat/skills/<name>/. - Rails: a skill step is paid direct (Circle nanopayment / Gateway-batched, straight to the upstream) or routed (erc-3009 or tempo-native MPP, translated by the SELAT Router). A run prints a per-rail summary, so a skill that mixes rails reports each separately.
- Params: pass a skill's inputs as
--flags(e.g.--handle openai).--chainand--max-amountare reserved per-run overrides applied to every step. The--chainyou pay on must match the chain your Gateway balance lives on: if you funded withselat fund --method eco(source Base/Optimism/Arbitrum), that balance settles on Polygon, so use--chain polygon. Runcircle gateway balance --address <wallet> --chain polygon --allto see which chain holds your USDC —--alllists every chain, so the--chainyou pass only resolves the wallet address. - Overrides:
SELAT_SKILLS_DIRpoints at a local checkout of the skills repo (dev);SELAT_SKILLS_REPO/SELAT_SKILLS_REF/SELAT_SKILLS_RAW_BASEretarget the registry. You can alsoselat skill install ./path/to/skillfrom disk.
Skills are authored to the Agent Skill SOP:
each is a folder with SKILL.md, manifest.json, references/endpoints.md, and evals/.
What this is
selat is a thin orchestrator that wires together:
- The Circle CLI (
@circle-fin/cli) — wallet creation, MPC-backed signing, Gateway deposits. - The
selat-payCLI (SELAT-AI/selat-pay) — probe + sign + retry against the SELAT Router, with direct/routed mode auto-detect. - The discovery skill (SELAT-AI/selat-discovery) — federated catalog, intent ranking, payment-plan emission (powers
selat run). - Agent skills (SELAT-AI/selat-skills) — installable catalogue-endpoint recipes (powers
selat skill).
It doesn't reimplement any of them — it just wires them together so a new user can get from selat init to their first paid response without hand-editing config files.
Why bother
Without this wrapper, the setup ordeal is:
- Install the agent-payment skill manually.
- Install Circle CLI manually.
- Run
circle wallet login <email> --type agent— wait for email — paste OTP. - Run
node scripts/setup.mjs create(from the skill repo). - Clone
selat-router,cd selat-pay,npm install,npm link. - Write
~/.config/selat-pay/.envby hand with router URL + wallet address. - Acquire mainnet USDC.
- Deposit it through Circle Gateway.
- Then try the paid request flow.
selat init checks the required local tools and skill, handles Circle login and wallet creation, and writes the config that selat-pay consumes. It does not install global dependencies or clone the skill on your behalf.
Configuration
selat init writes:
# ~/.config/selat-pay/.env (mode 0600)
SELAT_ROUTER_URL=https://router.selat.ai # default SELAT Router
SELAT_AGENT_WALLET_ADDRESS=0xYourAgentWalletAddress # written by `selat init` from your Circle wallet
The default points at the SELAT Router at https://router.selat.ai.
Status
Working beta. selat init bootstraps a Circle Agent Wallet and writes the selat-pay config; it skips wallet creation when an agent wallet already exists (use --force to re-run). selat run "<intent>" discovers, ranks, and pays an x402 / MPP service end to end.
The selat-discovery discovery skill and selat-pay ship as npm dependencies, so npm install -g @selat-ai/selat-cli pulls everything selat run needs — no separate skill install or repo clone. (SELAT_SKILL_PATH, or a local ~/.codex/skills / ~/.claude/skills checkout, still takes precedence if you're developing the discovery skill.)
Agent skills (selat skill) are not bundled — they're installed on demand from the public SELAT-AI/selat-skills repo, so the catalog can grow without a CLI release.
License
Apache-2.0 — see LICENSE.