cli-exit-1-on-error
IN premise
All CLI error paths catch specific exceptions from the API (`KeyError`, `ValueError`, `PermissionError`, `FileNotFoundError`), print to stderr, and call `sys.exit(1)`.
Summary
When something goes wrong during a CLI command — like a missing file, bad input, or a permissions problem — the tool catches that specific error, tells you what happened on stderr, and exits with code 1. This means scripts and automation can reliably detect failures, and users always get a human-readable error message instead of a raw Python traceback.
Details
| Source | entries/2026/04/29/reasons_lib-cli.md |