> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shumi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Install the shumi CLI, authenticate, mint API keys, and pipe crypto intelligence into scripts.

`shumi` is the terminal surface. It talks to the same [API](/api-reference/introduction) as everything else, and it is where you mint the API keys the [MCP server](/agents/mcp) and any server deployment need.

## Install

```bash theme={"dark"}
npm install -g shumi
```

Requires Node 22 or newer.

```bash theme={"dark"}
shumi login          # opens a browser
shumi whoami         # confirm it worked
shumi init           # first-run check: auth, network, next steps
```

If the browser callback fails, on a remote shell or in a locked-down browser, `shumi login --paste` completes the sign-in from a pasted URL instead.

## First queries

A bare ticker is the shortcut for a quick signal:

```bash theme={"dark"}
shumi BTC
```

Then:

```bash theme={"dark"}
shumi signal ETH             # synthesised verdict for one asset
shumi coin PEPE              # single-coin detail
shumi resolve "the gold one" # free text → asset
shumi ask "is BTC funding crowded right now?"
```

`ask` runs the full pipeline and consumes an ask query from your quota. The typed commands do not, see [Access and Quotas](/platform/access).

## The command surface

**Start here.** `signal`, `coin`, `resolve`, `ask`

**Market and trends.** `market`, `trends`, `scan`, `category`, `narratives`, `sentiment`, `funding`, `regime`

**Research.** `holders`, `wallets`, `transcripts`, `tweets`, `search`, `pairs`, `basket`, `futures`, `walkforward`, `signal-quality`

**Live.** `watch`

**Account and setup.** `login`, `logout`, `whoami`, `billing`, `keys`, `wallet`, `init`, `doctor`, `health`, `version`, `commands`

`shumi help` gives the grouped tour; `shumi help <command>` gives detail on one.

## Scripting

Three output behaviours, and the default is usually what you want:

| Flag                    | Behaviour                                                                           |
| ----------------------- | ----------------------------------------------------------------------------------- |
| *(none, in a terminal)* | Human-readable, coloured                                                            |
| *(none, piped)*         | JSON automatically, `shumi trends \| jq` works with no flag                         |
| `--json`                | Force JSON on stdout                                                                |
| `--agent`               | Machine mode: JSON, no spinner, no colour, no update notice, machine error envelope |

Auto-JSON on a non-TTY is the detail that makes this pleasant in scripts. `--agent` (or `SHUMI_AGENT=1`) is the right mode for anything unattended, because it also suppresses the update notifier that would otherwise contaminate stdout.

```bash theme={"dark"}
shumi funding --agent | jq '.data[] | select(.tier == "hot")'
```

`shumi commands --json` emits a capability manifest of the whole CLI. Useful for wiring an agent that needs to discover what it can call.

## API keys

Interactive use rides your session. A server, a bot, or an MCP client needs a key:

```bash theme={"dark"}
shumi keys create
shumi keys list
shumi keys revoke <id>
```

Keys look like `shumi_sk_…` and carry your entitlement, so a key minted by a Pro account resolves to Pro. Treat one as a credential with your quota attached to it.

## When something breaks

```bash theme={"dark"}
shumi doctor    # auth, network, version freshness
shumi health    # API status
shumi billing   # what tier the gate will actually apply
```

`shumi doctor` is the first thing to run on a confusing failure. It separates an expired session from a network problem from a stale CLI, which otherwise present identically.

## Related

* [Quickstart](/quickstart), the two-minute version
* [MCP Server](/agents/mcp), same data, inside an agent
* [API Overview](/api-reference/introduction), the HTTP surface underneath
* [Access and Quotas](/platform/access), What counts against what
