UNOUNOCODE

AUTOMATE

Headless runs

uno -p runs one task with nobody watching: no screen, no questions. It prints the answer and exits with a code your script can check.

IN ONE LINEEdits go ahead (and can be undone); anything else that would ask is refused; exit code 2 tells you something was refused.
prompt / stdin uno -pno one to ask stdout · answer stderr · status exit 0 · 2 · 3
Three outputs, each for a different reader: you, your logs, your script.

Basics

uno -p "add a test for parse_date"                  # one task
uno -p "review this diff for bugs: $(git diff)"     # the diff goes in the prompt
uno -p "fix the lint errors" --allow "bash(npm run lint)"
uno -p "summarise src/billing" --mode plan           # read-only
uno -p "..." --output json | jq .result              # for scripts
uno --output json < task.txt                       # a long prompt, piped

Pipe a long prompt, or one written by another program, on standard input rather than giving it to -p. The command line is visible to every process through ps: a pkill -f the model runs to stop a program named in the prompt would match Uno too. Piped, the text is the whole prompt and the other flags work as with -p, except --image: name an image in the text with @ instead.

What is allowed with nobody to ask

WhatDefaultTo change it
Reading and searchingalloweda deny rule
Changing files in the projectallowed, undoable--mode default or --mode plan
.git/, .uno/, .claude/refused--mode bypass (not advised)
Shell commandsrun in the sandbox without asking--allow "bash(…)" to run one outside
Web pages, MCP callsrefused unless a rule allows--allow web_fetch(docs.rs)
Files outside the projectrefused--mode bypass, for a throwaway container; .env, keys, ~/.ssh and other credential folders, and Uno's own folders stay refused (permissions)
.env and key filesrefusednone

Continue a headless session

uno -p "plan the migration, write it to PLAN.md"
uno --resume -p "now do step 1"
uno --resume -p "now step 2"

A --deadline run tells the model the time it has left. Those notes stay in the session file but are left out when the session is resumed or forked, so a later run is never told an old deadline; give it --deadline again if it has one of its own.

DESIGN DECISION · D26

A headless run starts in accept-edits. Asking before every edit with nobody there would make -p useless, and edits stay inside the project and can be undone. Everything else that would ask is refused rather than allowed, and the exit code says so, so a script never silently does less than you think.