Scripts and agents
Exit codes and JSON output for running the Volcano CLI from scripts, CI, and coding agents.
Exit codes
Every command exits with one of these codes, so a script or agent can tell failures apart without parsing the error text.
| Code | Meaning | What to do |
|---|---|---|
0 | Success | |
1 | Any other failure | Read the error on stderr |
2 | No credential is set, the API answered HTTP 401, or it refused the --device-code code | Run volcano login, or volcano signup for a new account |
3 | No project is selected | Run volcano connect . to create a project for this directory, or volcano use <project> |
4 | The API answered HTTP 404, or no project or other cloud resource matched the name or ID | Check the name or ID |
5 | The API answered HTTP 403, or the command needs an account token | Check the credential's access and the plan's limits |
volcano sandboxes exec and volcano sandboxes shell return the guest
process's exit code instead, and 124 on timeout. See
sandboxes.md.
JSON output
Commands that support --json print machine-readable JSON on stdout. These
include:
volcano projects listandvolcano projects getvolcano connectvolcano cloud access-tokenscreate,get,list, andusagevolcano cloud domains listandvolcano cloud domains verifyvolcano durable approvals …volcano functions invokevolcano projects keys service createvolcano sandboxes …
Run volcano <command> --help to check whether a command has --json.
volcano projects list --json | jq -r '.data[].name'