elbow_helper.cli_click module

click command-line interface — the optional, ergonomic CLI twin.

Identical behaviour to elbow_helper.cli_argparse, but built on click for a nicer help/UX. click is an optional dependency (pip install 'elbow-helper[cli]'): the argparse CLI is the always-available one, so importing this module lazily requires click and fails with an actionable message if it is missing. Every command delegates to the shared elbow_helper._core_cli, so the two CLIs can never drift apart.

Consumes: click (optional), elbow_helper._core_cli, os_helper. Produces: cli() (the elbow-helper-click console-script entry point).

Author

Warith Harchaoui, <warith.harchaoui@deraison.ai>

elbow_helper.cli_click.main()[source]

Console entry point (elbow-helper-click).

click’s own main() only special-cases ClickException/Abort (and a broken pipe); a plain library exception (e.g. ValueError from locator on a malformed curve) would otherwise propagate as a raw Python traceback instead of a clean CLI error. This wraps the whole invocation and translates that last case into a one-line stderr message + exit 1 — click’s own control flow (usage errors, --help, an explicit sys.exit(1) in a subcommand) already raises SystemExit, a BaseException this does not catch, so it passes through untouched.

Return type:

None