cli quickstart
Bernstein (Python 3.12+, Apache 2.0) goes from a clean checkout to a verified multi-agent run in five minutes: install from PyPI, initialise .sdd/ state and bernstein.yaml across 55 selectable CLI agent adapters, and execute goals behind quality gates. Every command and flag on this page maps to a real click subcommand registered in bernstein.cli.main.
1. install Bernstein
The fastest install is pipx. It pins Bernstein in its own venv and exposes the bernstein and bernstein-worker entry points on $PATH. uv tool install and a plain pip install also work.
pipx install bernstein
bernstein init
bernstein -g "fix the failing test in tests/test_foo.py"Bernstein requires Python 3.12 or newer. The wheel is published to PyPI under bernstein, Apache 2.0. If you need an offline install, the air-gap wheelhouse path is documented in the air-gap guide.
2. initialise the workspace
Change into the repository you want Bernstein to work on and run bernstein init. The command is idempotent and safe to run a second time:
cd /path/to/your/project
bernstein initOn a fresh checkout, init creates four things:
.sdd/: runtime directory for state, backlog, metrics, traces..sdd/runtime/is added to.gitignoreautomatically.bernstein.yaml: project config. The starter file setscli: auto,team: auto, a budget, and a commented-out goal.templates/: copied from the wheel. Contains the role prompts (manager, backend, qa, security, devops, and a dozen more). Edit them per project if you want a different voice..sdd/config.yaml: server port, worker cap, default model, default effort.
3. configure agents in bernstein.yaml
Open bernstein.yaml and edit the keys. The seed file sets goal, cli (one of the 55 selectable CLI agent adapter names, or auto), model, team (auto or a list of role names), max_agents, and budget. A minimal config looks like this:
# bernstein.yaml
goal: "Add JWT auth to the /login endpoint"
cli: claude # or codex, gemini, aider, ... or auto
model: sonnet
team: [backend, qa]
max_agents: 6
budget: "$5"Adapter names are registered in src/bernstein/adapters/registry.py. If the CLI binary for an adapter is not installed on the host, the scheduler skips that agent and logs a warning. The budget key is optional but recommended on first run.
4. run a goal
With bernstein.yaml saved, kick the crew off:
bernstein run --goal "Add JWT auth to the /login endpoint"Useful flags on the run command:
--dry-run: print the scheduling plan (which agent and model gets which task) without spawning anything. Zero token spend.--plan-only: generate and display the execution plan and exit. Use this when you want a human review before any agent runs.--auto-approve: skip the confirmation prompt before execution. Pair with--max-cost-usdfor unattended runs.--profile airgap: deny outbound network by default. Combine with--allow-networkto allow-list specific hosts.--audit: enable the HMAC-chained audit log for every task lifecycle event, with a Merkle seal on shutdown.
The orchestrator decomposes the goal into tasks, spawns one agent per task inside a fresh git worktree under .sdd/worktrees/, runs lint, types, tests, and the cross-model review gate against each branch, and merges only the work that passes every gate.
5. inspect status and results
While a run is in flight, open a second terminal and check progress:
bernstein status # one-shot text summary
bernstein live # live TUI: active agents, task events, stats
bernstein stop # graceful shutdown of the running orchestraAfter the run, the artefacts live in three places. When the run used --audit, the HMAC-signed audit log is under .sdd/audit/, rotated daily - one JSONL file per UTC day; you can verify the chain with bernstein audit verify. Per-task traces (JSONL) are under .sdd/traces/. The merged code is in your working tree, ready for git diff.
For the full reference, including every adapter, every quality gate, and the YAML workflow schema, see the cost calculator and the llms-full.txt dump (consumed by other LLMs the same way as this page).
connect an agent over mcp
Bernstein also ships a small remote MCP server for checking run receipts from any MCP-aware client, separate from the bernstein mcp orchestration server described above. It is read-only, anonymous, and served over Streamable HTTP - no install, no API key.
claude mcp add --transport http bernstein https://mcp.bernstein.run/mcpEndpoint: https://mcp.bernstein.run/mcp. Tools: verify_receipt, explain_receipt, verify_chain, list_presets, get_preset, and list_adapters. To check a single receipt without wiring up a client, use the verify page.
faq
Five common operator questions about the install path, picked from real GitHub issues and discussion threads.
What does bernstein init create in 2026?
bernstein init creates four artefacts in the current directory. .sdd/ is the runtime directory where backlog, traces, metrics, and audit logs live; .sdd/runtime/ is auto-appended to .gitignore so process state never leaks into commits. bernstein.yaml is the project config; the starter file sets cli: auto, team: auto, a budget, and a commented-out goal. templates/ holds the role prompt overrides (manager, backend, qa, security, devops) copied from the wheel; edit them per project if you want a different voice. .sdd/config.yaml holds the server port, worker cap, default model, and default effort. The init command is idempotent: running it on an initialised project preserves existing files.
Which CLI agents are auto-discovered?
Bernstein discovers every CLI agent whose binary is on $PATH at run time. The current adapter set covers Claude Code, Codex, Gemini CLI, Aider, Cursor, Copilot, Goose, OpenHands, OpenCode, Plandex, Charm Crush, Continue, Cline, Kilo, Forge, Hermes, Junie, Letta Code, Pi, Q Developer, Qwen, Ralphex, Rovo, Mistral Vibe, Auggie, AIChat, Amp, Autohand, Codebuff, Cody, Composio Orchestrator, Devin Terminal, Droid, gptme, Kimi, Kiro, OpenAI Agents SDK, Ollama (any OpenAI-compatible local LLM), and a generic adapter for arbitrary CLI tools. If you list an adapter whose binary is missing, the scheduler skips that agent and logs a warning rather than failing the run.
Can I do a dry-run before spending tokens?
Yes. bernstein run --dry-run prints the scheduling plan (which agent and which model would be assigned to which task) and exits with zero token spend. bernstein run --plan-only displays the execution plan and exits before any agent runs. Use either flag as the first pass when you are checking that the goal decomposition matches what you want. The dry-run flag also surfaces missing-binary warnings up-front so you find them before the first paid token leaves your terminal.
How do I run an air-gapped install in 2026?
Pair bernstein run --profile airgap with the wheelhouse-bundle install path. The airgap profile denies outbound network by default; combine with --allow-network <host> to allow-list specific hosts (your local model server, for example). For the install side, bernstein ships a wheelhouse build helper that bundles every dependency as a verifiable archive so you can transport bernstein and its tree onto a disconnected machine. The full procedure is in the air-gap guide.
Where does the audit log live and how do I verify it?
When a run is started with --audit, the HMAC-chained audit log lives under .sdd/audit/, rotated daily - one JSONL file per UTC day, for example .sdd/audit/2026-05-07.jsonl. Each line is one JSON record carrying the previous line's HMAC as a chain link, so modifying any earlier line breaks the chain at the next verification. Run bernstein audit verify to check the HMAC chain and Merkle tree; the command exits non-zero on any chain break, missing record, or HMAC mismatch. Per-task transcripts under .sdd/traces/ are referenced from the audit log by run_id so a reviewer can cross-check what a specific agent saw and produced against the chain entry that records the gate outcome.