youtube_helper.cli_click module

YouTube Helper — click-based command-line interface.

Twin of youtube_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 youtube-helper-click entry point in pyproject.toml.

Design notes

  • Subcommands mirror youtube-helper (the argparse twin) so both CLIs can be introspected identically by higher layers (FastAPI, MCP).

  • Flags reuse the argparse names (--url / --output / …) 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

>>> #   youtube-helper-click metadata     --url https://www.youtube.com/watch?v=YE7VzlLtp-4
>>> #   youtube-helper-click audio        --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --output out.mp3
>>> #   youtube-helper-click resolve      --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --prefer audio
>>> #   youtube-helper-click channel-info --url https://www.youtube.com/@blender

Author

Warith Harchaoui, Ph.D. — https://linkedin.com/in/warith-harchaoui/