@axon402/init
v0.1.2
Published
One-shot AXON wallet + MCP setup CLI. Run `npx @axon402/init` to create a wallet, mint an API key, and wire up Claude Code in under 15 seconds.
Maintainers
Readme
@axon402/init
One-command AXON wallet + Claude Code MCP setup. Under 15 seconds, no clone, no config file.
AXON is a governed-payment runtime for AI agents
that need to spend money. This package is the one-command installer:
it creates a wallet, mints an API key, and wires Claude Code's MCP
config so you can start sending governed x402 payments immediately.
Install
npx @axon402/initThat's the whole thing. No global install, no clone, no .env. The
CLI walks you through one prompt (your email), generates a fresh
BIP-39 wallet locally, calls AXON's hosted Decision API at
https://api.axon402.com, and writes everything to disk.
For repeated invocations, install globally:
npm install -g @axon402/init
axonRequirements: Node.js ≥ 18 on macOS, Linux, or WSL.
What it does
When you run npx @axon402/init, the following happens — all on your
machine, in one round-trip to the AXON hosted Decision API:
- Generate a fresh wallet locally — BIP-39 mnemonic, BIP-44 derivation. Two addresses: a vault (HD index 0, where you fund USDC) and an agent (HD index 1, the spend source). The mnemonic never leaves your machine.
- Bootstrap the org + agent + mandate —
POST /v1/cli/initsends your email and the two derived addresses. The server creates a Supabase auth user (and emails you a confirmation link), an organization, both wallets, and a starter spending mandate (10 USDC/day, 0.50/tx, 300/mo, hard-stop enforcement). - Mint a wallet-scoped API key — bound to the agent wallet
(not the vault — the vault has no mandate by design). Returned to
the CLI exactly once and persisted to
~/.axon/config.jsonat chmod 0600. - Wire Claude Code's MCP config — merges an entry for the
AXON MCP server into
~/.claude.json, backing the existing file up to~/.claude.json.bak-<timestamp>first. - Print a funding QR code — scan with Coinbase Wallet, Rainbow, or any wallet app to send USDC to the vault on Base mainnet. Once the wallet is funded, your agent can start making payments.
You're now ready to run claude in the same terminal and ask your
agent to call any x402-compatible endpoint.
Flags
| Flag | Description |
| --- | --- |
| --version | Print version and exit |
| --help, -h | Print help and exit |
| --json | Machine-readable JSON output (no prompts). Suitable for scripting. The API key is intentionally NOT included in the JSON output — it's only persisted to disk. |
| --endpoint <url> | Override the Decision API endpoint. Default: https://api.axon402.com |
| --raw-qr | Encode the bare 0x… address in the QR instead of an EIP-681 URI |
| --no-open | Do not open the dashboard URL in a browser after success |
Environment variables
| Var | Description |
| --- | --- |
| AXON_ENDPOINT | Equivalent to --endpoint. Overridden by the flag. |
| AXON_CLI_DEFAULT_ENDPOINT | Same as AXON_ENDPOINT, kept for legacy reasons. |
Files written
| Path | Permissions | Contents |
| --- | --- | --- |
| ~/.axon/config.json | 0600 | { organization_id, wallet_id, api_key, funding_address, dashboard_url, created_at } |
| ~/.claude.json | unchanged | New mcpServers.axon entry merged in. The original is backed up to ~/.claude.json.bak-<unix-timestamp> before modification. |
Exit codes
| Code | Meaning | | --- | --- | | 0 | Success | | 1 | Unexpected error (network failure, server 5xx, validation crash) | | 130 | SIGINT (Ctrl+C aborted the prompt) |
Troubleshooting
Mandate missing for wallet: you're on a build older than v0.1.0 where the API key was bound to the vault wallet by mistake. Upgrade to ≥ v0.1.0 (npm install -g @axon402/init@latest) and re-run.409 CONFLICT: there's already an account with that email. The CLI prints adashboard_urlyou can sign in at to retrieve your existing API key.429 RATE_LIMITED: 10-per-hour-per-IP limit. Wait the printed number of seconds and retry.NETWORK_ERROR: the Decision API is unreachable. For local dev, set--endpoint http://localhost:3030.
Links
- Docs: https://axon402.com/docs/cli
- Dashboard: https://axon402.com
- Source: https://github.com/alex-reysa/AXON/tree/main/axon-cli
- Issues: https://github.com/alex-reysa/AXON/issues
License
Apache-2.0 — see LICENSE.
