Quickstart
Build brs from source and replay your first snapshot.
1. Clone and build
The CLI is not published to a registry yet — it ships from source, Apache-2.0, in the same repository as the rest of the project.
git clone https://github.com/BurnRateSurgeon/burnratesurgeon
cd burnratesurgeon
pnpm install
pnpm --filter @burnratesurgeon/cli buildpnpm build emits packages/cli/dist/index.js, which the brs bin entry points at once it is installed globally. Until then, run it directly with node.
2. Replay a scenario
The repository ships six synthetic scenarios under fixtures/scenarios/, one per canonical root-cause class the classifier covers. Each is a self-contained replay input — pick one and point brs at it:
node packages/cli/dist/index.js replay \
--tsdb fixtures/scenarios/window_boundary_miss \
--rules fixtures/scenarios/window_boundary_miss/rules.yml \
--alertmanager fixtures/scenarios/window_boundary_miss/alertmanager.yml--tsdb accepts either a directory holding snapshot.json or the file itself. --alertmanager is optional; omitting it replays with empty routing and no inhibit rules.
3. Replay a Datadog export instead
A Datadog scenario is one export bundle — monitors and metric series together — and cannot be combined with the Prometheus flags:
node packages/cli/dist/index.js replay --datadog ./export.json4. Read the exit code
A CI pipeline can gate on this without parsing the report: 0 means no critical root-cause finding, 1 means a critical alert failed (or the inputs could not be read), 2 means the command itself was called wrong. See the CLI reference for the full flag list.