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.
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
| What | Default | To change it |
|---|---|---|
| Reading and searching | allowed | a deny rule |
| Changing files in the project | allowed, undoable | --mode default or --mode plan |
.git/, .uno/, .claude/ | refused | --mode bypass (not advised) |
| Shell commands | run in the sandbox without asking | --allow "bash(…)" to run one outside |
| Web pages, MCP calls | refused unless a rule allows | --allow web_fetch(docs.rs) |
| Files outside the project | refused | --mode bypass, for a throwaway container; .env, keys, ~/.ssh and other credential folders, and Uno's own folders stay refused (permissions) |
.env and key files | refused | none |
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.
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.