Interactive setup output (abbreviated paths):
$ npx -y @swarm-api/setup
Wallet source:
[1] Generate a fresh Base wallet (recommended)
[2] Use an existing private key (0x-prefixed hex)
[3] Use an existing BIP-39 mnemonic (12 or 24 words)
> 1
✓ Generated wallet: 0xAB12…CD34
✓ Wallet saved to ~/.swarmapi/wallet.json (chmod 600)
How would you like to fund the wallet?
[1] Send USDC on Base from any wallet or exchange (recommended)
[2] Open coinbase.com — buy USDC there, then Withdraw/Send on Base
[3] Skip — I'll fund later (then run with --reuse)
> 1
Send any amount of USDC on Base mainnet to:
0xAB12…CD34
Polling Base mainnet for USDC balance (Ctrl-C is safe — wallet saved):
✓ Detected 10.000000 USDC.
✓ MCP config written to ~/.swarmapi/claude-desktop.json
Bring your own wallet, or generate a fresh one. The CLI accepts a raw private key (--key 0x...), a 12 or 24-word BIP-39 mnemonic (--mnemonic "..."), or generates one for you. Keys are written to ~/.swarmapi/wallet.json (chmod 600) before network calls — Ctrl-C during polling is safe.
Three ways to fund — pick any one:
- Send on Base — the CLI prints your address and polls. Send USDC on Base from MetaMask, Coinbase (Withdraw → Base), Binance, Phantom, treasury, or hardware wallet.
- Buy then withdraw — purchase USDC on an exchange and withdraw/send on Base to the printed address. Hosted card checkout needs a CDP
sessionToken from your backend (docs); this CLI does not embed that flow. - Bridge or swap — bridge USDC or native assets to Base via Across, the official Base bridge, or a DEX aggregator, then send to the printed address.
Power flags: --reuse, --testnet, --json, --no-poll, --no-open, --gateway, --max-spend. Run npx -y @swarm-api/setup --help.