Output and exit codes
Read Nodaro CLI output as tables or JSON, follow runs to the end with --watch, and branch on the exit codes for failed, cancelled and held runs in scripts.
The output of the Nodaro CLI is readable in a terminal by default and machine-readable with --json. With --watch, a run command waits until the run ends and reports the outcome in its exit code, so a shell script or a CI job can branch on it.
Tables and JSON
Without --json, a list command prints a small ASCII table and a get command prints a formatted JSON block. Every read command accepts --json and then prints the full payload, ready for jq:
nodaro projects list --json | jq '.[].id'
nodaro workflows run wf_abc --jsonFollow a run with --watch
A run command returns as soon as Nodaro accepts the run. Add --watch to keep polling until the run ends:
nodaro workflows run wf_abc --watch
nodaro nodes run generate-image --param prompt="a snow leopard" --watch --poll-interval 1000--watch works on the run commands, such as workflows run, apps run and nodes run, on executions get, and on the generation commands of the asset and media groups. --poll-interval sets the time between two polls, in milliseconds.
Exit codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | Not authorized, not found, an argument error or a network error. |
2 | --watch ended and the execution failed. |
3 | --watch stopped because the job is held for review (pending_review). A person is deciding; it is not a failure. |
130 | --watch ended and the execution was cancelled. |
With --json, the CLI prints the payload and returns without setting the codes 2, 3 and 130. In that mode, branch on the status field of the output:
status=$(nodaro workflows run wf_abc --watch --json | jq -r '.status')When the token is missing, expired or invalid, the CLI says so, suggests nodaro auth login and exits with code 1. For other API errors, it prints the message and the error code. The codes are listed in Errors.
When a job is held for review
Some deployments review generations before they release them. On such a deployment, a job can enter the pending_review status. The work is done, the credits stay reserved, and a person decides whether to release the result.
The status does not change on its own, so --watch stops polling. It prints awaiting review (a human decision is pending; not a failure) and exits with code 3.
- Do not run the request again. A duplicate would be held too.
- Check back later with
nodaro jobs get <id>. The job ends in one of three states:
| Status | Meaning |
|---|---|
completed | The result was approved and released. |
failed | The result was rejected. error_hint.kind is policy-block, and error_hint.reason is the text to show your user. |
cancelled | The job was cancelled. |
nodaro nodes run generate-image --param prompt="..." --watch
case $? in
0) echo "released" ;;
3) echo "awaiting review, check back later" ;;
*) echo "failed" ;;
esacFrequently asked questions
Related
Commands
Examples
Parameters and input files
Errors
Last updated on
Parameters and input files
How the Nodaro CLI turns repeated --param and --input key=value pairs into a request body, how values get their type, and when to send a JSON file instead.
Asset commands
Create characters, locations and objects from the Nodaro CLI, generate and approve their main pictures, and add variants and motion clips to each asset.