YouTube API CLI
Manage your YouTube account from the command line. Complete CLI for YouTube Data API v3 - list/search videos, upload, manage playlists, and more.
Manage your YouTube account from the command line. Complete CLI for YouTube Data API v3 - list/search videos, upload, manage playlists, and more.
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Manage your YouTube account from the terminal. A complete CLI for the YouTube Data API v3.
# Using go install go install github.com/nerveband/youtube-api-cli/cmd/yt-api@latestOr download from releases
curl -L -o yt-api https://github.com/nerveband/youtube-api-cli/releases/latest/download/yt-api-darwin-arm64 chmod +x yt-api sudo mv yt-api /usr/local/bin/
mkdir -p ~/.yt-api cat > ~/.yt-api/config.yaml << EOF default_auth: oauth default_output: json oauth: client_id: "YOUR_CLIENT_ID" client_secret: "YOUR_CLIENT_SECRET" EOF
yt-api auth login # Opens browser for Google login yt-api auth status # Check auth state
# List your videos yt-api list videos --mineList channel videos
yt-api list videos --channel-id UC_x5XG1OV2P6uZZ5FSM9Ttw
List playlists
yt-api list playlists --mine
List subscriptions
yt-api list subscriptions --mine
# Basic search yt-api search --query "golang tutorial"With filters
yt-api search --query "music" --type video --duration medium --order viewCount
# Upload video yt-api upload video ./video.mp4 \ --title "My Video" \ --description "Description here" \ --tags "tag1,tag2" \ --privacy publicUpload thumbnail
yt-api upload thumbnail ./thumb.jpg --video-id VIDEO_ID
# Create playlist yt-api insert playlist --title "My Playlist" --privacy privateAdd video to playlist
yt-api insert playlist-item --playlist-id PLxxx --video-id VIDxxx
# Get channel info yt-api list channels --id UCxxx --part snippet,statisticsUpdate channel description
yt-api update channel --id UCxxx --description "New description"
# JSON (default - LLM-friendly) yt-api list videos --mineTable (human-readable)
yt-api list videos --mine -o table
YAML
yt-api list videos --mine -o yaml
CSV
yt-api list videos --mine -o csv > videos.csv
| Flag | Short | Description |
|---|---|---|
| | Output format: json (default), yaml, csv, table |
| | Suppress stderr messages |
| Path to config file | |
| Auth method: oauth (default), service-account |
| Variable | Description |
|---|---|
| Auth method: oauth or service-account |
| Default output format |
| OAuth client ID |
| OAuth client secret |
| Path to service account JSON |
Best for interactive use and accessing your own YouTube account.
yt-api auth login # Opens browser
Best for server-side automation.
yt-api --auth-type service-account --credentials ./key.json list videos
yt-api info # Full system state yt-api info --test-connectivity # Verify API access yt-api info --test-permissions # Check credential capabilities yt-api auth status # Authentication details yt-api version # Version info
Exit codes:
0 - Success1 - General error2 - Authentication error3 - API error (quota, permissions)4 - Input error--quiet mode for parsing--dry-run validates without executing~/.yt-api/tokens.json (0600 permissions)No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.