CLI Reference
The Hive CLI is the fastest way to query the live catalog from a terminal. It ships in the hive-intelligence npm package — the same package that provides Hive's MCP stdio server and JavaScript SDK. One install, three entrypoints. The CLI executable is hive.
Installation
Without installing (recommended for one-offs)
The package name (hive-intelligence) differs from the executable name (hive), so pass the package to npx with -p and name the binary separately:
npx -y -p hive-intelligence@latest hive --help
Install globally
npm install -g hive-intelligence
hive --help
After a global install, drop the npx -y -p hive-intelligence@latest prefix from every command below.
Authentication
Either log in interactively (stores the key in the CLI's config):
npx -y -p hive-intelligence@latest hive auth login
Or set HIVE_API_KEY per command:
HIVE_API_KEY=hive_live_… npx -y -p hive-intelligence@latest hive status
Export it once if you're running many commands in a session:
export HIVE_API_KEY=hive_live_…
hive status
Recommended workflow
Discover tools
hive tools list
Run a market query (domain subcommand)
hive market price --ids bitcoin --vs usd
Run a DeFi query
hive defi tvl --protocol aave
Check health
hive status
hive doctor
status shows auth, current plan, and recent usage. doctor probes connectivity, auth, and upstream providers — run it first when something isn't working.
Command surface
Top-level commands:
| Command | What it does |
|---|---|
hive auth | login, logout, whoami — manage the stored credential |
hive init | Scaffold a project-local config |
hive tools | list, search, info — browse the live catalog |
hive config | Print or generate MCP-client configs (Claude Desktop, Cursor, VS Code, HTTP) |
hive doctor | Environment and connectivity diagnostics |
hive status | Auth status, plan, recent usage |
hive watch | Tail a tool or query on an interval |
hive alias | Save a named shortcut for a command |
hive open | Open a dashboard URL in the browser |
hive completion | Shell completion scripts (bash, zsh, fish) |
hive telemetry | Opt in/out of anonymous usage reporting |
Domain subcommands are auto-generated from Hive's category namespace. Common ones:
hive market …— prices, caps, trendinghive defi …— TVL, yields, protocol analyticshive wallet …— balances, history, portfolio (EVM + Solana)hive security …— honeypot, contract risk, token safety- …and one subcommand per Hive category. Run
hive --helpto see the full list your installed version exposes.
Scripting examples
Pipe JSON output into jq:
hive market price --ids bitcoin,ethereum --vs usd | jq '.bitcoin.usd'
Watch a value on a 30s interval:
hive watch 'market price --ids bitcoin --vs usd' --interval 30
Generate a Claude Desktop config from your current auth:
hive config claude-desktop
Notes
- Everything the CLI does is a thin wrapper over the REST surface at
https://mcp.hiveintelligence.xyz/api/v1/execute. See API Integration for the raw HTTP form. - Domain subcommands shell out to the same tools you'd call over MCP or REST. Check the tools reference to confirm a tool is exposed on your plan.
- When in doubt,
hive doctoris the first stop — it reports exactly where a failure is coming from.