Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.zerion.io/llms.txt

Use this file to discover all available pages before exploring further.

The Zerion CLI is an open-source tool that wraps the Zerion API and a local encrypted wallet vault. The same binary powers both humans and AI agents — any agent that can run shell commands can analyze wallets, sign messages, and execute swaps without writing API integration code. Wallet management is built on the Open Wallet Standard. Six agent skills ship alongside the CLI for AI coding agents (Claude Code, Cursor, Windsurf, Codex, Gemini, OpenCode, and any agentskills.io host). Repository: github.com/zeriontech/zerion-ai — CLI and skills ship from the same repo.
Alpha Preview — The CLI is under active development. Commands, flags, and output formats may change between releases. Don’t depend on current behavior in production workflows.

Installation

One-shot setup — installs the CLI globally, configures your API key, and adds skills across all detected coding agents:
npx -y zerion-cli init -y --browser
  • -y runs setup non-interactively
  • --browser opens dashboard.zerion.io so you can grab an API key and paste it back
  • Skills install globally to every detected AI coding agent
Or install the CLI binary on its own:
npm install -g zerion-cli
Requires Node.js 20 or later.

Authentication

Three options. The CLI auto-detects which is active. Get a free key at dashboard.zerion.io. Keys begin with zk_.
export ZERION_API_KEY="zk_..."
Or persist it via config:
zerion config set apiKey zk_...
Required for analysis and trading. Analysis can also use x402 / MPP pay-per-call.

x402 pay-per-call

No API key needed. Pays $0.01 USDC per request via the x402 protocol. Supports EVM (Base) and Solana.
export WALLET_PRIVATE_KEY="0x..."     # EVM (Base) — 0x-prefixed hex
export WALLET_PRIVATE_KEY="5C1y..."   # Solana — base58 keypair

zerion analyze 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --x402
Enable globally:
export ZERION_X402=true
Both chains simultaneously:
export EVM_PRIVATE_KEY="0x..."
export SOLANA_PRIVATE_KEY="5C1y..."
export ZERION_X402_PREFER_SOLANA=true
Pay-per-call applies to analytics commands only (portfolio, positions, history, pnl, analyze). Trading commands always use an API key.

MPP pay-per-call

No API key needed. Pays $0.01 USDC per request via the MPP protocol on Tempo. EVM only.
export WALLET_PRIVATE_KEY="0x..."     # or a dedicated key:
export TEMPO_PRIVATE_KEY="0x..."

zerion portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --mpp
Enable globally:
export ZERION_MPP=true

Skills

The CLI ships with six agent skills that install into AI coding agents. Each skill is self-contained — your agent loads the relevant one based on the user’s intent.
SkillWhat it does
zerionUmbrella entry — install, authentication, routing to capability skills, chains reference
zerion-analyzeRead-only wallet insights: portfolio, positions, history, PnL, watchlist (supports x402 / MPP)
zerion-tradingSwap, bridge, send tokens (on-chain actions; needs API key + agent token)
zerion-signOff-chain signing — sign-message (EIP-191 / raw), sign-typed-data (EIP-712)
zerion-walletWallet management — create, import, list, fund, backup, delete, sync
zerion-agent-managementAgent tokens + policies (the autonomous-trading primitives)
Install or reinstall skills:
zerion setup skills                          # all detected agents (default: global)
zerion setup skills --agent claude-code      # scope to one agent
zerion setup skills -g                       # force global install
Per-host plugin installs (alternative to setup skills):
# Claude Code
/plugin marketplace add zeriontech/zerion-ai
/plugin install zerion-agent@zerion

# Cursor
npx skills add zeriontech/zerion-ai --agent cursor

# OpenCode
npx skills add zeriontech/zerion-ai --agent opencode

# Gemini CLI
gemini extensions install https://github.com/zeriontech/zerion-ai

# Any agentskills.io host
npx skills add zeriontech/zerion-ai

Manual setup, agent execution

The CLI splits cleanly into two surfaces, by design.
  • Wallet management and agent token setup are manual. wallet create, import, backup, and delete 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 must obey — allowed chains, expiry, transfer/approval gates, contract allowlists. No key material moves and no spending credential widens without you in the loop.
  • Analysis, signing, trading, and discovery are for agents. analyze, portfolio, positions, history, pnl, sign-message, sign-typed-data, swap, bridge, send, search, chains, and read-only listings emit JSON to stdout, structured errors to stderr, and skip confirmation dialogs. Once an agent token is configured, signing and trading fire immediately.
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.

Commands

Every command supports --help for full flag documentation. Run zerion --help for the top-level command list.

