---
title: CLI Reference
lastUpdated: '2026-06-12'
nextjs:
  metadata:
    title: Hive CLI Reference | Auth, Tools, and Diagnostics
    description: Install and use the Hive CLI for authentication, tool discovery, market, DeFi, DEX, security, portfolio, diagnostics, and config generation.
    alternates:
      canonical: https://www.hiveintelligence.xyz/cli
---


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`.

{% ai-doc-actions path="/cli" title="CLI Reference" /%}

---

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

```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
```

---

## Recommended workflow

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

| 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, 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](/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](/tools) 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.

---

## Related

- [Quick Start](/quick-start)
- [API Integration](/api-integration)
- [Tools Reference](/tools)
- [CLI Tutorial](/tutorials/cli)
