{
  "markdown": "# Zerion CLI\n\nCLI for [Zerion Wallet](https://zerion.io). Analyze wallets, sign, swap, and bridge on-chain with agent-managed wallets across EVM chains and Solana, all from the command line. Wallet management is built on the [Open Wallet Standard](https://github.com/open-wallet-standard/core).\n\n> [!NOTE]\n> **Alpha Preview** — This CLI is under active development. Commands, flags, and output formats may change or be removed without notice between releases. Do not depend on current behavior in production workflows.\n\n## Installation\n\nSet up everything in one command (install CLI globally, configure your API key, and add skills to your coding agents):\n\n```bash\nnpx zerion-cli init\n```\n\n- authenticates in the browser via [dashboard.zerion.io](https://dashboard.zerion.io) and saves the key for you — no copy/paste\n- detects your coding agent (Claude Code, Cursor, Codex, Gemini) and installs the Zerion skills globally\n- add `-y` to skip the prompts: browser login, then every skill installed\n\nOn a remote or headless host, add `--no-open` to print the authorize URL instead of opening a browser. Without a terminal (CI, piped), `init` prints API-key instructions rather than waiting on a browser login — set `ZERION_API_KEY` there instead.\n\nOr just install the CLI without setup:\n\n```bash\nnpm install -g zerion-cli\n```\n\nThe CLI is available as either `zerion` or `zerion-cli` — both run the same binary.\n\nRequires Node.js 20 or later.\n\n## Agent skill\n\nOne skill, [`zerion`](./skills/zerion/SKILL.md), under [`./skills/zerion/`](./skills/zerion/) — follows the [agentskills.io](https://agentskills.io) open standard. All capabilities and partner integrations live as nested files that load on demand (progressive disclosure), so a single install + single picker entry exposes everything below.\n\n### Capabilities (`skills/zerion/capabilities/`)\n\n| File | What it covers |\n|------|----------------|\n| [`analyze.md`](./skills/zerion/capabilities/analyze.md) | Portfolio, positions, history, PnL, token search, watchlist (read-only; supports x402 / MPP) |\n| [`trading.md`](./skills/zerion/capabilities/trading.md) | Swap, bridge, send tokens (on-chain actions; needs API key + agent token) — plus the signing-route model: local signing vs. web-app handoff for human review |\n| [`bundle.md`](./skills/zerion/capabilities/bundle.md) | Queue several actions into one signing session / one human review (`--prepare` + `bundle`) |\n| [`sign.md`](./skills/zerion/capabilities/sign.md) | Off-chain signing — sign-message (EIP-191 / raw), sign-typed-data (EIP-712) |\n| [`wallet.md`](./skills/zerion/capabilities/wallet.md) | Wallet management — create, import, add read-only, list, fund, review threshold, backup, export-key, delete, sync |\n| [`agent-management.md`](./skills/zerion/capabilities/agent-management.md) | Agent tokens + policies (the autonomous-trading primitives) |\n| [`swap-0x.md`](./skills/zerion/capabilities/swap-0x.md) | Token swaps via 0x API v2 — AllowanceHolder, Permit2, and Gasless flows across 20+ EVM chains |\n\n### Partner integrations (`skills/zerion/partners/`)\n\nEcosystem partners that combine their product with the Zerion CLI. See [`partner-skill-creator.md`](./skills/zerion/partner-skill-creator.md) to contribute one. Loaded only when the user names the partner.\n\n| File | What it covers | Partner |\n|------|----------------|---------|\n| [`bankr.md`](./skills/zerion/partners/bankr.md) | Twitter/X-native trading bot patterns | [Bankr](https://bankr.bot) |\n| [`lifi-earn.md`](./skills/zerion/partners/lifi-earn.md) | Cross-chain yield routing | [Li.Fi](https://li.fi) |\n| [`monad-addresses.md`](./skills/zerion/partners/monad-addresses.md) | Canonical Monad mainnet contract addresses for `zerion agent create-policy --allowlist` lockdown | [Monad](https://monad.xyz) |\n| [`moonpay-onramp.md`](./skills/zerion/partners/moonpay-onramp.md) | Buy crypto with card or bank transfer via MoonPay, then trade with Zerion | [MoonPay](https://moonpay.com) |\n| [`moonpay-iron.md`](./skills/zerion/partners/moonpay-iron.md) | USD bank-wire to Iron virtual account (IBAN/ACH) → USDC → DCA via Zerion | [MoonPay](https://moonpay.com) |\n| [`moonpay-predict.md`](./skills/zerion/partners/moonpay-predict.md) | Trade prediction markets (Polymarket, Kalshi) via MoonPay CLI | [MoonPay](https://moonpay.com) |\n| [`sendai-ideas.md`](./skills/zerion/partners/sendai-ideas.md) | Crypto idea discovery, validation, competitive landscape, DeFi TVL research | [SendAI](https://github.com/sendaifun/solana-new) (MIT) |\n| [`somnia-blockchain.md`](./skills/zerion/partners/somnia-blockchain.md) | Somnia L1 reference — network info, gas model, deployment guidance | [Somnia](https://somnia.network) |\n| [`somnia-reactivity.md`](./skills/zerion/partners/somnia-reactivity.md) | Somnia Reactivity — event-driven pub/sub, WebSocket + Solidity handlers | [Somnia](https://somnia.network) |\n| [`trails-crosschainswap.md`](./skills/zerion/partners/trails-crosschainswap.md) | Cross-chain swaps to/from Polygon via Trails SDK (Widget / Headless / API) | [Trails](https://docs.trails.build) |\n| [`trails-deposit.md`](./skills/zerion/partners/trails-deposit.md) | Bridge + DeFi vault deposit on Polygon in one intent (Aave, Morpho, ERC-4626) | [Trails](https://docs.trails.build) |\n| [`umbra-privatetxn.md`](./skills/zerion/partners/umbra-privatetxn.md) | Private (stealth-address) transfers | [Umbra](https://umbra.cash) |\n| [`uniswap-lp.md`](./skills/zerion/partners/uniswap-lp.md) | Liquidity position management | [Uniswap](https://uniswap.org) |\n| [`uniswap-x402.md`](./skills/zerion/partners/uniswap-x402.md) | Swap with x402 pay-per-call | [Uniswap](https://uniswap.org) |\n| [`vaultsfyi-*.md`](./skills/zerion/partners/) | Deposit, market intel, rebalance, risk monitor, strategist, watchlist, yield optimizer | [Vaults.fyi](https://vaults.fyi) |\n| [`yellow-settlement-room.md`](./skills/zerion/partners/yellow-settlement-room.md) | Multiparty off-chain settlement rooms | [Yellow](https://yellow.org) |\n| [`consolidate.md`](./skills/zerion/partners/consolidate.md) | Sweep all tokens on a chain into one target | Zerion |\n| [`treasury-liquidation.md`](./skills/zerion/partners/treasury-liquidation.md) | Drain a wallet across all chains, and/or sweep a whole multi-chain portfolio into one token | Zerion |\n\n### Install via zerion CLI (recommended)\n\n```bash\nzerion setup skills\n```\n\nInstalls globally across all detected coding agents. Use `--agent <name>` to scope to one agent, or `-g` to force a global install.\n\n### Install via Claude Code\n\n```text\n/plugin marketplace add zeriontech/zerion-ai\n/plugin install zerion-agent@zerion\n```\n\n### Install via Cursor\n\nInstall `zerion-agent` from the [Cursor Marketplace](https://cursor.com/marketplace): open **Customize** in the sidebar, find **Zerion**, then **Install** and pick project or user scope.\n\nThe plugin ships the `zerion` skill plus the hosted Zerion API docs MCP server (`https://developers.zerion.io/mcp`), so the agent can look up endpoint reference without leaving the editor.\n\n### Install via OpenAI Codex CLI\n\n```sh\ncodex plugin marketplace add zeriontech/zerion-ai\n```\n\nThen run `/plugins` in Codex, choose the `zerion` marketplace, and install `zerion-agent`.\n\n### Install via Gemini CLI\n\n```bash\ngemini extensions install https://github.com/zeriontech/zerion-ai\n```\n\n### Install via agentskills.io (works with 20+ popular agents)\n\n```bash\nnpx skills add zeriontech/zerion-ai\n```\n\nAuto-detects installed agents. Flags: `-g` (user-wide), `-a <agent>` (target one host), `-y` (non-interactive). Full ecosystem: <https://agentskills.io/clients>.\n\n## How to use\n\nAfter install, ask the agent in natural language.\n\n### Wallet analysis\n\n> Analyze the wallet `vitalik.eth`. Summarize total portfolio value, top 5 holdings, and recent transactions.\n\n> What's the PnL on `0xFe89Cc7Abb2C4183683Ab71653c4cCd1b9cC194e` over the last 30 days?\n\n> Show DeFi positions (lending, staking, LP) for my default wallet.\n\n### Trading\n\n> Swap 100 USDC to ETH on Base.\n\n> Bridge 50 USDC from Arbitrum to Optimism.\n\n> Send 0.1 ETH on Base to `vitalik.eth`.\n\n> Sell my USDC and DAI on Base into ETH — one signing session for both.\n\n### Human review\n\n> Ask me before anything over $500 from `bot-1`.\n\n> Track my Ledger address as `cold` and swap 1 ETH to USDC from it — I'll sign in the browser.\n\n### Wallet management\n\n> Create a new encrypted wallet called `bot-1`.\n\n> Set up an agent token for `bot-1` that's allowed to swap on Base only, with a 7-day expiry.\n\n> List my wallets and which agent tokens are active.\n\n### Signing\n\n> Sign the EIP-712 message in `typed.json` using my `bot-1` wallet.\n\nThe agent reaches for the `zerion` skill, which routes by task to the right nested file under `capabilities/` or `partners/`. Progressive disclosure means only the matching capability doc loads — context stays clean. A \"create wallet, set up agent token, then swap\" flow Reads `capabilities/wallet.md` → `capabilities/agent-management.md` → `capabilities/trading.md` in sequence.\n\n## Manual setup, agent execution\n\nZerion CLI splits into two surfaces, by design.\n\n- **Wallet management and agent token setup are manual.** `wallet create`, `import`, `backup`, `export-key`, and `delete` all prompt for a passphrase. `wallet sync` emits a QR code you scan with the Zerion app. `agent create-token` mints a scoped trading credential bound to a specific wallet, and `agent create-policy` attaches the rules it has to obey — allowed chains, expiry, transfer/approval gates, contract allowlists. The sibling admin commands (`agent list-tokens`, `use-token`, `revoke-token`, `list-policies`, `show-policy`, `delete-policy`) are also gestures you make yourself. No key material moves and no spending credential widens without you in the loop. For CI and headless servers, `agent create-token` accepts `--passphrase-file <path>` (file must be mode `0600`) so token issuance can be scripted without an interactive TTY — see [`capabilities/agent-management.md`](./skills/zerion/capabilities/agent-management.md).\n- **Analysis, signing, trading, and discovery are for agents.** `analyze`, `portfolio`, `positions`, `history`, `pnl`, `sign-message`, `sign-typed-data`, `swap`, `bridge`, `send`, `swap tokens`, `search`, `chains`, `wallet list`, `wallet fund`, and `watch list` emit JSON to stdout, structured errors to stderr, and skip confirmation dialogs. Once an agent token is configured, signing and trading fire immediately — the token authorizes operations on behalf of the wallet without a passphrase prompt.\n- **You can put yourself back in the loop, per wallet.** Unattended signing is the default, not the only mode: a **read-only wallet** (`wallet add` — an address with no keys here) or a **review threshold** (`wallet set-review-threshold`) sends the affected transactions to the Zerion web app for a human to review and sign in a browser, instead of auto-signing. Agent policies say what the token may never do; the review threshold says what you want to be asked about. See [Signing routes](#signing-routes--local-signing-vs-web-app-handoff).\n\nSetup gestures (`init`, `setup skills`, `config set/unset/list`, `watch` add/remove) are one-time configuration steps you run yourself before automation takes over.\n\nThe split is the point. You stage by hand once — create or import a wallet, set a passphrase, mint an agent token, attach a policy — then hand the agent token to an automation that can only do what the policy allows. Treat agent tokens like API keys with spending power; use [agent policies](#agent-policies) to scope them down to specific chains, addresses, or expiry windows.\n\n## Authentication\n\nThree options. The CLI auto-detects which is active.\n\n### A) API key (recommended)\n\nGet a key at **[dashboard.zerion.io](https://dashboard.zerion.io)** — it's free and takes a minute. Keys begin with `zk_`.\n\nThe fastest way is **browser login** — like `claude` or `gh auth login`, it opens the dashboard, you approve, and the key is captured over a local loopback redirect and saved to config. The key never leaves your machine.\n\n```bash\nzerion login              # pick browser login, paste a key, or pay-per-call\nzerion login --browser    # go straight to browser authentication\n```\n\nOr set / persist a key manually:\n\n```bash\nexport ZERION_API_KEY=\"zk_...\"     # per-session\nzerion config set apiKey zk_...    # persisted to ~/.zerion/config.json\n```\n\n- HTTP Basic Auth\n- Required for analysis and trading commands (analysis can also use x402 / MPP pay-per-call instead — see options B and C)\n\n### B) x402 pay-per-call\n\n**No API key needed.** Pay $0.01 USDC per request via the [x402 protocol](https://www.x402.org/). Supports EVM (Base) and Solana.\n\n> Pay-per-call applies to analytics commands only (`portfolio`, `positions`, `history`, `pnl`, `analyze`). Trading commands always use an API key.\n\n```bash\nexport WALLET_PRIVATE_KEY=\"0x...\"     # EVM (Base) — 0x-prefixed hex\nexport WALLET_PRIVATE_KEY=\"5C1y...\"   # Solana — base58 encoded keypair\n\nzerion analyze 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --x402\n# or enable globally:\nexport ZERION_X402=true\n```\n\nBoth chains simultaneously:\n\n```bash\nexport EVM_PRIVATE_KEY=\"0x...\"\nexport SOLANA_PRIVATE_KEY=\"5C1y...\"\nexport ZERION_X402_PREFER_SOLANA=true   # optional, prefers Solana when both set\n```\n\n### C) MPP pay-per-call\n\n**No API key needed.** Pay $0.01 USDC per request via the [MPP protocol](https://mpp.dev) on [Tempo](https://tempo.xyz). EVM only.\n\n```bash\nexport WALLET_PRIVATE_KEY=\"0x...\"   # EVM key with USDC on Tempo\n# or use a dedicated key:\nexport TEMPO_PRIVATE_KEY=\"0x...\"\n\nzerion portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --mpp\n# or enable globally:\nexport ZERION_MPP=true\n```\n\n## Commands\n\nEvery command supports `--help` for full flag documentation. Run `zerion --help` for the top-level command list.\n\n### Wallet Analysis\n\nRead-only. Supports `--x402` and `--mpp` for pay-per-call.\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion analyze <address\\|ens>` | Full analysis — portfolio, positions, transactions, PnL in parallel | `zerion analyze vitalik.eth` |\n| `zerion portfolio <address\\|ens>` | Portfolio value and top positions | `zerion portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045` |\n| `zerion positions <address\\|ens>` | Token + DeFi positions (`--positions all\\|simple\\|defi`, or `--defi` for grouped-by-protocol view with loans netted) | `zerion positions vitalik.eth --defi` |\n| `zerion history <address\\|ens>` | Transaction history (`--limit`, `--chain`) | `zerion history vitalik.eth --limit 10 --chain ethereum` |\n| `zerion pnl <address\\|ens>` | Profit & loss (realized, unrealized, fees) | `zerion pnl vitalik.eth` |\n| `zerion search <query>` | Search tokens by name or symbol | `zerion search USDC` |\n| `zerion chains` | List supported chains | `zerion chains` |\n\n### Trading\n\nRequires an API key (or agent token for unattended use).\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion swap <chain> <amount> <from-token> <to-token>` | Same-chain swap | `zerion swap base 1 USDC ETH` |\n| `zerion swap solana <amount> <from-token> <to-token>` | Solana same-chain swap | `zerion swap solana 0.1 SOL USDC` |\n| `zerion swap tokens [chain]` | List tokens available for swap | `zerion swap tokens solana` |\n| `zerion bridge <from-chain> <from-token> <amount> <to-chain> <to-token>` | List all bridge providers (no execute, multi-offer case) | `zerion bridge base USDC 5 arbitrum USDC` |\n| `zerion bridge … --cheapest` | Execute highest-output bridge route | `zerion bridge base USDC 5 arbitrum USDC --cheapest` |\n| `zerion bridge … --fast` | Execute lowest-time bridge route | `zerion bridge base USDC 5 arbitrum USDC --fast` |\n| `zerion bridge … --to-wallet <name>` | Bridge with explicit destination wallet (Solana ↔ EVM) | `zerion bridge ethereum USDC 5 solana USDC --to-wallet sol-bot --cheapest` |\n| `zerion bridge … --to-address <addr>` | Bridge to a raw destination address | `zerion bridge ethereum USDC 5 solana USDC --to-address 8xLdox… --cheapest` |\n| `zerion send <token> <amount> --to <address> [--chain <chain>]` | Send tokens (chain auto-detected from address format) | `zerion send usdc 50 --to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --chain base` |\n| `zerion send SOL <amount> --to <solana-pubkey>` | Send native SOL on Solana | `zerion send SOL 0.1 --to 2Nsnn…` |\n| `zerion <send\\|swap\\|bridge\\|consolidate> … --prepare` | Build + gate a command but print a prepared-group envelope (JSON) instead of executing — for `zerion bundle` | `zerion swap base 100 USDC ETH --prepare` |\n| `zerion bundle --group <envelope> [--group …]` | Sign several prepared groups together — one web-app handoff when any group needs review, else locally. Same signer address (chains may differ); per-group results; always exits 0 | `zerion bundle --group \"$(zerion swap base 100 USDC ETH --prepare)\" --group \"$(zerion send USDC 20 --to 0xBob --chain base --prepare)\"` |\n\n### Signing routes — local signing vs. web-app handoff\n\nEvery trade (and every message signature) takes one of two routes, decided automatically **before**\nanything is signed:\n\n- **Local signing (default)** — the CLI signs with the agent token as passphrase and broadcasts. One shot, unattended.\n- **Web-app handoff** — the CLI encodes the transaction into an `app.zerion.io` link, opens a browser,\n  and **blocks** until a human signs there (default 300s, `--timeout` to change). The URL is also printed to\n  stderr, so headless/agent environments can hand it to the user. Nothing is signed locally; no agent token needed.\n\nThe handoff fires when any trigger hits:\n\n| Trigger | Set by |\n|---------|--------|\n| Read-only wallet (no key material) | `zerion wallet add <address\\|ens> --name <name>` |\n| Sell-side USD value over the wallet's review threshold — **trades only** | `zerion wallet set-review-threshold <wallet> <usd\\|off>` |\n| Explicit force | `--review` |\n\nMessages have no USD value, so `sign-message` / `sign-typed-data` ignore the threshold — only the\nread-only and `--review` triggers apply there.\n\nBoth routes run the same pre-flight (balance gates, blocking-quote checks, agent policies), and every\ntrade prints `Signing route: <route> — <reason>` to stderr plus `signedVia: \"local\" | \"web-app\"` in its\nJSON output. If a threshold is set but the value can't be priced, the trade **fails closed** to review.\nA handoff ends `completed` / `rejected` / `failed` / `timeout` (or `aborted` on Ctrl-C), reported as\n`status` in that same JSON — only `completed` exits 0.\n\nThe threshold is a **per-transaction** ceiling. `consolidate --execute` is therefore always local: a sweep\nis N independent transactions, and rows that are each under the threshold don't aggregate into a review\n(it also needs key material, so it can't run on a read-only wallet). To have a whole sweep judged and\nsigned as one entity, run it through\n`zerion bundle --group \"$(zerion consolidate <chain> <token> --prepare)\"`. Full reference:\n[`capabilities/trading.md`](./skills/zerion/capabilities/trading.md) and\n[`capabilities/bundle.md`](./skills/zerion/capabilities/bundle.md).\n\n### Wallet Management\n\n**Keystore wallets** (encrypted on this machine), plus **read-only wallets** that sign via the web app. EVM + Solana supported. Passphrase required for all destructive ops.\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion wallet create --name <name>` | Create encrypted wallet (EVM + Solana) | `zerion wallet create --name trading-bot` |\n| `zerion wallet import --name <name> --evm-key` | Import from EVM private key (interactive) | `zerion wallet import --name old-wallet --evm-key` |\n| `zerion wallet import --name <name> --sol-key` | Import from Solana private key (interactive) | `zerion wallet import --name sol-bot --sol-key` |\n| `zerion wallet import --name <name> --mnemonic` | Import from seed phrase (all chains) | `zerion wallet import --name backup --mnemonic` |\n| `zerion wallet add <address\\|ens> --name <name>` | Add a read-only wallet — address only, no keys (0x, ENS, or Solana base58). Reads work normally; **all signing hands off to the web app** | `zerion wallet add vitalik.eth --name vitalik` |\n| `zerion wallet set-review-threshold <wallet> <usd\\|off>` | Route trades whose sell-side value exceeds `<usd>` to the web app for human review instead of auto-signing (`off` clears it) | `zerion wallet set-review-threshold trading-bot 500` |\n| `zerion wallet list` | List all wallets (keystore + read-only) | `zerion wallet list` |\n| `zerion wallet fund` | Show deposit addresses for funding | `zerion wallet fund --wallet trading-bot` |\n| `zerion wallet backup --wallet <name>` | Export recovery phrase | `zerion wallet backup --wallet trading-bot` |\n| `zerion wallet export-key --wallet <name> [--chain evm\\|solana\\|all] [--index N]` | Export raw private key(s) derived from mnemonic — EVM (0x hex) and/or Solana (base58 Phantom format + 32-byte ed25519 seed). Output is stderr-only. | `zerion wallet export-key --wallet trading-bot --chain evm` |\n| `zerion wallet delete <name>` | Permanently delete a wallet (requires passphrase) | `zerion wallet delete trading-bot` |\n| `zerion wallet sync --wallet <name>` | Sync wallet to Zerion app via QR code | `zerion wallet sync --wallet trading-bot` |\n| `zerion wallet sync --all` | Sync all wallets to Zerion app | `zerion wallet sync --all` |\n\n### Signing\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion sign-message <message> --chain <chain>` | Sign EIP-191 (EVM) or raw (Solana) message | `zerion sign-message \"Login to dApp\" --chain ethereum` |\n| `zerion sign-message <message> --encoding hex` | Treat message as hex bytes | `zerion sign-message 0xdeadbeef --encoding hex --chain ethereum` |\n| `zerion sign-typed-data --data '<json>'` | Sign EIP-712 typed data (EVM only) | `zerion sign-typed-data --data \"$(cat permit.json)\"` |\n| `zerion sign-typed-data --file <path>` | Read EIP-712 typed data from file | `zerion sign-typed-data --file permit.json` |\n| `cat typed.json \\| zerion sign-typed-data` | Read EIP-712 typed data from stdin | `cat permit.json \\| zerion sign-typed-data` |\n\n### Agent Tokens\n\nScoped API tokens for unattended trading. Token auto-saves to config; required for `swap`, `bridge`, `send`.\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion agent create-token --name <bot> --wallet <wallet>` | Create scoped token (interactive passphrase) | `zerion agent create-token --name dca-bot --wallet trading-bot` |\n| `zerion agent create-token … --passphrase-file <path>` | Non-interactive: passphrase read from a `chmod 600` file (CI / headless) | `zerion agent create-token --name dca-bot --wallet trading-bot --policy <id> --passphrase-file /run/zerion/pass` |\n| `zerion agent list-tokens` | List active agent tokens | `zerion agent list-tokens` |\n| `zerion agent use-token --wallet <wallet>` | Switch active token by wallet | `zerion agent use-token --wallet trading-bot` |\n| `zerion agent revoke-token --name <bot>` | Revoke a token | `zerion agent revoke-token --name dca-bot` |\n\n### Agent Policies\n\nRestrict what an agent token can do — chains, expiry, transfers, approvals, allowlists.\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion agent create-policy --name <policy>` | Create security policy (flags below) | `zerion agent create-policy --name safe-base --chains base --expires 24h --deny-transfers` |\n| `zerion agent list-policies` | List all policies | `zerion agent list-policies` |\n| `zerion agent show-policy <id>` | Show policy details | `zerion agent show-policy safe-base` |\n| `zerion agent delete-policy <id>` | Delete a policy | `zerion agent delete-policy safe-base` |\n\nPolicy flags:\n\n| Flag | Description |\n|------|-------------|\n| `--chains <list>` | Restrict to specific chains (comma-separated) |\n| `--expires <duration>` | Token expiry (e.g. `24h`, `7d`) |\n| `--deny-transfers` | Block raw ETH/native transfers |\n| `--deny-approvals` | Block ERC-20 approval calls |\n| `--allowlist <addresses>` | Only allow listed contract/wallet addresses |\n\n### Watchlist\n\nTrack wallets by name without exposing addresses in commands.\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion watch <address> --name <label>` | Add wallet to watchlist | `zerion watch 0xFe89Cc7Abb2C4183683Ab71653c4cCd1b9cC194e --name ens-dao` |\n| `zerion watch list` | List watched wallets | `zerion watch list` |\n| `zerion watch remove <name>` | Remove from watchlist | `zerion watch remove ens-dao` |\n| `zerion analyze <name>` | Analyze a watched wallet by name | `zerion analyze ens-dao` |\n\n### Setup\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion login` | Authenticate — browser (dashboard) login, paste an API key, or pay-per-call | `zerion login` |\n| `zerion login --browser` | Browser auth: opens dashboard.zerion.io, captures the key via loopback | `zerion login --browser` |\n| `zerion init` | One-shot onboarding — install CLI globally, browser login, install agent skills | `npx zerion-cli init` |\n| `zerion init -y` | Same, without prompts: browser login, then install every skill | `zerion init -y` |\n| `zerion init --no-open` | Print the authorize URL instead of opening a browser (remote / headless) | `zerion init --no-open` |\n| `zerion setup skills` | Install Zerion agent skills into detected coding agents | `zerion setup skills` |\n| `zerion setup skills --agent claude-code` | Install into a specific agent | `zerion setup skills --agent claude-code` |\n\n### Configuration\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `zerion config set <key> <value>` | Set config (`apiKey`, `defaultWallet`, `defaultChain`, `slippage`) | `zerion config set defaultChain base` |\n| `zerion config unset <key>` | Remove a config value (resets to default) | `zerion config unset defaultChain` |\n| `zerion config list` | Show current configuration | `zerion config list` |\n\nPer-wallet review thresholds also live in `~/.zerion/config.json`, but are set with their own command\nrather than `config set` — see [`zerion wallet set-review-threshold`](#wallet-management).\n\n## Global Flags\n\n| Flag | Description |\n|------|-------------|\n| `--wallet <name>` | Source wallet (default: from config) |\n| `--address <addr\\|ens>` | Use raw address or ENS name |\n| `--watch <name>` | Use watched wallet by name |\n| `--chain <chain>` | Chain for analysis commands (default: `ethereum`) |\n| `--to-wallet <name>` | Destination wallet for `bridge` (Solana ↔ EVM) |\n| `--to-address <addr>` | Destination address for `bridge` (must match destination-chain format) |\n| `--positions all\\|simple\\|defi` | Filter positions type |\n| `--defi` | On `positions`: shorthand for `--positions defi` with output grouped by protocol (LP tokens pooled by `group_id`, loans netted in `net_value`) |\n| `--limit <n>` | Limit results (default: 20 for list ops) |\n| `--offset <n>` | Skip first N results (pagination) |\n| `--search <query>` | Filter wallets by name or address |\n| `--slippage <percent>` | Slippage tolerance (default: 2%) |\n| `--review` | Force this trade to the web app for human review instead of auto-signing (see [Signing routes](#signing-routes--local-signing-vs-web-app-handoff)) |\n| `--prepare` | On `send`/`swap`/`bridge`/`consolidate`: print a prepared-group envelope instead of executing — the input to `zerion bundle` |\n| `--timeout <sec>` | Wait budget: broadcast confirmation on the local route (default 120), or the browser-callback wait on a web-app handoff (default 300) |\n| `--x402` | Pay-per-call on Base or Solana (analytics only) |\n| `--mpp` | Pay-per-call on Tempo (analytics only) |\n| `--json` | JSON output (default) |\n| `--pretty` | Human-readable output |\n| `--quiet` | Minimal output |\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `ZERION_API_KEY` | API key (get at [dashboard.zerion.io](https://dashboard.zerion.io)) |\n| `WALLET_PRIVATE_KEY` | Pay-per-call key. `0x...` → x402 on Base; `base58` → x402 on Solana; `0x...` also works for MPP |\n| `EVM_PRIVATE_KEY` | EVM key for x402 on Base (overrides `WALLET_PRIVATE_KEY` for EVM) |\n| `SOLANA_PRIVATE_KEY` | Solana key for x402 on Solana (overrides `WALLET_PRIVATE_KEY` for Solana) |\n| `TEMPO_PRIVATE_KEY` | EVM key for MPP on Tempo (overrides `WALLET_PRIVATE_KEY` for MPP) |\n| `ZERION_X402` | `true` enables x402 globally (analytics only) |\n| `ZERION_X402_PREFER_SOLANA` | `true` prefers Solana over Base when both keys set |\n| `ZERION_MPP` | `true` enables MPP globally (analytics only) |\n| `SOLANA_RPC_URL` | Custom Solana RPC endpoint |\n| `ETH_RPC_URL` | Custom Ethereum RPC endpoint (used for ENS resolution) |\n\n## Output\n\nAll commands emit JSON to stdout (default) for agent compatibility. Errors emit JSON to stderr with a `code` field for programmatic handling. Use `--pretty` for human-readable output, `--quiet` for minimal.\n\n## Failure Modes\n\nThe CLI handles:\n\n- missing or invalid API key\n- invalid wallet address or ENS resolution failure\n- unsupported chain filter\n- empty wallets / no positions\n- rate limits (HTTP 429)\n- upstream timeout or temporary unavailability\n- a web-app handoff the human rejected, or that timed out waiting for the browser callback\n\nAll errors are emitted as structured JSON on stderr with a `code` field.\n\n## Development\n\n```bash\nnpm install\nnpm test                  # unit tests (fast, offline)\nnpm run test:integration  # live API tests (requires ZERION_API_KEY, runs serially to avoid rate limits)\nnpm run test:all          # both\nnode ./cli/zerion.js --help\n```\n\nDevelopment requires **npm >=11.10** (see Supply-chain cooldown below); CI and `npm publish` run on Node 24.\n\n### Supply-chain cooldown\n\nTo reduce exposure to npm supply-chain attacks, this repo enforces a **release-age cooldown**: `npm install` will only resolve dependency versions that have been published for at least a fixed number of days. Compromised \"fresh\" releases are usually detected and unpublished within that window.\n\nThe cooldown length is set by `min-release-age` in [`.npmrc`](./.npmrc) — that line is the single source of truth for the window. It requires **npm >=11.10** (older npm silently ignores it); `devEngines` in `package.json` pins npm to that range with `onFail: error`, so an unsupported npm hard-fails instead of quietly skipping the cooldown.\n\nThe cooldown only affects version _resolution_ (i.e. updating `package-lock.json`); a plain install from the existing lockfile — including `npm ci` in CI — is unaffected.\n\n**Overriding for an urgent fix.** If you need a security patch newer than the window, bypass it for a single install and commit the result:\n\n```bash\nnpm install <package>@<version> --min-release-age=0\n```\n\nThen commit the updated `package-lock.json` with a note explaining why.\n\n### Contribution guidelines\n\n- Keep examples copy-pasteable.\n- Prefer official Zerion naming and documented behavior.\n- Document real gaps instead of inventing interfaces.\n- Preserve JSON-first CLI output for agent compatibility.\n\n### Releasing to npm\n\nThis repo uses [release-please](https://github.com/googleapis/release-please) for automated versioning and publishing.\n\n**Commit conventions** — use [Conventional Commits](https://www.conventionalcommits.org/) prefixes:\n\n- `feat:` — new feature → minor version bump\n- `fix:` — bug fix → patch version bump\n- `feat!:` or `fix!:` — breaking change → major version bump\n- `docs:`, `chore:`, `test:` — no release triggered\n\n**Release flow:**\n\n1. Merge `feat:` or `fix:` commits to `main`\n2. release-please opens/updates a release PR (`chore(main): release X.Y.Z`) with version bump and CHANGELOG\n3. Merge the release PR when ready to ship\n4. GitHub Release is created automatically → triggers `npm publish`\n\nTo force a specific version, add `Release-As: 2.0.0` in a commit message body.\n\n**CI setup:**\n\n- `NPM_TOKEN` repo secret is required for npm publish (use a granular access token)\n- `.release-please-manifest.json` tracks the current version\n- `.github/workflows/release-please.yml` handles release PR creation and npm publish\n- `.github/workflows/test.yml` runs tests on PRs and pushes to main\n- `.github/workflows/publish-next.yml` publishes prereleases to the `next` dist-tag (see below)\n\n### Prerelease channel (`@next`)\n\nEvery push to `main` (except release commits) publishes a prerelease to npm under the `next` dist-tag, e.g. `1.5.1-next.20260714093000.g325093a`. Regular users are unaffected: `npm install zerion-cli` keeps resolving the `latest` tag, which only moves when a release-please release PR is merged.\n\nTo try the latest merged-but-unreleased work:\n\n```bash\nnpx zerion-cli@next --help\n# or\nnpm install -g zerion-cli@next\n```\n\nTo test an unmerged branch, install straight from git — no publish needed:\n\n```bash\nnpm install -g github:zeriontech/zerion-ai#<branch>\n```\n\nA prerelease can also be published from any branch manually via the **Publish next** workflow in the Actions tab (`workflow_dispatch`).\n\nIf a `next` build turns out broken, point the tag back at a known-good version:\n\n```bash\nnpm dist-tag add zerion-cli@<version> next\n```\n\n## Resources\n\n- **API documentation** — <https://developers.zerion.io/introduction>\n- **Get an API key** — <https://dashboard.zerion.io>\n- **Agent skills** — [`./skills/`](./skills/) (also installable via `npx skills add zeriontech/zerion-ai`)\n- **Building with AI** — <https://developers.zerion.io/reference/building-with-ai>\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n",
  "bytes": 33593,
  "sha": "4b4f254c1c598e8ce9f1283fbff4c171ee5df90771a346e3fb130b10d01f4273",
  "repo_slug": "zeriontech/zerion-ai",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_zeriontech_zerion_ai_ce1636e4/readme"
}