For agents
An agent does not need pretty output. It needs parseable results, confirmations that cannot hang, and a next step it can find by itself when something fails. This page covers all three.
Output format
--format picks the shape of the output; --json is shorthand for --format json:
human: tables and colours for people, the default on an interactive terminal.agent: compact text for agents, with the command to run next.json: structured output whose fields match the operation’s response.
When the output is a pipe the default is not human: json without an agent environment detected, agent with one. In a script, pass --json explicitly.
praxis api model list --limit 3 --jsonNever wait for input
Operations that change state (delete, overwrite) ask once by default. An agent does one of two things:
--yes: confirm this operation.--no-input: never prompt; fail immediately with an error when a confirmation would be needed. Agent mode turns this on by default, so a command cannot hang.
For destructive operations, keep --no-input and let the agent decide to add --yes after reading a clear error.
Read the error
On failure (with --json) the CLI prints an error object whose three fields are enough for an agent to recover:
| Field | Content |
|---|---|
code | A stable code, such as a usage error, not signed in, or a rejected credential |
message | One sentence on what happened |
hint | The command to run next or the parameter to fix; a generic hint when nothing specific applies |
The same object carries env and command, and operation failures add status and request_id. An agent can branch on code and pass hint to the next step or the next person.
Install the CLI guide into a workspace
praxis skill --install .Writes the CLI guide to praxis-cli/SKILL.md under the given directory, so an agent reading that workspace knows the commands and options. Without --install the guide goes to standard output, ready to paste into a prompt.
A complete call
praxis api sandbox list --json --no-inputThe agent gets a JSON list and no prompt can block it; on failure it reads code and hint. To create or delete, add --yes for that call rather than dropping --no-input.
Next
- Exit codes and errors: judging success and retrying in a script.
- Call the API: parameters, paging, environments.