CLI & slash commands
Every public command, run flag, slash command, and exit code.
v0.1.1 · Development preview
Main commands
| Command | Purpose |
|---|---|
zagent init | Create missing home files and folders |
zagent doctor | Validate settings and test the configured model endpoint |
zagent version | Print the binary version |
zagent help | Show command help |
zagent -p "task" | Run a headless task and print the final answer |
zagent sessions | List sessions |
zagent show NAME | Render a saved transcript; avoid using this command against an active engine in this preview |
zagent tools list | List tools and manifest problems |
zagent tools run NAME --args JSON | Developer tool test; approval requests are auto-granted in this mode |
Run flags
| Flag | Meaning |
|---|---|
--home DIR | Home directory; otherwise ZAGENT_HOME or executable directory |
--workspace DIR, -w | Working folder; defaults to current directory |
--session NAME, -s | Create or resume a named session |
--session | Resume the most recent session for this workspace, or create one |
--new | Force a new session |
--prompt TEXT, -p | Task text |
--prompt-file PATH | Read prompt text from a file; - reads stdin |
--attach PATH, -a | Add supported media; repeat for several attachments |
--ui headless|cli|web | Choose interface; default is headless |
--output, -o | Print the run transcript |
--output N | Print the last N transcript lines |
--json | Print run events as JSON lines |
--verbose, -v | Stream model text and activity |
--quiet, -q | Suppress progress output |
Put run flags before a positional prompt. Prefer --prompt when writing scripts. Windows PowerShell examples use .\zagent.exe unless the executable is on PATH.
Slash commands
| Command | Effect |
|---|---|
/help | List built-in and custom commands |
/stop | Interrupt the ordinary running turn and discard queued prompts |
/note TEXT | Append a note to the next request |
/compact | Request a continuation summary |
/status | Show state, usage, and tasks |
/tasks | List background tasks |
/tools | List active tools |
/workspace PATH | Change workspace when the engine permits it |
/resume | Retry immediately during a network pause |
/exit | Detach the interface; agent can keep running |
/quit | Stop the engine process |
/new | Ask the client to start a fresh session; the browser provides launch instructions |
Output and exit codes
The final answer goes to stdout; progress and diagnostics go to stderr. --json and --output change the stdout format.
| Code | Meaning |
|---|---|
| 0 | Successful CLI completion |
| 1 | Task or execution failure |
| 2 | Usage or configuration error |
| 3 | Session already owned and cannot be attached |
| 130 | Interrupted |
For automated business workflows, independently verify the intended outcome. A known remote/background completion limitation in this preview means CLI success is not a sufficient business completion signal.
For zagent v0.1.1 · Supervised evaluationNext: Sessions & context →