YeeTrap is a command-line tool for YouTube content creators to download their videos in bulk for backup purposes. It uses OAuth2 authentication to securely access your YouTube channel and downloads videos using yt-dlp.
- π Professional OAuth2 App - Seamless Google authentication with automatic browser opening
- πΊ Smart Video Listing - List all videos from your channel or any specified channel
- β¬οΈ Bulk Downloads - Download multiple videos with quality selection and concurrent processing
- β‘ High Performance - Concurrent downloads for faster backups
- π Complete Metadata - Saves video description, thumbnail, and info JSON
- π― Flexible Access - Download from any channel you have access to
- π οΈ Easy Setup - Built-in setup wizard with step-by-step OAuth2 configuration
- π Secure Storage - Local token storage with automatic refresh
- Go (1.24 or later) - Download
- yt-dlp - Installation instructions
- Google Cloud Project with YouTube Data API v3 enabled
choco install yt-dlpDownload from GitHub releases and add to PATH.
brew install yt-dlppip install yt-dlp- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the YouTube Data API v3:
- Go to "APIs & Services" > "Library"
- Search for "YouTube Data API v3"
- Click "Enable"
- Create OAuth2 credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Desktop app" as the application type
- Download the credentials JSON file
# Clone or download this repository
git clone https://github.com/AlienFacepalm/YeeTrap.git
cd YeeTrap
# Build the application
go build -o yeetrap
# (Optional) Install to your PATH
# Windows: copy yeetrap.exe to a folder in your PATH
# macOS/Linux: sudo mv yeetrap /usr/local/bin/Easy Setup (Recommended):
yeetrap setupManual Setup: Place your downloaded credentials file at:
- Windows:
%USERPROFILE%\.yeetrap\credentials.json - macOS/Linux:
~/.yeetrap/credentials.json
# 1. Set up OAuth2 (one-time)
yeetrap setup
# 2. Authenticate with YouTube (one-time)
yeetrap auth
# 3. List your videos
yeetrap list --max 10
# 4. Download videos
yeetrap download --max 5 --quality 720pyeetrap authThis will automatically open your browser for Google OAuth2 login. The authentication token is saved locally and reused automatically.
# List videos from your authenticated channel
yeetrap list
# List with a maximum number of videos
yeetrap list --max 100
# List from a specific channel ID
yeetrap list --channel UC_x5XG1OV2P6uZZ5FSM9Ttw# Download all videos from your channel
yeetrap download
# Download with custom settings
yeetrap download --max 50 --quality 1080p --output ./my-backups --concurrent 5
# Download from a specific channel
yeetrap download --channel UC_x5XG1OV2P6uZZ5FSM9Ttw--channel,-c: YouTube channel ID (leave empty for your own channel)--max,-m: Maximum number of videos to download (default: 50)--output,-o: Output directory (default: ./downloads)--quality,-q: Video quality -best,1080p,720p,480p(default: best)--concurrent,-j: Number of concurrent downloads (default: 3)
Configuration is stored at:
- Windows:
%USERPROFILE%\.yeetrap\config.json - macOS/Linux:
~/.yeetrap/config.json
Example configuration:
{
"default_channel_id": "",
"default_quality": "best",
"output_dir": "./downloads",
"max_concurrent": 3
}YeeTrap/
βββ main.go # Application entry point
βββ cmd/ # CLI commands
β βββ root.go # Root command setup
β βββ auth.go # Authentication command
β βββ list.go # List videos command
β βββ download.go # Download videos command
βββ internal/
β βββ auth/ # OAuth2 authentication
β β βββ auth.go
β βββ youtube/ # YouTube API integration
β β βββ service.go
β βββ downloader/ # Video download logic
β β βββ downloader.go
β βββ config/ # Configuration management
β βββ config.go
βββ go.mod # Go module definition
βββ go.sum # Dependency checksums
βββ README.md # This file
Make sure you've placed your OAuth2 credentials file at ~/.yeetrap/credentials.json (or the Windows equivalent).
You need to authenticate before using other commands. Run yeetrap auth and follow the prompts.
Install yt-dlp following the instructions in the Prerequisites section.
The YouTube Data API has daily quota limits. If you hit the limit, you'll need to wait until the next day or request a quota increase from Google Cloud Console.
- Only download videos you own or have permission to download
- Respect YouTube's Terms of Service
- Comply with copyright laws in your jurisdiction
- Use this tool responsibly and ethically
MIT License - feel free to use and modify as needed.
Contributions are welcome! Please feel free to submit issues or pull requests.
If you encounter any issues or have questions, please open an issue on GitHub.