The Solid Agent Wallet CLI. Sign x402 payments with USDC on Base from the terminal using an API key issued by the Solid app — no passkey, no OAuth, no connect-wallet.
npm install -g @solid-money/cliRequires Node.js 20+.
-
Open the Solid app → Agent Wallet tab → Generate API key.
-
Copy the key (shown once). It starts with
sk_solid_live_. -
Run:
solid login # paste your key when prompted
Alternatives:
# env var (recommended for CI / scripts)
export SOLID_API_KEY=sk_solid_live_…
# one-off
solid whoami --api-key sk_solid_live_…The config file lives at ~/.config/solid/config.json (mode 600).
| Command | Purpose |
|---|---|
solid login |
Save an API key (interactive). |
solid logout |
Remove the saved key. |
solid whoami |
Print the agent wallet address tied to the current key. |
solid wallet list |
List the agent wallet(s) bound to the current key. |
solid balance |
Read USDC balance on Base for the agent wallet. |
solid probe <url> |
Inspect a merchant's 402 challenge without paying. |
solid pay <url> |
Discover, sign, and settle an x402 payment. |
solid config show |
Show the active config (key redacted). |
solid config set <key> <value> |
Set api-key or base-url. |
All commands accept --json for machine-readable output.
$ solid whoami
Agent wallet: 0xAbC…1234
Network: Base mainnet (eip155:8453)
Asset: USDC
Key: sk_solid_live_…f9aA
$ solid wallet list --json
{
"wallets": [
{
"name": "agent",
"address": "0xAbC…1234",
"network": "eip155:8453",
"asset": "USDC"
}
]
}Exit code is non-zero (2) if the key is missing or rejected — useful for gating in scripts.
# Default: probe the URL, show what's being paid, confirm, then sign + settle.
solid pay https://ai.fuse.io/api/fuse/stats --max-usdc 0.02
# Power-user: skip discovery, sign for an explicit recipient.
solid pay https://example.com/paid --max-usdc 0.10 \
--recipient 0x… --skip-discovery
# POST with body and a custom header.
solid pay https://example.com/api/create --max-usdc 0.50 \
-X POST -d '{"title":"hi"}' -H 'X-Project: demo'
# Machine output for piping.
solid pay https://example.com/data --max-usdc 0.01 -y --json | jq .merchant.body--max-usdc is a dollar amount (decimal). The CLI converts it to atomic
USDC units (6 decimals) before sending. The backend re-runs discovery and
will reject the payment if the merchant's advertised price exceeds your
cap, or if its payTo doesn't match the recipient the CLI authorized.
End-to-end, paying the Fuse AI /api/fuse/stats endpoint ($0.01):
$ solid probe https://ai.fuse.io/api/fuse/stats
HTTP 402 from https://ai.fuse.io/api/fuse/stats
x402 version: 2
Advertised payment options:
✓ exact/eip155:8453 0x833…2913 → $0.01 to 0xDef…cAfe
$ solid pay https://ai.fuse.io/api/fuse/stats --max-usdc 0.02
? Pay $0.01 to 0xDef…cAfe for GET https://ai.fuse.io/api/fuse/stats? › yes
Paid $0.01 to 0xDef…cAfe
Tx: 0xabc…
Settled: 2026-05-25T09:58:11.142Z
Merchant: HTTP 200
Response:
{"chainId":122,"latestBlock":…}- Protocols & chains: x402 v2, exact scheme, USDC on Base mainnet
(
eip155:8453), EIP-3009 (transferWithAuthorization). The Coinbase CDP facilitator settles on the backend's behalf — the agent EOA never holds gas; only USDC float matters. - MPP: not supported in v0.1. The Solid Agent Wallet signs x402 only.
- Balance probe:
solid balancereads USDC on-chain directly via a singleeth_calltomainnet.base.org. Override with--rpc-urlorSOLID_BASE_RPC_URLif you hit rate limits. - Funding the agent wallet: open Solid app → Agent Wallet → Deposit. The CLI cannot top up the wallet — that flow needs passkey signing.
- Key management: issue and revoke keys from the Agent Wallet tab.
The CLI's API-key surface is intentionally narrow (
/agents/meread-only +/agents/me/x402-paywrite); a compromised CLI key cannot mint new keys, change the policy, or rotate the underlying EOA.
| Var | Purpose |
|---|---|
SOLID_API_KEY |
API key (overrides config file). |
SOLID_API_BASE_URL |
API base (default: https://accounts.solid.xyz/accounts/v1). |
SOLID_BASE_RPC_URL |
Custom Base RPC used by solid balance. |
XDG_CONFIG_HOME |
Where the config dir lives (default: ~/.config). |
git clone https://github.com/Solid-Money/solid-cli.git
cd solid-cli
npm install
npm run build
node dist/index.js --help