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

# AI Reserve Code CLI

> A local, Claude-Code-style coding agent for your terminal whose brain is your AI Reserve API key.

`audacity` is a local, Claude-Code-style coding agent for your terminal whose
brain is **your AI Reserve API key** — it talks only to the AI Reserve gateway,
never to an external Claude or OpenAI endpoint. The model can read files, search, edit,
and run commands in your working directory, with explicit approval required for anything
that mutates state.

```bash theme={"dark"}
# Install
npm install -g audacity-cli

# Interactive REPL
audacity

# One-shot: run a single prompt to completion, then exit
audacity "fix the failing test"
```

On first run it prompts for your `aireserve_api_…` key and a model, then saves
them to `~/.audacity/config.json` (mode 600) — enter the key once and it is
remembered across every shell and session on the machine.

## Session commands

| Command       | Action                                                                 |
| ------------- | ---------------------------------------------------------------------- |
| `/model [id]` | Pick a model (no argument shows a numbered picker)                     |
| `/auto`       | Toggle auto-approve for mutating tools                                 |
| `/key`        | Re-enter and save your API key                                         |
| `/compact`    | Summarize older turns to shrink context, keeping recent turns verbatim |
| `/clear`      | Reset the conversation                                                 |
| `/exit`       | Quit                                                                   |

## Permissions model

Read-only tools (`read_file`, `list_files`, `grep`) run
without prompting. Mutating tools (`edit_file`, `write_file`,
`run_bash`) show you exactly what will run and ask for approval first — bypass
with `--yes`/`-y` or the `/auto` toggle. In one-shot mode,
mutating tools always require `-y`.

<Note>
  Because the CLI resends the full conversation each turn, long working sessions naturally
  benefit from provider-side **prompt caching** — repeated context is billed at
  cached-input rates on supported models, and cached token counts are metered per request in
  your usage reporting.
</Note>
