Skip to main content

bellwether golden

Manage golden outputs for deterministic tool regression tests.

Synopsis

bellwether golden save --tool <name>
bellwether golden compare [options]
bellwether golden list [options]
bellwether golden delete --tool <name>

Description

Golden outputs capture the exact response from a tool and let you compare future responses for drift. This is useful for deterministic regression testing when you want to validate output stability beyond schema changes.

Config Required

golden requires a config file. Run bellwether init once in your project.

Subcommands

save

Capture the current output of a tool as a golden reference.

bellwether golden save --tool <name>
OptionDescriptionDefault
--tool <name>Tool name to capture output forRequired
-c, --config <path>Path to config filebellwether.yaml
--args <json>JSON arguments to pass to the toolgolden.defaultArgs
--mode <mode>Comparison mode: exact, structural, semanticgolden.mode
--allowed-drift <paths>Comma-separated JSONPath patterns to ignore-
--no-normalize-timestampsDisable timestamp normalizationgolden.normalizeTimestamps
--no-normalize-uuidsDisable UUID normalizationgolden.normalizeUuids
--description <text>Description of this golden output-

compare

Compare current outputs against saved golden outputs.

bellwether golden compare
OptionDescriptionDefault
-c, --config <path>Path to config filebellwether.yaml
--tool <name>Only compare a specific tool-
--fail-on-driftExit with error if drift is detectedfalse
--format <format>Output format: text, json, markdowngolden.compareFormat

list

List all saved golden outputs.

bellwether golden list
OptionDescriptionDefault
-c, --config <path>Path to config filebellwether.yaml
--format <format>Output format: text, jsongolden.listFormat

delete

Delete saved golden outputs for a tool.

bellwether golden delete --tool <name>
OptionDescriptionDefault
--tool <name>Tool name to delete golden output forRequired
-c, --config <path>Path to config filebellwether.yaml
--allDelete all golden outputs for this toolfalse

Storage

Golden outputs are stored under output.dir as bellwether-golden.json by default.

Examples

# Capture a golden output
bellwether golden save --tool read_file --args '{"path":"/tmp/test.txt"}'

# Compare current output against goldens
bellwether golden compare --fail-on-drift

# List saved goldens
bellwether golden list

See Also

  • check - Drift detection and schema validation
  • baselines - Baseline-based comparisons