Skip to content
Unsnag

Commands

Runs real coding agents against your CLI and tells you, with evidence, what to change so they succeed.

unsnag <command> [options]
CommandDescription
unsnag initWrite unsnag/benchmark.yaml and unsnag/.gitignore for a Target CLI in this folder; --skill installs Unsnag's agent skill.
unsnag validateCheck unsnag/benchmark.yaml and every Scenario, reporting all errors at once (free; no containers or credentials unless --build).
unsnag keyManage the OpenRouter API key.
unsnag draftDraft new Scenarios with the explainer Agent; each draft that passes verify is written as a new file in unsnag/drafts/, and an existing file is never overwritten.
unsnag scenariosList the Scenarios and the Draft Scenarios with their tags, verify status and leak lint hits, and which commands their Reference Solutions exercise.
unsnag runRun the Benchmark and store a Report.
unsnag waitWait for a Report to finish and exit with its result.
unsnag reportShow a stored Report (default: the latest); --open opens it as HTML, --serve serves it over HTTP.
unsnag reportsList the stored Reports, oldest first.
unsnag diffCompare Report <b> with Report <a> as its Baseline.
unsnag analyzeRebuild a stored Report's Findings and its comparison with the Baseline (default: the latest Report).
unsnag loginSign this machine in to the App: shows a code and opens the browser, where you approve it for an Organization; the token is stored readable only by you (UNSNAG_TOKEN in the environment takes precedence).
unsnag logoutSign this machine out of the App: revokes the logins unsnag login stored, and removes them.
unsnag linkTie this folder to a Project in the App: writes unsnag/project.yaml, and unsnag run here then runs the Project's Benchmark and puts the Report in the App.
unsnag unlinkRemove this folder's link to its Project (unsnag/project.yaml); the Project, its Benchmark and its Reports stay in the App.
unsnag importMake this folder's unsnag/benchmark.yaml and Scenarios the next version of the Benchmark of the Project the folder is linked to; the App holds it from then on.
unsnag pushPut a stored Report (default: the latest) in the App, in the Project this folder is linked to: its Runs, its events and its Findings.
unsnag schemaPrint the JSON Schema for unsnag/benchmark.yaml and Scenario files, as published at unsnag.com/schemas.
unsnag telemetryShow whether the CLI sends usage Telemetry (which command ran and how it ended; never your Scenarios, code or option values), and turn it on or off on this machine; see https://unsnag.com/docs/telemetry.

Global options

These work with every command, before or after its name (-V, --version only on its own). -h, --help shows the help of any command.

FlagDescriptionDefault
-V, --versionPrint the Unsnag version.
--jsonPrint one JSON document on stdout.
-q, --quietHide progress.
--progress <form>How progress shows: tty redraws in place, plain appends lines, auto picks. One of auto, tty, plain.auto
--no-colorTurn colours off (also NO_COLOR=1).
--config <path>Use this Benchmark file instead of unsnag/benchmark.yaml.

Output

  • stdout carries the result and nothing else; stderr carries progress, warnings and errors.
  • --json prints exactly one JSON document on stdout: {"data": …, "warnings": [{code, message, hint?}]} on success, {"error": {code, message, hint}} on failure. See errors.
  • --quiet silences progress. Warnings and errors still print.
  • --progress auto|tty|plain picks how progress shows. tty redraws it in place; plain appends lines and, after 60 seconds without progress, prints a heartbeat with the elapsed time and the cost so far. auto (the default) picks tty when stderr is a terminal, and plain otherwise or in a coding-agent session (CLAUDECODE and the like).
  • Colour is on only when the stream is a terminal or FORCE_COLOR is set, and always off with --no-color or a non-empty NO_COLOR.
  • The exit code is 0 on success and 1 otherwise. The reason is in error.code or in the result's status (see statuses).

Telemetry

Each command sends one usage event when it ends: which command, the version, the OS, how long it took and how it ended, never your Scenarios, code or option values. The first command in a terminal says so on stderr and sends nothing. Telemetry lists every field and every way to turn it off: unsnag telemetry disable, DO_NOT_TRACK=1 or UNSNAG_TELEMETRY_DISABLED=1.