youtube_helper.cli_argparse module
YouTube Helper — argparse-based command-line interface.
Thin wrapper around the pure functions in youtube_helper.main,
youtube_helper.streaming and youtube_helper.branding that
exposes the whole toolkit as subcommands under a single youtube-helper
entry point. Written with argparse from the standard library so
the CLI works out of the box on any Python install that has the package
installed — no extra dependency required.
Subcommands
metadata— dump JSON metadata for one video URLvalid— exit 0 iff the URL is a valid video URL for yt-dlpvideo— download the video track to diskaudio— download the audio track to diskthumbnail— download the thumbnail image to diskresolve— resolve a URL to a direct ffmpeg-ready media URLlist-streams— enumerate every video format yt-dlp findspick-stream— pick a single best video format matching constraintschannel-info— channel snapshot (subs, video count, total views)channel-videos— list channel videos with normalised engagement metricsengagement— one-video engagement snapshot (views/likes/comments)engagement-batch— multi-URL engagement snapshotsubtitles— download (auto) subtitles for a video into a foldercomments— dump top comments of a videoytdlp-version— print installed yt-dlp version
Usage Example
>>> # youtube-helper metadata --url https://www.youtube.com/watch?v=YE7VzlLtp-4
>>> # youtube-helper audio --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --output out.mp3
>>> # youtube-helper video --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --output out.mp4
>>> # youtube-helper thumbnail --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --output out.png
>>> # youtube-helper resolve --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --prefer audio
>>> # youtube-helper list-streams --url https://www.youtube.com/watch?v=YE7VzlLtp-4
>>> # youtube-helper pick-stream --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --prefer-codec h264
>>> # youtube-helper channel-info --url https://www.youtube.com/@blender
>>> # youtube-helper engagement --url https://www.youtube.com/watch?v=YE7VzlLtp-4
>>> # youtube-helper subtitles --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --output-dir subs/
>>> # youtube-helper comments --url https://www.youtube.com/watch?v=YE7VzlLtp-4 --max 50