🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

zerion-cli

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zerion-cli

Zerion for AI agents and developers: wallet-analysis skill bundle and a JSON-first CLI.

latest
Source
npmnpm
Version
1.6.0
Version published
Weekly downloads
346
5.49%
Maintainers
3
Weekly downloads
 
Created
Source

Zerion CLI

CLI for Zerion Wallet. 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.

[!NOTE] 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.

Installation

Set up everything in one command (install CLI globally, configure your API key, and add 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 by default

Or just install the CLI without setup:

npm install -g zerion-cli

Requires Node.js 20 or later.

Agent skill

One skill, zerion, under ./skills/zerion/ — follows the 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.

Capabilities (skills/zerion/capabilities/)

FileWhat it covers
analyze.mdPortfolio, positions, history, PnL, token search, watchlist (read-only; supports x402 / MPP)
trading.mdSwap, bridge, send tokens (on-chain actions; needs API key + agent token)
sign.mdOff-chain signing — sign-message (EIP-191 / raw), sign-typed-data (EIP-712)
wallet.mdWallet management — create, import, list, fund, backup, export-key, delete, sync
agent-management.mdAgent tokens + policies (the autonomous-trading primitives)
swap-0x.mdToken swaps via 0x API v2 — AllowanceHolder, Permit2, and Gasless flows across 20+ EVM chains

Partner integrations (skills/zerion/partners/)

Ecosystem partners that combine their product with the Zerion CLI. See partner-skill-creator.md to contribute one. Loaded only when the user names the partner.

FileWhat it coversPartner
bankr.mdTwitter/X-native trading bot patternsBankr
lifi-earn.mdCross-chain yield routingLi.Fi
monad-addresses.mdCanonical Monad mainnet contract addresses for zerion agent create-policy --allowlist lockdownMonad
moonpay-onramp.mdBuy crypto with card or bank transfer via MoonPay, then trade with ZerionMoonPay
moonpay-iron.mdUSD bank-wire to Iron virtual account (IBAN/ACH) → USDC → DCA via ZerionMoonPay
moonpay-predict.mdTrade prediction markets (Polymarket, Kalshi) via MoonPay CLIMoonPay
sendai-ideas.mdCrypto idea discovery, validation, competitive landscape, DeFi TVL researchSendAI (MIT)
somnia-blockchain.mdSomnia L1 reference — network info, gas model, deployment guidanceSomnia
somnia-reactivity.mdSomnia Reactivity — event-driven pub/sub, WebSocket + Solidity handlersSomnia
trails-crosschainswap.mdCross-chain swaps to/from Polygon via Trails SDK (Widget / Headless / API)Trails
trails-deposit.mdBridge + DeFi vault deposit on Polygon in one intent (Aave, Morpho, ERC-4626)Trails
umbra-privatetxn.mdPrivate (stealth-address) transfersUmbra
uniswap-lp.mdLiquidity position managementUniswap
uniswap-x402.mdSwap with x402 pay-per-callUniswap
vaultsfyi-*.mdDeposit, market intel, rebalance, risk monitor, strategist, watchlist, yield optimizerVaults.fyi
consolidate.mdSweep all tokens on a chain into one targetZerion
zerion setup skills

Installs globally across all detected coding agents. Use --agent <name> to scope to one agent, or -g to force a global install.

Install via Claude Code

/plugin marketplace add zeriontech/zerion-ai
/plugin install zerion-agent@zerion

Install via OpenAI Codex CLI

codex plugin marketplace add zeriontech/zerion-ai

Then run /plugins in Codex, choose the zerion marketplace, and install zerion-agent.

Install via Gemini CLI

gemini extensions install https://github.com/zeriontech/zerion-ai
npx skills add zeriontech/zerion-ai

Auto-detects installed agents. Flags: -g (user-wide), -a <agent> (target one host), -y (non-interactive). Full ecosystem: https://agentskills.io/clients.

How to use

After install, ask the agent in natural language.

Wallet analysis

Analyze the wallet vitalik.eth. Summarize total portfolio value, top 5 holdings, and recent transactions.

What's the PnL on 0xFe89Cc7Abb2C4183683Ab71653c4cCd1b9cC194e over the last 30 days?

Show DeFi positions (lending, staking, LP) for my default wallet.

Trading

Swap 100 USDC to ETH on Base.

Bridge 50 USDC from Arbitrum to Optimism.

Send 0.1 ETH on Base to vitalik.eth.

Wallet management

Create a new encrypted wallet called bot-1.

Set up an agent token for bot-1 that's allowed to swap on Base only, with a 7-day expiry.

List my wallets and which agent tokens are active.

Signing

Sign the EIP-712 message in typed.json using my bot-1 wallet.

The 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.mdcapabilities/agent-management.mdcapabilities/trading.md in sequence.

Manual setup, agent execution

Zerion CLI splits into two surfaces, by design.

  • 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.
  • 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.

Setup gestures (init, setup skills, config set/unset/list, watch add/remove) are one-time configuration steps you run yourself before automation takes over.

The 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 to scope them down to specific chains, addresses, or expiry windows.

Authentication

Three options. The CLI auto-detects which is active.

Get a key at dashboard.zerion.io — it's free and takes a minute. Keys begin with zk_.

The 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.

zerion login              # pick browser login, paste a key, or pay-per-call
zerion login --browser    # go straight to browser authentication

Or set / persist a key manually:

export ZERION_API_KEY="zk_..."     # per-session
zerion config set apiKey zk_...    # persisted to ~/.zerion/config.json
  • HTTP Basic Auth
  • Required for analysis and trading commands (analysis can also use x402 / MPP pay-per-call instead — see options B and C)

B) x402 pay-per-call

