Exit Codes
envpkt CLI commands use exit codes to communicate credential health status.
Exit Code Table
Section titled “Exit Code Table”| Code | Status | Description |
|---|---|---|
0 | Healthy | All secrets pass audit — no issues detected |
1 | Degraded | Some secrets have warnings (expiring soon, stale, missing metadata) |
2 | Critical | Expired or missing secrets detected |
Commands Using Exit Codes
Section titled “Commands Using Exit Codes”envpkt audit
Section titled “envpkt audit”Returns health-based exit codes by default. With --strict, any non-healthy secret causes exit code 1 or 2.
envpkt exec
Section titled “envpkt exec”Inherits audit exit codes. With --strict, aborts execution on any non-healthy secret.
envpkt env check
Section titled “envpkt env check”With --strict, returns non-zero on any drift between TOML and environment.
envpkt fleet
Section titled “envpkt fleet”Returns the worst health status across all agents in the fleet.
CI Usage
Section titled “CI Usage”Exit codes integrate directly with CI pipeline failure detection:
# Fail pipeline on degraded or criticalenvpkt audit --strict
# Fail only on criticalenvpkt auditif [ $? -eq 2 ]; then echo "Critical credential issues — aborting deployment" exit 1fi