The utter CLI (for agents)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
utter drives desktop actions. assistant (invoked as python -m assistant) manages the
runner, models, diagnostics and installation state. They are separate entry points — this page
covers utter; the management commands are on the assistant CLI page.
The CLI is built to be driven by another program: every command takes --json, output is stable
and versioned, and the exit codes are part of the contract.
Quickstart
Section titled “Quickstart”utter capabilities --jsonutter schema --jsonutter assistant "open youtube" --dry-run --jsonutter dictation "hello" --dry-run --jsonutter assistant "open youtube" --jsonThe JSON contract
Section titled “The JSON contract”Every successful response uses the same envelope:
{ "schema": "utter.cli/v1", "ok": true, "command": "assistant", "data": { } }Errors use the same envelope with ok: false and an error object:
{ "schema": "utter.cli/v1", "ok": false, "command": "assistant", "error": { "code": "E_BLOCKED", "message": "Action execution requires --confirm." } }JSON is printed only on stdout; human diagnostics go to stderr. utter schema --json is the
machine-readable command and error registry, and returns the complete Draft 2020-12 response
schema (also packaged at utter/data/cli.schema.json).
Commands
Section titled “Commands”| Command | Purpose |
|---|---|
utter assistant TEXT / utter --assistant TEXT | Route a spoken-style command. --dry-run returns the plan without executing; acting requires --confirm. |
utter dictation TEXT / utter --dictation TEXT | Type literal text into the focused field (wtype, falling back to ydotool). |
utter listen | Capture for up to --timeout SEC (default 10) and act with --confirm; --transcribe-only returns the recognised text. |
utter speak TEXT | Local text-to-speech (espeak-ng, falling back to espeak). |
utter transcribe --file FILE | Transcribe an uncompressed 16 kHz WAV with the configured local STT backend. |
utter capabilities --json | Input/audio backends, TTS, GPU presence and compute runtime, installed models, runner connectivity. |
utter schema --json | Versioned command and error registry plus the full response schema. |
utter apps list --json | App profile identifiers and aliases. |
utter actions list [--app ID] --json | Action catalog, optionally scoped to an app. |
utter profiles --json | Loaded profile summary. |
utter status --json, utter doctor --json | Runner state and diagnostics. |
utter version --json | Utter version. |
utter settings list|get|set | Read or edit the active TOML settings. |
utter commands list|set|remove | List built-in app shortcuts; create or remove per-app custom spoken phrases. |
Settings and custom commands
Section titled “Settings and custom commands”Settings use dotted keys matching the config sections. Values passed to settings set are JSON
values, type-checked against Utter’s config model. Use --dry-run to preview; writing requires
--confirm. Edits preserve other TOML lines and comments and replace the file atomically.
utter settings list --jsonutter settings get stt.device --jsonutter settings set stt.device --value '"cuda"' --dry-run --jsonutter settings set audio.sample_rate --value 48000 --confirm --jsoncommands set APP PHRASE CHORD adds a phrase for one app: when that app is focused and the phrase
is spoken, Utter sends the configured key chord. It accepts only a bounded printable phrase and a
keyboard chord — it cannot define shell commands or arbitrary action arguments.
utter commands list --app firefox --jsonutter commands set firefox "toggle developer tools" ctrl+shift+i --dry-run --jsonutter commands set firefox "toggle developer tools" ctrl+shift+i --confirm --jsonutter commands remove firefox "toggle developer tools" --confirm --jsonExit and error contract
Section titled “Exit and error contract”| Exit | Meaning | Error codes |
|---|---|---|
| 0 | Completed | — |
| 1 | Action failed or no action matched | E_ACTION_FAILED, E_NO_ACTION |
| 2 | Usage error | E_USAGE |
| 3 | Blocked, or explicit confirmation required | E_BLOCKED |
| 4 | Required backend unavailable, or preview timed out | E_BACKEND_UNAVAILABLE, E_RUNNER_UNAVAILABLE, E_PREVIEW_TIMEOUT |
| 5 | Requested app or resource not found | E_NOT_FOUND |
Use --non-interactive for automation; JSON mode never prompts. Run mutating operations with
--dry-run first. Consequential actions require explicit confirmation, and the risky terminal
and input abilities remain governed by runner policy.
Safety
Section titled “Safety”CLI text is a user request. Screen, accessibility, OCR, clipboard and window-title data remain untrusted selectors and can never supply action arguments — the runner’s default-deny and provenance rules in Trust & safety still apply.
- Assistant dry-runs execute in an isolated daemon process with a four-second hard limit; the JSON
data.plancontains the selected route and prepared arguments, and a timeout returnsE_PREVIEW_TIMEOUTrather than waiting indefinitely. utter listenandutter transcribeneed the optional sounddevice/NumPy/STT runtime.- The older
utter --text TEXTandpython -m utter.daemonservice interfaces remain available.