Skip to main contentModule output
Source - exit_codes
- Exit codes for agent-friendly error handling.
Agents can branch on specific failure modes without parsing error text.
- OutputConfig
- Output configuration for agent-friendly CLI design.
- OutputFormat
- Output format selection.
- error_kind_and_code
- Map an error to its kind string and exit code.
- exit_code_for_error
- Map an error to a specific exit code by downcasting to ApiError.
- print_error_envelope
- Write a structured error envelope as the last line of stderr.
Always call this before process::exit on non-zero paths.
- use_color
- Whether to use colored output (only when stdout is a terminal).