Commands
Runs real coding agents against your CLI and tells you, with evidence, what to change so they succeed.
unsnag <command> [options]| Command | Description |
|---|---|
unsnag init | Write unsnag/benchmark.yaml and unsnag/.gitignore for a Target CLI in this folder; --skill installs Unsnag's agent skill. |
unsnag validate | Check unsnag/benchmark.yaml and every Scenario, reporting all errors at once (free; no containers or credentials unless --build). |
unsnag key | Manage the OpenRouter API key. |
unsnag draft | Draft 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 scenarios | List the Scenarios and the Draft Scenarios with their tags, verify status and leak lint hits, and which commands their Reference Solutions exercise. |
unsnag run | Run the Benchmark and store a Report. |
unsnag wait | Wait for a Report to finish and exit with its result. |
unsnag report | Show a stored Report (default: the latest); --open opens it as HTML, --serve serves it over HTTP. |
unsnag reports | List the stored Reports, oldest first. |
unsnag diff | Compare Report <b> with Report <a> as its Baseline. |
unsnag analyze | Rebuild a stored Report's Findings and its comparison with the Baseline (default: the latest Report). |
unsnag login | Sign 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 logout | Sign this machine out of the App: revokes the logins unsnag login stored, and removes them. |
unsnag link | Tie 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 unlink | Remove this folder's link to its Project (unsnag/project.yaml); the Project, its Benchmark and its Reports stay in the App. |
unsnag import | Make 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 push | Put 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 schema | Print the JSON Schema for unsnag/benchmark.yaml and Scenario files, as published at unsnag.com/schemas. |
unsnag telemetry | Show 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.
| Flag | Description | Default |
|---|---|---|
-V, --version | Print the Unsnag version. | |
--json | Print one JSON document on stdout. | |
-q, --quiet | Hide progress. | |
--progress <form> | How progress shows: tty redraws in place, plain appends lines, auto picks. One of auto, tty, plain. | auto |
--no-color | Turn 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.
--jsonprints exactly one JSON document on stdout:{"data": …, "warnings": [{code, message, hint?}]}on success,{"error": {code, message, hint}}on failure. See errors.--quietsilences progress. Warnings and errors still print.--progress auto|tty|plainpicks how progress shows.ttyredraws it in place;plainappends lines and, after 60 seconds without progress, prints a heartbeat with the elapsed time and the cost so far.auto(the default) picksttywhen stderr is a terminal, andplainotherwise or in a coding-agent session (CLAUDECODEand the like).- Colour is on only when the stream is a terminal or
FORCE_COLORis set, and always off with--no-coloror a non-emptyNO_COLOR. - The exit code is 0 on success and 1 otherwise. The reason is in
error.codeor in the result'sstatus(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.