Skip to content

Configuration schema

The full dungbeetle.config.json shape. See the Configuration overview for a narrative walkthrough.

Top-level fields

FieldTypeDescription
versionnumberConfig schema version (currently 1).
project.namestringProject name, used in reports.
baselinesDirstringWhere baselines are written (default dungbeetle.snapshots). Commit this.
artifactsDirstringWhere JSON/HTML reports go (default .dungbeetle/artifacts).
lifecycleobjectCapture lifecycle — see below.
normalizationobjectANSI handling and mask rules.
comparisonobjectNumeric and pixel tolerances.

lifecycle

Runs in order: setupstartwaitcaptureteardown.

FieldTypeDescription
setupstring[]Shell commands run before capture.
startstring[]Shell commands run as background processes for long-lived dev servers.
wait.commandstringPolled until it succeeds.
wait.urlstringPolled until it responds.
wait.timeoutMsnumberReadiness timeout (and default per-target timeout).
capturetarget[]The targets to snapshot.
teardownstring[]Shell commands run after capture; start processes are then stopped.

Capture targets

Every target has a kind, a unique name, and an optional timeoutMs. Command-running kinds (terminal, check, performance, desktop) also take an optional cwd. Kind-specific options:

Common: reportingDir

Every target accepts an optional reportingDir — the reporting directory its snapshots file under, as a nested path of lowercase slug segments:

json
{ "kind": "web", "name": "checkout", "url": "…", "reportingDir": "regression/checkout" }

Paths may be nested (regression/checkout), must be lowercase ([a-z0-9._-] segments separated by /; a leading ./ is accepted and stripped), stay within 128 characters, and default to "reporting". The cloud stores the directory with each result and groups run reviews by it.

terminal

FieldDescription
commandThe command to run.

See Terminal snapshots.

check

FieldDescription
toolWhich parser to use (laravel-routes, phpstan, pest, pint, …). Required.
commandOverride the tool's default command.
outputRead tool output from this file instead of (or after) running command.

See Check snapshots.

web

FieldDescription
urlFetch and snapshot a live page (default driver, no browser).
htmlPath to a local HTML fixture to snapshot instead.
driver"playwright" for browser-backed capture.
accessibility(Playwright) include an accessibility snapshot.
screenshot(Playwright) capture a screenshot for pixel diffing.
screenshotFileIngest an existing image instead of capturing a page.
screenshotMode"strict" (default) or "advisory" visual gating.
pixelToleranceVisual tolerance override for this target.
browser.channel / browser.executablePath(Playwright) browser selection.
viewport.width / viewport.height(Playwright) viewport size.

See Web snapshots.

performance

FieldDescription
toolWhich parser to use: k6 (default), ab, or autocannon.
scriptA k6 script; Dungbeetle runs k6 run --summary-export.
summaryAn existing tool-output file to ingest (no tool run).
commandThe tool command to run (required for ab / autocannon).
metricsRestrict the snapshot to selected metric names.
k6Pathk6 binary to use (default k6 on PATH).
envExtra environment variables for the tool run.

See Performance baselines.

desktop

FieldDescription
treeA saved accessibility-tree JSON file.
commandA command that prints an accessibility tree as JSON.
driver"macos-ax" for native macOS capture, or "ocr" for screenshot + OCR.
app(macos-ax / ocr) the running app to capture / snapshot name.
maxDepth(macos-ax) max tree depth to walk.
ocrFallbackFall back to screenshot + OCR when the structured capture is empty or fails.
screenshot(ocr) a saved image file to OCR.
screenshotCommand(ocr) command that captures an image to the {out} path.
ocrCommand(ocr) command that OCRs {image} to text on stdout (default: tesseract {image} stdout).

See Desktop snapshots.

api

FieldDescription
urlThe endpoint to call.
methodHTTP method (default GET, or POST with a body/query).
headersRequest headers, sent as-is.
bodyRaw request body, sent verbatim.
query / variablesGraphQL sugar: posts the standard JSON envelope.
includeHeadersResponse headers to keep (default ["content-type"]).

See API snapshots.

game

FieldDescription
engineAdapter id; "godot" is the only engine today.
projectEngine project directory (contains project.godot).
walkthroughPath to the walkthrough script (JSON).
mode"semantic" (default, headless) or "visual" (per-marker screenshots).
enginePathEngine binary (falls back to DUNGBEETLE_GODOT_PATH, then PATH).
seed / physicsFpsDeterminism knobs (defaults 0 / 60).
screenshotMode"advisory" (default) or "strict" visual gating.
pixelToleranceVisual tolerance override for this target.
markersPer-marker pixelTolerance overrides, keyed by marker name.

See Game snapshots.

normalization

FieldTypeDescription
ansi"semantic" | "strip"Keep styling as structured segments, or text only.
masksmask[]{ name, pattern, replacement } — replace dynamic values everywhere.

comparison

FieldTypeDescription
numericTolerance.absolutenumberAbsolute epsilon for numeric equality.
numericTolerance.relativenumberRelative epsilon (fraction).
pixelTolerance.maxChangedRationumberFraction of pixels (0–1) allowed to differ.
pixelTolerance.perChannelThresholdnumberPer-channel 0–255 delta tolerated per pixel.

Both tolerances default to {} (exact). See Comparison.

Source-available: CLI under FSL-1.1-ALv2, cloud server under BUSL-1.1. See Licensing.