Skip to main content

What is ChainStream CLI

ChainStream CLI (@chainstream-io/cli) is a command-line tool for querying on-chain data and executing DeFi operations across Solana, BSC, and Ethereum. It is designed for both human developers and AI agents.

Data Queries

Search tokens, analyze wallets, track market trends, and query recent trades

DeFi Execution

Swap tokens, create tokens on launchpads, and broadcast transactions with built-in wallet signing

Install

No global install needed — run directly with npx:
npx @chainstream-io/cli token search --keyword PUMP --chain sol
Or install globally:
npm install -g @chainstream-io/cli
chainstream token search --keyword PUMP --chain sol
Requires Node.js 18 or later.

Architecture

  • SDK-based — all API calls go through @chainstream-io/sdk with typed responses, auto-retry, and job polling
  • TEE signing — DeFi transactions are signed remotely in a TEE (Trusted Execution Environment); device keys are stored locally in ~/.config/chainstream/keys/
  • API Key first — x402 purchase auto-saves an API Key to config; wallet signatures are only needed for DeFi execution

Supported Chains

ChainCLI IDData APIDeFiWebSocket
SolanasolYesYesYes
BSCbscYesYesYes
EthereumethYesYesYes

CLI vs MCP vs SDK

CapabilityCLIMCP ServerSDK
Token search & analysisYesYesYes
Market trending & rankingYesYesYes
Wallet profiling & PnLYesYesYes
DEX quoteYesYesYes
DEX swap (signing)YesNoYes (with WalletSigner)
Token creationYesNoYes (with WalletSigner)
x402 auto-paymentYesN/AManual
Best forAI agents, scripts, CIAI chat assistantsCustom applications

Quick Start

# 1. Authenticate (only needed once)
npx @chainstream-io/cli login

# 2. Search tokens
npx @chainstream-io/cli token search --keyword PUMP --chain sol

# 3. Check token security
npx @chainstream-io/cli token security --chain sol --address <token_address>

# 4. View trending tokens
npx @chainstream-io/cli market trending --chain sol --duration 1h

# 5. Analyze wallet PnL
npx @chainstream-io/cli wallet pnl --chain sol --address <wallet_address>

Next Steps

Authentication

Set up API Key or wallet login

Command Reference

Full list of commands and options

x402 Payment

Auto-purchase subscriptions with USDC