@cli4ai/youtube
Official @cli4ai package • https://cli4ai.com • Install cli4ai: npm i -g cli4ai
Fetch transcripts, search within videos, browse channels and playlists (powered by yt-dlp).
Setup
npm i -g cli4ai
cli4ai add -g youtube
yt-dlp is required. If it’s missing, cli4ai run youtube … will prompt you to install it.
Commands
cli4ai run youtube transcript <url> [format]
cli4ai run youtube search <url> <query>
cli4ai run youtube info <url>
cli4ai run youtube channel <handle> [limit]
cli4ai run youtube playlist <url> [limit]
cli4ai run youtube batch <url1> <url2> ...
cli4ai run youtube find <query> [limit]
Examples
cli4ai run youtube transcript "https://youtu.be/AJpK3YTTKZ4"
cli4ai run youtube transcript AJpK3YTTKZ4 timestamped
cli4ai run youtube search AJpK3YTTKZ4 "terminal"
cli4ai run youtube channel @anthropic-ai 5
cli4ai run youtube find "claude ai tutorial" 10
cli4ai run youtube info AJpK3YTTKZ4
Notes
- Works with youtube.com, youtu.be, and shorts URLs
- Transcripts use auto-captions when manual captions aren't available
- Search returns timestamps with direct links to that exact moment
text format deduplicates overlapping auto-caption segments