Spectrum Nodes

Spectrum CLI: An Ethereum and Multichain CLI for AI Agents

Featured image for: Spectrum CLI: An Ethereum and Multichain CLI for AI Agents
Share

Updated October 22, 2026 · Spectrum Nodes

Short answer: Spectrum CLI is a command line tool from Spectrum Nodes that gives developers and AI agents blockchain data across 24 chains, including Ethereum, Solana and Bitcoin, from one npm install. It has 96 commands, returns JSON by default, and spectrum commands emits a full JSON Schema catalog, so an agent learns every command in one call. It reads data and never signs or sends.

npm install -g @spectrumnodes/cli

What Is Spectrum CLI?

Spectrum CLI is the command line interface for the Spectrum API. It runs on Node.js 20 or later, is MIT licensed and needs a Spectrum API endpoint. Counts below were confirmed current on October 22, 2026.

SpecDetail
Built forDevelopers, data and DeFi analysts, AI agent builders, DevOps running checks in CI
Commands96, across 14 namespaces
Chains24: 16 EVM, plus Solana, Bitcoin, Starknet and 5 Cosmos chains
Agent interfacespectrum commands emits a full JSON Schema catalog
Default outputJSON, with --human for aligned tables
Installnpm install -g @spectrumnodes/cli
RequiresNode.js 20 or later, plus a Spectrum API endpoint
LicenceMIT

Why Is Onchain Data Hard to Give an AI Agent?

Because every usual option needs custom integration work. An agent that needs blockchain data inherits a developer's bad options:

  • An SDK it has to write and compile code against
  • A pile of JSON RPC method names to memorise and payloads to format by hand (JSON RPC is the request format blockchain nodes use: a method name and parameters in, JSON out)
  • A block explorer it cannot use at all, because a web page is not a tool an agent can call

Each one breaks the moment the agent reaches for a chain or protocol it was not wired for. An agent needs one tool it can read, understand and call across every chain, with output that flows back into its loop. That is what Spectrum CLI is built to be. For the wider infrastructure picture, see RPC infrastructure for AI agents.

How Does an AI Agent Learn Spectrum CLI?

It reads one catalog. Most command line tools expect a person to read a --help tree, which works poorly when the caller is a language model. Spectrum ships its command surface as data:

spectrum commands

That call returns all 96 commands, each with its arguments and a full JSON Schema, including which chains and protocols are valid for that command. A JSON Schema is a machine readable description of the inputs a command accepts. The agent reads the catalog once and can then construct any query across all 24 chains. There is no wrapper to maintain and no handwritten tool description that drifts out of date when the CLI ships.

How Do You Use Spectrum CLI With Claude or Another AI Agent?

Install it where your agent runs shell commands, then hand the agent the catalog:

  1. Install: npm install -g @spectrumnodes/cli
  2. Point it at your endpoint: spectrum config set api <your-endpoint>
  3. Put the output of spectrum commands in the agent's context or a tool definition
  4. Let the agent run commands and read the JSON it gets back

This is how you give Claude, or any agent that can run a terminal command, an Ethereum RPC CLI: the agent calls the CLI, and the CLI calls your Spectrum endpoint. For agents that need their own endpoints, see dedicated RPC endpoints for autonomous onchain systems.

What Output Does Spectrum CLI Return?

JSON by default, which is what an agent, a script or a CI job wants to consume.

spectrum prices price ETH | jq .priceUsd

Output pipes into jq and composes with standard shell tooling. Errors go to stderr, so pipes stay clean, and exit codes are consistent enough for an agent or a script to branch on. When a person is reading, the --human flag renders aligned tables. Same command, two audiences.

How Does Spectrum CLI Avoid Failed Calls?

It only offers the chains where a protocol is deployed, and validates every argument before the call. For an agent, a call that cannot succeed is a wasted turn and wasted tokens.

Each command derives its valid chains from a central registry. Requesting a Uniswap v3 quote on a chain where the quoter contract was never deployed is a common source of failed calls, so defi uniswap-v3-quote lists the 7 chains where the quoter exists, not every chain the protocol is loosely associated with. Arguments and chains are checked before any network request. Fewer dead ends for a person, fewer wasted steps for an agent.

Screenshot 2026-07-31 at 12.01.00 PM.png

What Data Can You Query With Spectrum CLI?

  • Wallets: token balances and portfolios, NFT ownership, ENS resolution
  • Markets: prices, yields, gas comparisons across chains
  • Contracts: smart contract reads and raw JSON RPC
  • DeFi: Uniswap v2, v3 and v4 quotes, Curve and LlamaLend, Pendle, Aave, Jupiter swaps on Solana, and perps funding rates from Hyperliquid and dYdX

Can Spectrum CLI Sign or Send Transactions?

No. Spectrum CLI reads data and builds unsigned transactions, such as an approval revoke. It never signs and never broadcasts.

In an agent workflow, that boundary is the point. The agent can prepare a transaction, but the decision to sign and send stays with a person or a wallet you control. Your API token sits in a config file with owner only permissions and is masked wherever it prints.

What Do You Want To Do?

  • Fetch a wallet balance on any chain: spectrum tokens balance <address> --human
  • Get a live swap quote: spectrum defi uniswap-v3-quote <in> <out> <amount> --chain base
  • Compare gas across every chain at once: spectrum core gas-comparison --human
  • Pipe a value into a script: spectrum prices price ETH | jq .priceUsd
  • Give an agent the whole tool surface: spectrum commands

How Do You Install Spectrum CLI?

Three lines, and your first balance comes back in under a minute. You need Node.js 20 or later.

npm install -g @spectrumnodes/cli
spectrum config set api <your-endpoint>
spectrum tokens balance 0xd8dA...96045 --human

The first line installs the CLI globally and puts spectrum on your PATH. The second points it at your Spectrum API endpoint. The third returns a balance. Full command reference and quickstart: Spectrum CLI docs.

FAQ

Is there an Ethereum RPC CLI for Claude? Yes. Spectrum CLI works with Claude or any AI agent that can run shell commands. Install it, point it at your Spectrum endpoint and give the agent the spectrum commands catalog, and it can query Ethereum and 23 other chains with JSON back.

What should an AI agent use for RPC access? A tool it can discover and call without custom code. Spectrum CLI wraps the Spectrum API and raw JSON RPC in 96 commands with a JSON Schema catalog, and checks chains and arguments before each call, so the agent wastes fewer turns on requests that cannot succeed.

Is Spectrum CLI 96 commands per chain? No. There are 96 commands in total, spanning 24 chains. Each command supports the chains where its protocol is deployed.

Can Spectrum CLI execute trades? No. Spectrum CLI reads data and builds unsigned transactions such as approval revokes. Signing and broadcasting stay with you.

Which chains does Spectrum CLI support? Ethereum, Polygon, BSC, Optimism, Base, Avalanche, Arbitrum, Gnosis, Berachain, Moonbeam, Monad, Linea, Hyperliquid, Scroll, Plasma, X Layer, Solana, Bitcoin, Starknet, Cosmos Hub, Osmosis, Axelar, Noble and Agoric.

Start Now: https://dashboard.spectrumnodes.com/auth/signup