No API key needed. Pay $0.01 USDC per request via the x402 protocol. Supports EVM (Base) and Solana.

Pay-per-call applies to analytics commands only (portfolio, positions, history, pnl, analyze). Trading commands always use an API key.

export WALLET_PRIVATE_KEY="0x..."     # EVM (Base) — 0x-prefixed hex
export WALLET_PRIVATE_KEY="5C1y..."   # Solana — base58 encoded keypair

zerion analyze 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --x402
# or 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   # optional, prefers Solana when both set

C) MPP pay-per-call

No API key needed. Pay $0.01 USDC per request via the MPP protocol on Tempo. EVM only.

export WALLET_PRIVATE_KEY="0x..."   # EVM key with USDC on Tempo
# or use a dedicated key:
export TEMPO_PRIVATE_KEY="0x..."

zerion portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --mpp
# or enable globally:
export ZERION_MPP=true

Commands

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

Wallet Analysis

Read-only. Supports --x402 and --mpp for pay-per-call.

CommandDescriptionExample
zerion analyze <address|ens>Full analysis — portfolio, positions, transactions, PnL in parallelzerion analyze vitalik.eth
zerion portfolio <address|ens>Portfolio value and top positionszerion portfolio 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
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
zerion history <address|ens>Transaction history (--limit, --chain)zerion history vitalik.eth --limit 10 --chain ethereum
zerion pnl <address|ens>Profit & loss (realized, unrealized, fees)zerion pnl vitalik.eth
zerion search <query>Search tokens by name or symbolzerion search USDC
zerion chainsList supported chainszerion chains

Trading

Requires an API key (or agent token for unattended use).

CommandDescriptionExample
zerion swap <chain> <amount> <from-token> <to-token>Same-chain swapzerion swap base 1 USDC ETH
zerion swap solana <amount> <from-token> <to-token>Solana same-chain swapzerion swap solana 0.1 SOL USDC
zerion swap tokens [chain]List tokens available for swapzerion swap tokens solana
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
zerion bridge … --cheapestExecute highest-output bridge routezerion bridge base USDC 5 arbitrum USDC --cheapest
zerion bridge … --fastExecute lowest-time bridge routezerion bridge base USDC 5 arbitrum USDC --fast
zerion bridge … --to-wallet <name>Bridge with explicit destination wallet (Solana ↔ EVM)zerion bridge ethereum USDC 5 solana USDC --to-wallet sol-bot --cheapest
zerion bridge … --to-address <addr>Bridge to a raw destination addresszerion bridge ethereum USDC 5 solana USDC --to-address 8xLdox… --cheapest
zerion send <token> <amount> --to <address> [--chain <chain>]Send tokens (chain auto-detected from address format)zerion send usdc 50 --to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --chain base
zerion send SOL <amount> --to <solana-pubkey>Send native SOL on Solanazerion send SOL 0.1 --to 2Nsnn…

