Skip to content

Hosted Breakspec is in private beta. Ask for access

Docsengine

Command line

The review service runs the breakspec command inside the review container. You can run the same command yourself in a clone of the repository.

When you need the command line

You do not need the command line for pull request reviews. The review service runs these commands for you. Use the command line to review a branch before you push, or to audit a repository that has no pull request open.

Each command reads the repository in the current directory. Use -C REPO to name a different repository root.

console
$ breakspec --help$ breakspec -C ~/src/dma-engine review -b main

Review a branch

commandwhat it does
breakspec review -b mainReviews the current branch against the base and writes a record of the review. With no configuration file, the reviewers and the simulation stage run by default.
breakspec review -b main --rules-from mainReads the team rules from the named branch or commit. The default is the base.
breakspec review -b main --comments review.jsonWrites the summary comment and the line comments to a JSON file. --md FILE writes the summary comment as Markdown. --sarif FILE writes SARIF. --json prints the record.
breakspec review --no-aiRuns only the configured checks. The reviewers and the simulation stage do not run.
breakspec record --mdPrints the summary comment of the latest review. Without --md it prints a short text summary.

--depth quick|deep|signoff sets how much the configured checks run. See Configuration.

Audit a whole repository

breakspec audit examines a whole repository with no configuration file and no pull request. It maps the repository, then checks interfaces, clock domain crossings and properties.

console
$ breakspec audit --label dma-engine$ breakspec audit --peer ../dma-driver     # a second repository in the same product$ breakspec audit --no-verify --json

Review without the GitHub App

Use the command line if your team cannot open an inbound port, or if your code is not on GitHub. The command line needs a clone of the repository and a model key. It posts nothing to a code host. GitLab is not supported yet.

This command reviews a whole repository:

console
$ breakspec audit

This command reviews one branch against its base, for example in a CI job. It writes the summary as Markdown, the findings as SARIF, and the summary with the comments for each line as JSON:

console
$ breakspec review -b main --md review.md --sarif review.sarif --comments comments.json

Your CI job decides what to do with these files. The exit code of review is in Exit codes.

Commands for a configured repository

These commands use the optional file .breakspec/config.yaml. A repository without that file does not need them.

commandwhat it does
breakspec onboardCreates .breakspec/ and imports the rules from CLAUDE.md, AGENTS.md and .cursorrules. It stops if a configuration file already exists.
breakspec onboard --agentMaps the repository with Claude Code and writes a full configuration file.
breakspec check contractsRuns one family of checks. The families are contracts, formal, cdc, cosim, tests and security.
breakspec regmap export --format cPrints the register map from the RTL as a C header. The other formats are md and json.
breakspec gateEvaluates the release gate on the latest record and exits with the result.
breakspec waive FINDING --reason "..." --approver NAME --expires 2026-12-31Records that the team accepts one finding. The reason, the approver and the expiry date are required.

See Register and layout contracts and Formal properties for the two configured checks that have their own page.

Commands for coding agents

commandwhat it does
breakspec fix FINDING --agent claude-codePrints a fix brief for one finding from the latest record. The agent formats are claude-code, cursor, codex, devin and plain.
breakspec fix --allPrints a fix brief for all findings in the latest record.
breakspec review --agentRuns a review and prints the findings as a plain text brief.
breakspec mcpStarts an MCP server on standard input and output, so a coding agent can call Breakspec as a tool.

Commands the review service uses

The Docker Compose bundle starts these commands. You do not run them by hand in a normal install. See Self-hosting.

commandwhat it does
breakspec serve --port PORTReceives pull request events from GitHub. By default it listens on this machine only.
breakspec workerRuns the queued reviews and posts the results. --once stops when the queue is empty.
breakspec reply --thread thread.jsonAnswers a reply under a review comment. The input file holds the finding and the thread. --out FILE writes the answer to a file.

Exit codes

review and gate exit with the result of the release gate.

coderesultmeaning
0PassNo blocking finding. A finding with a current waiver does not block.
1BlockedAt least one finding at a blocking severity. The default is P0 and P1.
2Needs reviewThere are findings that a person must read. None of them blocks.
3InconclusiveA check did not reach a result.

A usage error or a missing record prints a message that starts with the cause and exits with a code that is not zero.