@cli4ai/youtube
v1.0.12
Published
YouTube transcript tool (powered by yt-dlp)
Downloads
60
Maintainers
Readme
@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 youtubeyt-dlpis required. If it’s missing,cli4ai run youtube …will prompt you to install it.
Commands
cli4ai run youtube transcript <url> [format] # Get transcript (text|timestamped|json)
cli4ai run youtube search <url> <query> # Search within video transcript
cli4ai run youtube info <url> # Video metadata
cli4ai run youtube channel <handle> [limit] # Recent videos from channel
cli4ai run youtube playlist <url> [limit] # Videos in playlist
cli4ai run youtube batch <url1> <url2> ... # Batch get transcripts
cli4ai run youtube find <query> [limit] # Search YouTubeExamples
# Get plain text transcript
cli4ai run youtube transcript "https://youtu.be/AJpK3YTTKZ4"
# Get timestamped transcript
cli4ai run youtube transcript AJpK3YTTKZ4 timestamped
# Search for "terminal" in a video - returns clickable timestamps
cli4ai run youtube search AJpK3YTTKZ4 "terminal"
# Get Anthropic's last 5 videos
cli4ai run youtube channel @anthropic-ai 5
# Search YouTube
cli4ai run youtube find "claude ai tutorial" 10
# Get video info (views, likes, duration, etc)
cli4ai run youtube info AJpK3YTTKZ4Notes
- 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
textformat deduplicates overlapping auto-caption segments
