Context
The CLI has a well-defined exit code hierarchy in packages/cli/src/error-handler.ts:
| Code |
Meaning |
| 0 |
Success |
| 1 |
General error |
| 2 |
Authentication error |
| 3 |
Validation error |
| 4 |
Configuration error |
| 5 |
Not found |
These are useful for agents and scripts to branch on failure type without parsing error messages. However, they're not documented anywhere user-facing.
Proposal
Add an EXIT CODES section to the main productive --help output:
EXIT CODES:
0 Success
1 General error (unexpected failure)
2 Authentication error (invalid/expired token)
3 Validation error (missing or invalid arguments)
4 Configuration error (missing apiToken, orgId, etc.)
5 Resource not found
Also mention in the README.
Context
The CLI has a well-defined exit code hierarchy in
packages/cli/src/error-handler.ts:These are useful for agents and scripts to branch on failure type without parsing error messages. However, they're not documented anywhere user-facing.
Proposal
Add an
EXIT CODESsection to the mainproductive --helpoutput:Also mention in the README.