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

# Local Development

> Tail logs, debug the wire format, and verify your setup from the terminal

The CLI ships a small set of dev commands that run alongside your normal `npm run dev`.

## Tail logs

```bash theme={null}
outkit dev
```

Tails render logs in real time. Resolves any `${VAR}` placeholders in `backendUrl`
(from `outkit.json`) against `process.env` and `.env.local`, so the same config works
locally and in deployed environments.

## Render logs

```bash theme={null}
outkit logs list                  # newest first
outkit logs tail                  # stream new logs (polls every 2s)
outkit logs replay <logId>        # replay a single log entry
outkit logs export --since 7d     # bulk export to JSON or CSV
```

Each log row shows the input content, the components that were generated, the strategy
(`single`, `single_hinted`, `two_step`), token usage, and latency.

## Health check

```bash theme={null}
outkit doctor              # quick auth + network check
outkit doctor --full       # also tests project mode, SDK packages, wire format,
                           # and the design-token meta event end-to-end
outkit doctor --json       # machine-readable for CI
outkit doctor --backend https://staging.api.example.com
```

`doctor` is the canonical "is anything broken" command. Run it any time setup looks off.

## Inspect local state

```bash theme={null}
outkit status              # local-only summary of what the CLI knows
outkit whoami              # round-trips the server to confirm your token works
outkit config              # view or edit outkit.json
```

## Telemetry

```bash theme={null}
outkit telemetry status    # see whether anonymous analytics are on
outkit telemetry on        # opt in
outkit telemetry off       # opt out
outkit telemetry log       # tail ~/.outkit/telemetry.log (NDJSON)
```

The local NDJSON log is written even when telemetry is **off** — it's a glass-jar of every
event the CLI *would* send, so you can audit before flipping it on. Auto-truncates at 1 MB.

## Undo

Anything that mutates your codebase or remote state is journaled. To reverse the most
recent command:

```bash theme={null}
outkit undo
```

`undo` refuses to clobber files you have edited since the command ran. Dependencies are
not auto-removed — the CLI prints the uninstall command for you instead.

## Next Steps

<CardGroup cols={2}>
  <Card title="API keys" icon="key" href="/docs/cli/keys">
    `outkit keys create / rotate / revoke / stats` — manage API keys from your terminal.
  </Card>

  <Card title="Full reference" icon="book" href="/docs/cli/reference">
    Every command, every flag.
  </Card>
</CardGroup>