Analyze

Read-only wallet insights. Supports --x402 and --mpp for pay-per-call.
# Full analysis — portfolio, positions, transactions, PnL in parallel
zerion analyze vitalik.eth

# Targeted reads
zerion portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
zerion positions vitalik.eth --positions defi
zerion history vitalik.eth --limit 10 --chain ethereum
zerion pnl vitalik.eth

Analyze Options

CommandDescription
zerion analyze <address|ens>Full analysis — portfolio, positions, transactions, PnL in parallel
zerion portfolio <address|ens>Portfolio value and top positions
zerion positions <address|ens>Token + DeFi positions (--positions all|simple|defi)
zerion history <address|ens>Transaction history (--limit, --chain)
zerion pnl <address|ens>Profit & loss (realized, unrealized, fees)
zerion search <query>Search tokens by name or symbol
zerion chainsList supported chains

Trade

Requires an API key plus an agent token for unattended use.
# Same-chain swap
zerion swap usdc eth 100 --chain ethereum

# Cross-chain swap
zerion swap usdc eth 100 --chain base --to-chain ethereum

# Bridge with destination swap
zerion bridge usdc base 100 --to-token eth

# Send
zerion send usdc 50 --to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --chain base

Trade Options

CommandDescription
zerion swap <from> <to> <amount>Swap tokens on a single chain
zerion swap <from> <to> <amount> --to-chain <chain>Cross-chain swap
zerion swap tokens [chain]List tokens available for swap
zerion bridge <token> <chain> <amount>Bridge tokens cross-chain
zerion bridge <token> <chain> <amount> --to-token <tok>Bridge + swap on destination
zerion send <token> <amount> --to <address> --chain <chain>Send tokens

Sign

Off-chain signatures (EIP-191, EIP-712, Solana raw) — no broadcast. Requires an agent token.
# EIP-191 (EVM) or raw (Solana)
zerion sign-message "Login to dApp" --chain ethereum

# Hex bytes
zerion sign-message 0xdeadbeef --encoding hex --chain ethereum

# EIP-712 typed data
zerion sign-typed-data --data "$(cat permit.json)"
zerion sign-typed-data --file permit.json
cat permit.json | zerion sign-typed-data

Sign Options

CommandDescription
zerion sign-message <message> --chain <chain>Sign EIP-191 (EVM) or raw (Solana) message
zerion sign-message <message> --encoding hexTreat message as hex bytes
zerion sign-typed-data --data '<json>'Sign EIP-712 typed data (EVM only)
zerion sign-typed-data --file <path>Read EIP-712 typed data from file

Wallet

Encrypted local wallets. EVM + Solana supported. Passphrase required for destructive ops.
zerion wallet create --name trading-bot
zerion wallet import --name old-wallet --evm-key
zerion wallet list
zerion wallet fund --wallet trading-bot
zerion wallet backup --wallet trading-bot
zerion wallet sync --wallet trading-bot

Wallet Options

CommandDescription
zerion wallet create --name <name>Create encrypted wallet (EVM + Solana)
zerion wallet import --name <name> --evm-keyImport from EVM private key (interactive)
zerion wallet import --name <name> --sol-keyImport from Solana private key (interactive)
zerion wallet import --name <name> --mnemonicImport from seed phrase (all chains)
zerion wallet listList all wallets
zerion wallet fundShow deposit addresses for funding
zerion wallet backup --wallet <name>Export recovery phrase
zerion wallet delete <name>Permanently delete a wallet
zerion wallet sync --wallet <name>Sync wallet to Zerion app via QR code
zerion wallet sync --allSync all wallets

Agent

Scoped API tokens for unattended trading. Tokens auto-save to config and are required for swap, bridge, send.
# Create a tight policy first
zerion agent create-policy --name safe-base \
  --chains base \
  --expires 24h \
  --deny-transfers

# Mint a token bound to that policy
zerion agent create-token --name dca-bot \
  --wallet trading-bot \
  --policy safe-base

Agent Token Options

CommandDescription
zerion agent create-token --name <bot> --wallet <wallet>Create scoped token
zerion agent list-tokensList active agent tokens
zerion agent use-token --wallet <wallet>Switch active token by wallet
zerion agent revoke-token --name <bot>Revoke a token

Agent Policy Options

CommandDescription
zerion agent create-policy --name <policy>Create security policy (flags below)
zerion agent list-policiesList all policies
zerion agent show-policy <id>Show policy details
zerion agent delete-policy <id>Delete a policy

Policy Flags

