Exit codes
What each opentide exit code means, and how to gate CI on them.
Every opentide command sets a process exit code so pipelines can gate on results without parsing output. Combine these with --json for structured detail.
OpenTide uses the same result semantics in human and JSON modes: presentation follows ok / status, while the process exit code is CI policy.
Codes
| Code | Meaning | Emitted when |
|---|---|---|
0 | Success | The command completed or intentionally skipped without an operational failure. Success JSON includes "ok": true. |
1 | Error | Validation/deployment errors, network/runtime failure, or --strict with warnings. |
2 | Usage error | Invalid arguments, missing required flags, or an explicitly unsupported command. |
There is no soft-failure exit code. Warnings are listed under warnings in JSON (and printed in human mode) and only fail the process when --strict is set.
How warnings vs errors work
validate and deploy record outcomes during the run:
| Signal | Set when | Affects |
|---|---|---|
VALIDATION_ERROR_RAISED | Any validation error | Exit 1, status: failed |
VALIDATION_WARNING_RAISED | Any validation warning | Exit 1 with --strict; otherwise exit 0 with warnings |
DEPLOYMENT_ERROR_RAISED | Any deployment error | Exit 1, status: failed |
DEPLOYMENT_WARNING_RAISED | Any deployment warning | Exit 0 with warnings |
With --json, failures still write one complete object to stdout before exiting:
{
"ok": false,
"status": "failed",
"message": "Validation failed"
}Diagnostics use stderr. Automation should parse stdout and evaluate both ok/status and the process exit code.
Gating CI
opentide validate --strict # warnings and errors both fail the job
opentide validate # errors fail; warnings are reported but exit 0For finer control:
if opentide validate --json > result.json; then
echo "validation passed"
else
code=$?
echo "validation failed with exit code $code"
[ -s result.json ] && cat result.json
exit $code
fi