# cli quickstart

Canonical URL: https://bernstein.run/cli-quickstart

Five minutes from a clean checkout to a verified run (Python 3.12+, Apache 2.0).

## 1. install Bernstein

```bash
pipx install bernstein
# alternatives: uv tool install bernstein | pip install bernstein
```

## 2. initialise the workspace

```bash
cd /path/to/your/project
bernstein init
bernstein doctor
```

Creates `.sdd/` (state, backlog, metrics, traces), `bernstein.yaml`, `templates/`, and `.sdd/config.yaml`.

## 3. configure agents in bernstein.yaml

```yaml
goal: "Add JWT auth to the /login endpoint"
cli: claude          # one of 55 selectable adapter names, or auto
model: sonnet
team: [backend, qa]
max_agents: 6
budget: "$5"
```

## 4. run a goal

```bash
bernstein run --dry-run
bernstein run --plan-only
bernstein run --audit --goal "Add JWT auth to the /login endpoint"
```

Key flags: `--dry-run` (zero token spend preview), `--plan-only` (inspect decomposed plan and exit), `--auto-approve`, `--profile airgap` (with `--allow-network`), `--audit` (enable HMAC-chained audit log under `.sdd/audit/`).

## 5. inspect status and verify offline

```bash
bernstein status
bernstein live
bernstein audit verify
bernstein verify receipt <receipt.json> --public-key <key.pub.pem>
```

## connect an agent over mcp

```bash
claude mcp add --transport http bernstein https://mcp.bernstein.run/mcp
```

Read-only anonymous Streamable HTTP verifier tools: `verify_receipt`, `explain_receipt`, `verify_chain`, `list_presets`, `get_preset`, `list_adapters`. Browser verifier: https://mcp.bernstein.run/verify.
