CLI
The Context CLI wraps the SDK into 35+ commands with dual-mode output — human-readable tables in terminals, JSON when piped. Built for both human traders and AI agents.35+ commands
Markets, orders, portfolio, and account management
JSON output
Structured output for parsing, piping, and automation
Dual mode
Tables in TTY, JSON when piped to other tools
Gasless onboarding
Setup and deposit without ETH for gas
Install
Quick start
Existing user
New user
JSON output
Use the--json flag or pipe to automatically get JSON:
Global options
| Flag | Env var | Description |
|---|---|---|
--api-key <key> | CONTEXT_API_KEY | API key for authentication |
--private-key <key> | CONTEXT_PRIVATE_KEY | Private key for signing orders |
--rpc-url <url> | CONTEXT_RPC_URL | Base Sepolia RPC endpoint |
--base-url <url> | CONTEXT_BASE_URL | Override API base URL |
--json | — | Force JSON output |
~/.context/config.json).