capture_helper.cli_click module
Capture Helper — click-based command-line interface.
Twin of capture_helper.cli_argparse: same public surface
(identical subcommand names, identical flag semantics), but implemented
with click so users who already have a click-native shell setup
(bash / zsh completion via click.shell_completion, colored --help,
nested command groups) can plug it in without friction. Installed as
the capture-helper-click entry point in pyproject.toml.
Design notes
Subcommands mirror
capture-helper(the argparse twin) so both CLIs can be introspected identically by higher layers (FastAPI, MCP).Flags reuse the argparse names (
--kind/--name/ …) rather than the more idiomatic click positional style — consistency across the two CLIs beats micro-idiomaticity here.Errors from the library propagate unchanged; click handles the formatting.
Usage Example
>>> # capture-helper-click list-sources
>>> # capture-helper-click pick-source --kind camera --name FaceTime
>>> # capture-helper-click input-args --kind microphone --index 0
>>> # capture-helper-click capture-camera --output-dir frames/ \
>>> # --output-width 640 --output-height 360 --max-frames 30
>>> # capture-helper-click capture-mic --output mic.wav --seconds 3