Calculate an event-count or elapsed-time error budget from two local JSON exports. The objective, observation window, and exclusions are explicit; nothing is queried from a monitoring service. The tool reports what the exported evidence supports, including when a conclusion is not possible.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.
Run the checked-in example
node bin/error-budget-calculator.mjs --root examples --definition events-definition.json --observations events-clean.json --json
node bin/error-budget-calculator.mjs --root examples --definition events-definition.json --observations events-failing.json --json
node bin/error-budget-calculator.mjs --root examples --definition duration-definition.json --observations duration-clean.json --jsonRead the result
The first and third commands exit 0 (pass). The second exits 1 (fail) because two bad events exceed the exact allowance of one. Each prints a JSON report to stdout. Add --report report.json to also save identical bytes beneath the declared root. An existing regular report file may be replaced, but no input or alias of an input may be overwritten.