RightNow Agent runs one prompt without the interactive UI when you pass -p, --single, or --print. It executes approved local tools, writes the result to standard output, and exits.
$env:RIGHTNOW_API_KEY = "<your key>"
.\rightnow.ps1 -p "Review this workspace for broken imports"
.\rightnow.ps1 --print "Summarize the API" --cwd C:\work\project
.\rightnow.ps1 -m runinfra -p "Explain the failing test"The same flags can be passed to rightnow-pager.exe. The shipped configuration uses RunInfra as the default provider.
| Option | What it does |
|---|---|
| -p, --single, --print <PROMPT> | Send one prompt, print the result, and exit. |
| --cwd <PATH> | Use PATH as the working directory. |
| -m, --model <MODEL> | Select a configured model entry. |
| --output-format <FORMAT> | Choose plain, json, streaming-json, or streaming-messages-json. |
| --json-schema <SCHEMA> | Constrain the model to a JSON Schema and imply JSON output. |
| --always-approve | Approve offered tool permissions automatically. |
| --yolo | Alias for --always-approve. |
| --dangerously-skip-permissions | Alias for --always-approve. |
| Format | Use |
|---|---|
| plain | Human-readable final text. This is the default. |
| json | One final JSON object with response, session, stop, and available usage fields. |
| streaming-json | Newline-delimited RightNow events for text, tools, usage, plans, completion, and errors. |
| streaming-messages-json | Newline-delimited Messages API style frames, ending with a result record. |
.\rightnow.ps1 -p "List the changed modules" --output-format json
.\rightnow.ps1 -p "Return the package name" --json-schema '{"type":"object","properties":{"package":{"type":"string"}},"required":["package"]}'--always-approve, --yolo, and --dangerously-skip-permissions all auto-approve offered tool executions. Use them only in a trusted workspace and host environment. Deny rules, hooks, and administrator locks still take precedence.
Headless mode cannot open an approval prompt. If a tool still requires a human decision, the request fails closed with exit code 20.
| Code | Meaning |
|---|---|
| 0 | Completed successfully. For action requests, at least one executable tool call completed. |
| 20 | Refused, cancelled, or blocked by permission policy. |
| 21 | No actionable tool call completed, or a human answer was required. |
| 22 | A tool failed, stayed incomplete, or the turn limit stopped verification. |
| 23 | The model backend or ACP connection was unavailable before completion. |
| 1 | Startup, configuration, authentication, output, or another unclassified failure. |
Treat the process exit code and structured terminal output as the automation result. For action prompts, JSON and streaming terminal records expose observed effects. The local unified JSONL log under ~/.rightnow/logs/unified.jsonl is the diagnostic record when a run needs investigation. Do not treat a confident sentence from the model as proof that local work completed.