FlagDescription
--chains <list>Restrict to specific chains (comma-separated)
--expires <duration>Token expiry (e.g. 24h, 7d)
--deny-transfersBlock raw ETH/native transfers
--deny-approvalsBlock ERC-20 approval calls
--allowlist <addresses>Only allow listed contract/wallet addresses

Watch

Track wallets by name without exposing addresses in commands.
zerion watch 0xFe89Cc7Abb2C4183683Ab71653c4cCd1b9cC194e --name ens-dao
zerion analyze ens-dao

Watch Options

CommandDescription
zerion watch <address> --name <label>Add wallet to watchlist
zerion watch listList watched wallets
zerion watch remove <name>Remove from watchlist

Setup

CommandDescription
zerion initOne-shot onboarding — install CLI globally, configure API key, install agent skills
zerion init -y --browserNon-interactive init that opens dashboard.zerion.io for the API key
zerion setup skillsInstall Zerion agent skills into detected coding agents
zerion setup skills --agent claude-codeInstall into a specific agent

Config

CommandDescription
zerion config set <key> <value>Set config (apiKey, defaultWallet, defaultChain, slippage)
zerion config unset <key>Remove a config value (resets to default)
zerion config listShow current configuration

Global Options

FlagDescription
--wallet <name>Specify wallet (default: from config)
--address <addr|ens>Use raw address or ENS name
--watch <name>Use watched wallet by name
--chain <chain>Specify chain (default: ethereum)
--to-chain <chain>Destination chain for cross-chain swaps
--positions all|simple|defiFilter positions type
--limit <n>Limit results (default: 20)
--offset <n>Skip first N results
--search <query>Filter wallets by name or address
--slippage <percent>Slippage tolerance (default: 2%)
--x402Pay-per-call on Base or Solana (analytics only)
--mppPay-per-call on Tempo (analytics only)
--jsonJSON output (default)
--prettyHuman-readable output
--quietMinimal output

Environment Variables

VariableDescription
ZERION_API_KEYAPI key (get at dashboard.zerion.io)
WALLET_PRIVATE_KEYPay-per-call key. 0x... → x402 on Base; base58 → x402 on Solana; 0x... also works for MPP
EVM_PRIVATE_KEYEVM key for x402 on Base (overrides WALLET_PRIVATE_KEY for EVM)
SOLANA_PRIVATE_KEYSolana key for x402 on Solana (overrides WALLET_PRIVATE_KEY for Solana)
TEMPO_PRIVATE_KEYEVM key for MPP on Tempo (overrides WALLET_PRIVATE_KEY for MPP)
ZERION_X402true enables x402 globally (analytics only)
ZERION_X402_PREFER_SOLANAtrue prefers Solana over Base when both keys set
ZERION_MPPtrue enables MPP globally (analytics only)
SOLANA_RPC_URLCustom Solana RPC endpoint
ETH_RPC_URLCustom Ethereum RPC endpoint (used for ENS resolution)

Output Handling

All commands emit JSON to stdout (default) for agent compatibility. Errors emit JSON to stderr with a code field for programmatic handling.
zerion portfolio vitalik.eth                 # JSON (default)
zerion portfolio vitalik.eth --pretty        # human-readable
zerion portfolio vitalik.eth --quiet         # minimal output
The CLI surfaces structured error codes for: missing or invalid API key, invalid address or ENS resolution failure, unsupported chain, empty wallets, rate limits (HTTP 429), and upstream timeouts.

Examples

Quick wallet check

zerion analyze vitalik.eth

DeFi-only positions on a single chain

zerion positions vitalik.eth --positions defi --chain ethereum

Stage an autonomous trading bot

# 1. Create wallet
zerion wallet create --name trading-bot

# 2. Tight policy (Base only, 7-day expiry, no transfers)
zerion agent create-policy --name swap-only \
  --chains base \
  --expires 7d \
  --deny-transfers

# 3. Mint a scoped agent token
zerion agent create-token --name dca-bot \
  --wallet trading-bot \
  --policy swap-only

# 4. Agent can now swap on Base autonomously
zerion swap usdc eth 100 --chain base

SIWE login for a dapp

zerion sign-message "Sign in to dApp" --chain ethereum

Pay-per-call without an API key

export WALLET_PRIVATE_KEY="0x..."
zerion portfolio vitalik.eth --x402

Compose with jq

zerion portfolio vitalik.eth | jq '.totals.positions'
zerion history vitalik.eth --limit 50 | jq '.transactions[] | select(.type == "trade")'

Open Source

The CLI and skills are MIT-licensed and open to contribution.