Wallet Management

Encrypted local wallets. EVM + Solana supported. Passphrase required for all destructive ops.

CommandDescriptionExample
zerion wallet create --name <name>Create encrypted wallet (EVM + Solana)zerion wallet create --name trading-bot
zerion wallet import --name <name> --evm-keyImport from EVM private key (interactive)zerion wallet import --name old-wallet --evm-key
zerion wallet import --name <name> --sol-keyImport from Solana private key (interactive)zerion wallet import --name sol-bot --sol-key
zerion wallet import --name <name> --mnemonicImport from seed phrase (all chains)zerion wallet import --name backup --mnemonic
zerion wallet listList all walletszerion wallet list
zerion wallet fundShow deposit addresses for fundingzerion wallet fund --wallet trading-bot
zerion wallet backup --wallet <name>Export recovery phrasezerion wallet backup --wallet trading-bot
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
zerion wallet delete <name>Permanently delete a wallet (requires passphrase)zerion wallet delete trading-bot
zerion wallet sync --wallet <name>Sync wallet to Zerion app via QR codezerion wallet sync --wallet trading-bot
zerion wallet sync --allSync all wallets to Zerion appzerion wallet sync --all

Signing

CommandDescriptionExample
zerion sign-message <message> --chain <chain>Sign EIP-191 (EVM) or raw (Solana) messagezerion sign-message "Login to dApp" --chain ethereum
zerion sign-message <message> --encoding hexTreat message as hex byteszerion sign-message 0xdeadbeef --encoding hex --chain ethereum
zerion sign-typed-data --data '<json>'Sign EIP-712 typed data (EVM only)zerion sign-typed-data --data "$(cat permit.json)"
zerion sign-typed-data --file <path>Read EIP-712 typed data from filezerion sign-typed-data --file permit.json
cat typed.json | zerion sign-typed-dataRead EIP-712 typed data from stdincat permit.json | zerion sign-typed-data

Agent Tokens

Scoped API tokens for unattended trading. Token auto-saves to config; required for swap, bridge, send.

CommandDescriptionExample
zerion agent create-token --name <bot> --wallet <wallet>Create scoped token (interactive passphrase)zerion agent create-token --name dca-bot --wallet trading-bot
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
zerion agent list-tokensList active agent tokenszerion agent list-tokens
zerion agent use-token --wallet <wallet>Switch active token by walletzerion agent use-token --wallet trading-bot
zerion agent revoke-token --name <bot>Revoke a tokenzerion agent revoke-token --name dca-bot

Agent Policies

Restrict what an agent token can do — chains, expiry, transfers, approvals, allowlists.

CommandDescriptionExample
zerion agent create-policy --name <policy>Create security policy (flags below)zerion agent create-policy --name safe-base --chains base --expires 24h --deny-transfers
zerion agent list-policiesList all policieszerion agent list-policies
zerion agent show-policy <id>Show policy detailszerion agent show-policy safe-base
zerion agent delete-policy <id>Delete a policyzerion agent delete-policy safe-base

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

Watchlist

Track wallets by name without exposing addresses in commands.

CommandDescriptionExample
zerion watch <address> --name <label>Add wallet to watchlistzerion watch 0xFe89Cc7Abb2C4183683Ab71653c4cCd1b9cC194e --name ens-dao
zerion watch listList watched walletszerion watch list
zerion watch remove <name>Remove from watchlistzerion watch remove ens-dao
zerion analyze <name>Analyze a watched wallet by namezerion analyze ens-dao

Setup

