> ## Documentation Index
> Fetch the complete documentation index at: https://stir-vid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Command-line client for StirVid and its MCP server.

The StirVid CLI ships in the same package as the MCP server. It runs the local stdio server, calls the hosted MCP endpoint, and mirrors every MCP tool as a command.

## Install

```bash theme={null}
npm install -g ./mcp
```

## Log in

```bash theme={null}
stirvid login <key>
```

The key is stored in the system keychain and used as the Bearer token for hosted MCP calls.

## Common commands

```bash theme={null}
# Account
stirvid balance
stirvid status
stirvid ledger --limit 20

# Content
stirvid characters
stirvid generate <image_url> <video_url> --mode std
stirvid task <task_id>

# Ops
stirvid record-funding --amount 100 --source manual_topup

# Servers
stirvid mcp             # start stdio MCP server
stirvid serve --port 8791   # start HTTP MCP server on :8791

# Diagnostics
stirvid doctor
```

## `stirvid doctor`

`doctor` runs the same suite as `ops-health-check`:

* Verifies the API key
* Pings the Control API and hosted MCP endpoint
* Reads the generation-account balance and warns below thresholds
* Prints active plan and current credit balance

<Tip>
  Run `stirvid doctor` first when triaging any 401, 402, or generation failure.
</Tip>
