Tutorials & Integrations
CLI Reference
The Hive CLI is the direct terminal path for querying the live catalog. It ships in the hive-intelligence npm package, the same package that provides Hive's local MCP stdio wrapper. One install, multiple local 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 --helpInstall globally
npm install -g hive-intelligence
hive --helpAfter 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 loginOr set HIVE_API_KEY per command:
HIVE_API_KEY=hive_live_… npx -y -p hive-intelligence@latest hive statusExport it once if you're running many commands in a session:
export HIVE_API_KEY=hive_live_…
hive statusRecommended workflow
Discover tools
hive tools listRun a market query (domain subcommand)
hive market price --ids bitcoin --vs usdRun a DeFi query
hive defi tvl --protocol aaveCheck health
hive status
hive doctorstatus 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 serve | Start the local MCP stdio server wrapper |
hive auth | login, logout, whoami: manage the stored credential |
hive init | One-command local setup; --all --browser installs across detected clients and runs browser auth |
hive uninstall | Remove Hive MCP entries and copied skill packs |
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 keys | Manage Hive API keys |
hive usage | Show API usage and plan limits |
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 flags, contract risk, token risk signals- …and one subcommand per Hive category. Run
hive --helpto see the full list your installed version exposes.
Scripting examples
Pipe JSON output into jq. CLI output is the standard { ok, data, meta } envelope, so address provider fields under .data:
hive market price --ids bitcoin,ethereum --vs usd | jq '.data.bitcoin.usd'Watch a value on a 30s interval. watch takes the <domain> <command> positionally, with tool arguments passed as JSON via --args:
hive watch market price --interval 30 --args '{"ids":"bitcoin","vs_currencies":"usd"}'Generate a Claude Desktop config from your current auth:
hive config claude-desktopNotes
- 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.