CLI Error Style Guide¶
This guide defines the error/exit behavior for Consist CLI commands.
Message Structure¶
Use short, actionable messages:
Error: <what failed>Hint: <how to fix it>(optional, when recovery is clear)
Examples:
Error: run_id requiredError: Database not found at /path/to/provenance.duckdbHint: Use --db-path or set CONSIST_DB
Exit Codes¶
0: success1: runtime/data error (missing DB, missing artifact, failed load)2: usage/validation error (bad flag value, invalid argument shape)130: interrupted by user (Ctrl+C)
Rules¶
- Keep messages specific to the failing input, key, or path.
- Prefer one clear hint over multiple speculative hints.
- Keep non-interactive output parseable; avoid extra noise around errors.
- Do not change successful output formats when adding new error handling.