Exit Codes

CLI exit codes and their meanings

Automation scripts and CI/CD pipelines should rely on these exit codes when interpreting results from the choochoo CLI.

CodeNameDescription
0SUCCESSCommand completed successfully.
1VALIDATION_ERRORSchema validation failed or quality rules were not met. See Error Messages for details.
2CONFIG_ERRORThe .choochoorc file is missing or invalid.
3NETWORK_ERRORFailed to communicate with the remote API or registry.
4AUTH_ERRORAuthentication failed or insufficient permissions. Check your RBAC or SSO configuration.
5NOT_FOUNDThe requested artifact or resource does not exist.
10APPROVAL_REQUIREDThe action requires human approval and cannot proceed automatically. The risk score exceeded the auto-approve threshold.
11APPROVAL_REJECTEDThe action was rejected by an approver via the approval workflow.
99INTERNAL_ERRORAn unexpected bug in the CLI. Please report this via Contributing.

Usage in CI/CD

In GitHub Actions or GitLab CI, you can use these exit codes to branch your pipeline logic:

choochoo validate --strict
EXIT_CODE=$?

case $EXIT_CODE in
  0)  echo "All validations passed" ;;
  1)  echo "Validation failed — check error messages" ;;
  10) echo "Human approval required — notifying approvers" ;;
  *)  echo "Unexpected exit code: $EXIT_CODE" ;;
esac

The --strict flag treats warnings as errors (exit code 1). You can configure this as the default in your .choochoorc configuration.

Common Scenarios

On this page