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

# CLI Reference

> Commands, options, output formats, and exit codes for the evalvcr CLI.

## `evalvcr run`

Discover and execute evaluation suites.

```bash theme={null}
evalvcr run [paths...] [options]
```

| Option | Default | Description |
| :- | :- | :- |
| `--format <pretty\|json\|sarif\|markdown>` | `pretty` | Report output format |
| `--json` | `false` | Alias for `--format json` |
| `--mode <record\|replay\|auto\|strict>` | `replay` | VCR cassette mode |
| `--threshold <num>` | `0.7` | Minimum average score (`0..1`) |
| `--fail-on <error\|warning\|off>` | `error` | Fail exit code on security/integrity findings |
| `--cassette-dir <dir>` | `.evalvcr/cassettes` | Directory for `.evalvcr.json` cassettes |
| `--storage-dir <dir>` | `.evalvcr` | Directory for local SQLite / JSON run history |
| `--watch` | `false` | Watch eval files and re-run with cache-busting |
| `--output <file>` | stdout | Write formatted output to a file |

## `evalvcr migrate-evalite`

Scan and migrate `evalite` suites to `evalvcr/evalite-compat` (or native `evalvcr` imports with `--native`).

```bash theme={null}
evalvcr migrate-evalite [dir] [--dry-run|--write] [--native] [--format json|--json]
```

## `evalvcr serve`

Start the built-in zero-dependency local Web UI and JSON API (binds to `127.0.0.1`, enforces loopback `Host` validation, CSP, and displays runs, trace spans, security findings, and cassettes).

```bash theme={null}
evalvcr serve [--host 127.0.0.1] [--port 4310] [--dir .evalvcr] [--cassette-dir <dir>]
```

Exposes `GET /`, `GET /api/health`, `GET /api/runs`, `GET /api/runs/:id`, `GET /api/cassettes`, and `GET /api/cassettes/:name`.

## `evalvcr inspect`

Inspect a `evalvcr.cassette.v1` or `evalvcr.report.v1` JSON file.

```bash theme={null}
evalvcr inspect <file.json> [--format pretty|json] [--json]
```

## `evalvcr scrub`

Re-run the 7-step secret & PII scrubber over an existing cassette.

```bash theme={null}
evalvcr scrub <cassette.json> [--write]
```

## `evalvcr export`

Convert a saved `evalvcr.report.v1` JSON file into SARIF 2.1.0, Markdown, or JSON.

```bash theme={null}
evalvcr export <report.json> --format <sarif|markdown|json> [--json] [--output <file>]
```

## Global Flags

```bash theme={null}
evalvcr --version   # Print installed evalvcr CLI version (-v)
evalvcr --help      # Print command reference (-h)
```

## Exit Codes

| Code | Meaning |
| :- | :- |
| `0` | All suites passed threshold and `--fail-on` policy |
| `1` | Threshold missed, strict drift/cassette miss, unhandled trial exception, or `--fail-on` breached |
| `2` | Invalid CLI usage, missing file/path, or malformed JSON/schema (concise `stderr`, no stack trace) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.