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 withnpx:
Requires Node.js 18 or later.
Architecture
- SDK-based — all API calls go through
@chainstream-io/sdkwith 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
| Chain | CLI ID | Data API | DeFi | WebSocket |
|---|---|---|---|---|
| Solana | sol | Yes | Yes | Yes |
| BSC | bsc | Yes | Yes | Yes |
| Ethereum | eth | Yes | Yes | Yes |
CLI vs MCP vs SDK
| Capability | CLI | MCP Server | SDK |
|---|---|---|---|
| Token search & analysis | Yes | Yes | Yes |
| Market trending & ranking | Yes | Yes | Yes |
| Wallet profiling & PnL | Yes | Yes | Yes |
| DEX quote | Yes | Yes | Yes |
| DEX swap (signing) | Yes | No | Yes (with WalletSigner) |
| Token creation | Yes | No | Yes (with WalletSigner) |
| x402 auto-payment | Yes | N/A | Manual |
| Best for | AI agents, scripts, CI | AI chat assistants | Custom applications |
Quick Start
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

