| title | Use the Sonde CLI |
|---|---|
| description | Canonical command behavior for the Sonde reference CLI, including outputs and edge cases. |
Use this page as the authoritative command contract for the Sonde reference CLI (@sonde-sh/sonde).
For normative contract semantics, read Sonde and Manifest first.
The reference CLI is intentionally focused on three outcomes:
- Generate manifest contracts from existing CLIs.
- Evaluate CLIs against those contracts and return a report.
- Stay self-compliant by exposing Sonde's own manifest contract.
- CLI arguments (
<command>,<cli>, flags). - Local
sondage.manifest.jsonforrun,score, andserve. - JSON line requests on stdin for
serve.
- Exit code
0on success,1on parse/command failure. - Human-readable text by default.
- JSON payloads for command success/failure when
--jsonis active. serveresponses are always JSON lines.- JSON command payloads include
apiVersion.
Generate sondage.manifest.json from <cli> --help and subcommand help output.
- Requires exactly one
<cli>argument. - Writes manifest to
sondage.manifest.jsonin current working directory. - Probes help commands with a 10s timeout per probe.
Evaluate a third-party CLI and return the canonical weighted report (0–100) without a local manifest file.
- Requires exactly one
<cli>argument (the CLI binary name to evaluate). - Generates a manifest in memory (does not write
sondage.manifest.json). - Runs the same scoring logic as
score: two--helpruns, then weighted report. - Use when you want a one-off evaluation or CI check without committing a manifest.
--save [path](evaluate only): write the evaluation report as JSON to a file. Ifpathis omitted, defaults to<cli>.jsonin the current directory. Directories are created if needed.
evaluate: No local manifest. Good for trying a CLI, CI pipelines, or generating a report to publish later.score: Requiressondage.manifest.jsonin the current directory. Good for validating an existing manifest or repeat checks against a fixed contract.
Print Sonde's own Sondage manifest as a reference implementation payload.
- Does not require
<cli>. - Does not require local
sondage.manifest.json. - Returns a deterministic manifest payload suitable for automation checks.
Run deterministic diagnostic checks using local manifest settings.
- Requires local
sondage.manifest.json. - Executes
manifest.cli.binary --helpunder the hood. - May auto-add preferred flags (
--json, and one non-interactive flag) if available in manifest options. <cli>is validated and echoed in output, but command execution usesmanifest.cli.binary.
Evaluate a CLI and return the canonical weighted report (0-100).
- Requires local
sondage.manifest.json. - Performs two runs of
manifest.cli.binary --help. - Uses scoring engine over both run results and returns the full evaluation report payload.
<cli>is validated and echoed in output, but command execution usesmanifest.cli.binary.
Optionally submit an evaluation report to a Sonde web endpoint.
- Requires
SONDE_PUBLISH_URLandSONDE_PUBLISH_TOKEN. - Runs
scoresemantics and posts a normalized payload plus full report details. - Intended as an optional follow-up step after local evaluation.
Start JSON-line tool protocol server backed by sondage.manifest.json.
- Requires local
sondage.manifest.json. - This is an integration capability, not required for core Sonde evaluation flow.
- Supports methods:
tools/list,tools/call. - Announces readiness:
--json:{"ok":true,"command":"serve","apiVersion":"1.0.0","protocolVersion":"1.0.0","status":"ready"}- default:
serve ready
- Each input line is parsed as JSON request.
- Invalid JSON lines return structured error with
id: null.
--json- Enables JSON success/failure payloads for
generate,evaluate,run,score. - Parse errors still write JSON to
stderrwhen--jsonis present.
- Enables JSON success/failure payloads for
--save [path]- evaluate only. Write the evaluation report to a JSON file. Default path is
<cli>.jsonif omitted.
- evaluate only. Write the evaluation report to a JSON file. Default path is
--help,-h- Works globally and per-command (
sonde run --help). - Returns plain usage text (not JSON).
- Works globally and per-command (
--version,-v- Works only at top level with no command args.
- Returns plain version text (not JSON).
- Usage:
sonde <command> [options]sonde manifest [--json]sonde serve [--json]sonde <generate|evaluate|run|score|publish> <cli> [--json]sonde evaluate <cli> [--json] [--save [path]]
- Unknown commands fail with usage error.
- Extra positional args fail (
Unexpected extra arguments for '<command>'). - Unknown flags are not special-cased and may be treated as unexpected extra args.
- Manifest
versionis semantic versioning and must followmajor.minor.patch. - Current supported manifest major version is
1; other major versions returnUNSUPPORTED_VERSION. - JSON command payloads include
apiVersionso consumers can parse envelopes safely. - Score reports include
manifestVersionandgeneratedAt. - Serve protocol messages include
protocolVersion.
{
"ok": true,
"apiVersion": "1.0.0",
"command": "generate",
"cli": "vercel",
"result": {
"commandCount": 3
}
}{
"ok": true,
"apiVersion": "1.0.0",
"command": "run",
"cli": "supabase",
"result": {
"status": "ok"
}
}{
"ok": true,
"apiVersion": "1.0.0",
"command": "score",
"cli": "vercel",
"result": {
"manifestVersion": "1.0.0",
"generatedAt": "2026-03-05T00:00:00.000Z",
"total": 96
}
}Same shape as score; use when you do not have a local manifest.
{
"ok": true,
"apiVersion": "1.0.0",
"command": "evaluate",
"cli": "vercel",
"result": {
"manifestVersion": "1.0.0",
"generatedAt": "2026-03-05T00:00:00.000Z",
"total": 85,
"jsonSupport": true,
"interactivePrompts": false,
"notes": "..."
}
}{
"ok": false,
"apiVersion": "1.0.0",
"error": {
"message": "Usage: sonde <command> [options]"
}
}{
"ok": false,
"apiVersion": "1.0.0",
"command": "run",
"cli": "supabase",
"error": {
"message": "MISSING_FILE: Manifest file not found"
}
}sonde --json --helpprints plain text help.sonde run --versiondoes not print version; it is treated as missing<cli>.servedoes not accept positional args (Usage: sonde serve [--json]).manifestdoes not accept positional args (Usage: sonde manifest [--json]).- Interactive output patterns (for example prompts like
[y/n]) mark run results as non-deterministic.