Scripting with --print
Run one task without the prompt, from a script or a scheduled job, and act on how it ended.
One task, then exit
soreqen --print "run the tests and fix what fails"
--print (or -p) runs the instruction once and exits. There is no prompt, so it suits scripts, scheduled jobs and other tools.
It needs a model to be set up already, by soreqen login or a key. Where there is none, it exits with an error instead of asking.
Exit codes
| Code | Meaning |
|---|---|
0 | Done. |
1 | Failed. |
2 | Stopped short of finishing. |
130 | Cancelled. |
soreqen -p "update the changelog for the release" || echo "needs a look"
Choosing what it may do
The mode still applies. For a report that must not change anything, use Plan:
soreqen -p --mode plan "explain how authentication works here"
To set a hard limit regardless of the mode, add a tier:
soreqen -p --tier read_only "list the endpoints that skip the auth check"