Tutorials & Integrations

CLI Reference

Written by , Product docsLast updated

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

The package name (hive-intelligence) differs from the executable name (hive), so pass the package to npx with -p and name the binary separately:

bash
npx -y -p hive-intelligence@latest hive --help

Install globally

bash
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):

bash
npx -y -p hive-intelligence@latest hive auth login

Or set HIVE_API_KEY per command:

bash
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:

bash
export HIVE_API_KEY=hive_live_…
hive status

Discover tools

bash
hive tools list

Run a market query (domain subcommand)

bash
hive market price --ids bitcoin --vs usd

Run a DeFi query

bash
hive defi tvl --protocol aave

Check health

bash
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:

CommandWhat it does
hive serveStart the local MCP stdio server wrapper
hive authlogin, logout, whoami — manage the stored credential
hive initOne-command local setup; --all --browser installs across detected clients and runs browser auth
hive uninstallRemove Hive MCP entries and copied skill packs
hive toolslist, search, info — browse the live catalog
hive configPrint or generate MCP-client configs (Claude Desktop, Cursor, VS Code, HTTP)
hive doctorEnvironment and connectivity diagnostics
hive keysManage Hive API keys
hive usageShow API usage and plan limits
hive statusAuth status, plan, recent usage
hive watchTail a tool or query on an interval
hive aliasSave a named shortcut for a command
hive openOpen a dashboard URL in the browser
hive completionShell completion scripts (bash, zsh, fish)
hive telemetryOpt in/out of anonymous usage reporting

Domain subcommands are auto-generated from Hive's category namespace. Common ones:

  • hive market … — prices, caps, trending
  • hive defi … — TVL, yields, protocol analytics
  • hive wallet … — balances, history, portfolio (EVM + Solana)
  • hive security … — honeypot flags, contract risk, token risk signals
  • …and one subcommand per Hive category. Run hive --help to 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:

bash
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:

bash
hive watch market price --interval 30 --args '{"ids":"bitcoin","vs_currencies":"usd"}'

Generate a Claude Desktop config from your current auth:

bash
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 doctor is the first stop — it reports exactly where a failure is coming from.