Package Exports
- @cli4ai/youtube
- @cli4ai/youtube/dist/run.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cli4ai/youtube) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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