CommandDescriptionExample
zerion loginAuthenticate — browser (dashboard) login, paste an API key, or pay-per-callzerion login
zerion login --browserBrowser auth: opens dashboard.zerion.io, captures the key via loopbackzerion login --browser
zerion initOne-shot onboarding — install CLI globally, authenticate, install agent skillszerion init
zerion init -y --browserNon-interactive init that opens dashboard.zerion.io for the API keynpx -y zerion-cli init -y --browser
zerion setup skillsInstall Zerion agent skills into detected coding agentszerion setup skills
zerion setup skills --agent claude-codeInstall into a specific agentzerion setup skills --agent claude-code

Configuration

CommandDescriptionExample
zerion config set <key> <value>Set config (apiKey, defaultWallet, defaultChain, slippage)zerion config set defaultChain base
zerion config unset <key>Remove a config value (resets to default)zerion config unset defaultChain
zerion config listShow current configurationzerion config list

Global Flags

FlagDescription
--wallet <name>Source wallet (default: from config)
--address <addr|ens>Use raw address or ENS name
--watch <name>Use watched wallet by name
--chain <chain>Chain for analysis commands (default: ethereum)
--to-wallet <name>Destination wallet for bridge (Solana ↔ EVM)
--to-address <addr>Destination address for bridge (must match destination-chain format)
--positions all|simple|defiFilter positions type
--defiOn positions: shorthand for --positions defi with output grouped by protocol (LP tokens pooled by group_id, loans netted in net_value)
--limit <n>Limit results (default: 20 for list ops)
--offset <n>Skip first N results (pagination)
--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

All 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.

Failure Modes

The CLI handles:

  • missing or invalid API key
  • invalid wallet address or ENS resolution failure
  • unsupported chain filter
  • empty wallets / no positions
  • rate limits (HTTP 429)
  • upstream timeout or temporary unavailability

All errors are emitted as structured JSON on stderr with a code field.

Development

npm install
npm test                  # unit tests (fast, offline)
npm run test:integration  # live API tests (requires ZERION_API_KEY, runs serially to avoid rate limits)
npm run test:all          # both
node ./cli/zerion.js --help

Development requires npm >=11.10 (see Supply-chain cooldown below); CI and npm publish run on Node 24.

Supply-chain cooldown

To 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.

The cooldown length is set by min-release-age in .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.

The 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.

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:

npm install <package>@<version> --min-release-age=0

Then commit the updated package-lock.json with a note explaining why.

Contribution guidelines

  • Keep examples copy-pasteable.
  • Prefer official Zerion naming and documented behavior.
  • Document real gaps instead of inventing interfaces.
  • Preserve JSON-first CLI output for agent compatibility.

Releasing to npm

This repo uses release-please for automated versioning and publishing.

Commit conventions — use Conventional Commits prefixes:

  • feat: — new feature → minor version bump
  • fix: — bug fix → patch version bump
  • feat!: or fix!: — breaking change → major version bump
  • docs:, chore:, test: — no release triggered

Release flow:

  • Merge feat: or fix: commits to main
  • release-please opens/updates a release PR (chore(main): release X.Y.Z) with version bump and CHANGELOG
  • Merge the release PR when ready to ship
  • GitHub Release is created automatically → triggers npm publish

To force a specific version, add Release-As: 2.0.0 in a commit message body.

CI setup:

  • NPM_TOKEN repo secret is required for npm publish (use a granular access token)
  • .release-please-manifest.json tracks the current version
  • .github/workflows/release-please.yml handles release PR creation and npm publish
  • .github/workflows/test.yml runs tests on PRs and pushes to main
  • .github/workflows/publish-next.yml publishes prereleases to the next dist-tag (see below)

Prerelease channel (@next)

Every 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.

To try the latest merged-but-unreleased work:

npx zerion-cli@next --help
# or
npm install -g zerion-cli@next

To test an unmerged branch, install straight from git — no publish needed:

npm install -g github:zeriontech/zerion-ai#<branch>

A prerelease can also be published from any branch manually via the Publish next workflow in the Actions tab (workflow_dispatch).

If a next build turns out broken, point the tag back at a known-good version:

npm dist-tag add zerion-cli@<version> next

Resources

License

MIT — see LICENSE.

Keywords

zerion

FAQs

Package last updated on 23 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts