# Overview (/docs/cli)

> For AI agents, the [documentation index](https://bitrouter.ai/llms.txt) lists all pages. Append .md to a documentation URL to read its Markdown.

{/\* Draft structure. Check the install commands, sign-in and local address against the released CLI before launch. \*/}

The Spare CLI runs on your machine. You don't need it to call the Spare API; you need it for what happens
locally:

* **[The Cost routing](https://bitrouter.ai/docs/fleet/cost-routing)** keeps the hard turns on your own model and sends the rest to Spare.
* **Subscriptions** let you use your Claude or ChatGPT plan next to Spare models.
* **[Fallbacks to a different model](https://bitrouter.ai/docs/fleet/fallbacks)** chain models
  across providers.
* **Agent launchers** start Claude Code or Codex already pointed at the CLI.

## Install \[#install]

```bash title="macOS and Linux"
curl -fsSL https://spareinference.ai/install.sh | sh
```

```powershell title="Windows"
irm https://spareinference.ai/install.ps1 | iex
```

Check the install with `spare --version`.

## Connect Spare \[#connect-spare]

Create an API key in the console and export it, so the CLI can call Spare models:

```bash
export SPARE_API_KEY="sk-spare-..."
```

Run `spare models` to list the models the CLI can reach. Spare's models appear next to any provider you
connect with [your own key](https://bitrouter.ai/docs/fleet/byok) or subscription.

## Start it \[#start-it]

```bash
spare start
```

The CLI serves an OpenAI- and Anthropic-compatible API on a local address. Point any client at it, or
start an agent through it with `spare claude` or `spare codex`. See the [commands](https://bitrouter.ai/docs/cli/commands)
for everything else.

## Your data \[#your-data]

Requests to your own providers go straight from the CLI to them and never pass through Spare. Requests to
Spare models are recorded without their prompt or response content.