A feature-rich, interactive CLI for downloading YouTube videos and playlists with ease.
Built on top of yt-dlp with an intuitive menu system powered by questionary.
Features • Installation • Quick Start • Documentation • Contributing
- 🎯 Interactive Menu System - Easy-to-use interface with questionary
- 📋 Playlist Auto-Detection - Automatically detects and organizes playlists
- ⚡ Quick Default Download - One-click download with optimal settings
- 🎨 Advanced Configuration - Fine-tune every aspect of your downloads
- 📁 Smart Naming Templates - Multiple presets + custom template support
- 🎵 Audio Extraction - Download and convert to MP3
- 🖼️ Rich Post-Processing - Thumbnails, subtitles, metadata embedding
- 🚀 SponsorBlock Integration - Automatically remove sponsors and ads
- 🌍 Geo-Bypass & Proxy Support - Download region-restricted content
- 📊 Real-time Progress - Live download progress and speed display
pip install ytdl-interactive# Clone the repository
git clone https://github.com/abd3lraouf/ytdl.git
cd ytdl
# Install in development mode
pip install -e .- Python 3.9 or higher
- FFmpeg (for video/audio processing)
macOS (Homebrew):
brew install ffmpegUbuntu/Debian:
sudo apt update
sudo apt install ffmpegWindows (Chocolatey):
choco install ffmpegOr download from ffmpeg.org
# Download a single video
ytdl https://www.youtube.com/watch?v=dQw4w9WgXcQ
# Download a playlist
ytdl "https://www.youtube.com/playlist?list=PLxxxxxx"
# Download from a channel
ytdl https://www.youtube.com/@channelnameytdl [URL] # Start interactive mode with URL
ytdl --version # Show version information
ytdl --help # Display help messageAfter providing a URL, you'll see the main menu:
1. Quick Default Download (Recommended)
└─ Downloads with optimal settings:
- Best quality video + audio
- Saved to ./downloads/
- Auto-organized playlists
2. Advanced Download Settings
└─ Customize every aspect:
- Format selection
- Output paths and naming
- Post-processing options
- Network settings
3. Exit
The quickest way to download with optimal settings:
- Format: Best quality video + audio (automatically merged)
- Output:
./downloads/ - Single videos:
Title.ext - Playlists:
PlaylistName/001 - VideoTitle.ext
Example output structure:
downloads/
├── My Awesome Playlist/
│ ├── 001 - First Video.mp4
│ ├── 002 - Second Video.mp4
│ └── 003 - Third Video.mp4
└── Single Video Title.mp4
- Video (Best Quality) -
bestvideo*+bestaudio/best - Audio Only (MP3) - Extracts and converts to MP3 (192 kbps)
- List Formats - View all available formats and select custom format codes
Preset Templates:
| Template | Format | Example |
|---|---|---|
| Default | %(title)s.%(ext)s |
My Video.mp4 |
| Rich Metadata | %(upload_date)s - %(channel)s - %(title)s.%(ext)s |
20231215 - Channel Name - My Video.mp4 |
| Minimalist | %(id)s.%(ext)s |
dQw4w9WgXcQ.mp4 |
| Custom | Your template | Define your own! |
Playlist Auto-Organization: All templates automatically organize playlists into subfolders with zero-padded indices.
Custom Template Variables:
%(title)s - Video title
%(id)s - Video ID
%(ext)s - File extension
%(upload_date)s - Upload date (YYYYMMDD)
%(channel)s - Channel name
%(uploader)s - Uploader name
%(playlist)s - Playlist name
%(playlist_index)s - Video index in playlist
%(duration)s - Video duration
%(view_count)s - View count
- Embed Thumbnail - Embed video thumbnail in the file
- Embed Subtitles - Download and embed subtitles (English/Arabic)
- Add Metadata - Add rich metadata to the file
- SponsorBlock - Automatically remove sponsor segments and ads
- Proxy Support - Route downloads through a proxy
http://proxy.example.com:8080 socks5://proxy.example.com:1080 - Geo-Bypass - Bypass geographic restrictions
ytdl https://www.youtube.com/watch?v=dQw4w9WgXcQ
# Select: 1. Quick Default Downloadytdl "https://www.youtube.com/playlist?list=PLxxxxxx"
# Select: 2. Advanced Settings
# → Select Download Type → Audio Only (MP3)
# → Start Downloadytdl https://www.youtube.com/watch?v=VIDEO_ID
# Select: 2. Advanced Settings
# → Output Path → Select "Rich Metadata"
# → Post-Processing → Check all options
# → Start Downloadytdl https://www.youtube.com/watch?v=VIDEO_ID
# Select: 2. Advanced Settings
# → Networking → Enter proxy URL
# → Start Downloadytdl/
├── ytdl.py # Main application
├── pyproject.toml # Package configuration
├── requirements.txt # Dependencies
├── README.md # This file
├── LICENSE # MIT License
└── .gitignore # Git ignore rules
This project uses automated versioning and CI/CD:
- Automatic versioning via
setuptools_scm(based on git tags) - Automated PyPI publishing on new releases
- CI testing on all PRs and pushes
- Release drafts auto-generated from commits
- Go to Actions → Bump Version → Run workflow
- Select version type (patch/minor/major)
- Workflow automatically:
- Creates git tag
- Generates changelog
- Creates GitHub release
- Publishes to PyPI
See CONTRIBUTING.md for detailed release process.
# Clone repository
git clone https://github.com/abd3lraouf/ytdl.git
cd ytdl
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"# Main components:
DownloadConfig # Configuration container
progress_hook() # Real-time download progress
postprocessor_hook() # Post-processing status
detect_playlist() # Playlist detection
execute_download() # Download execution
show_main_menu() # Interactive menu system# Install dev dependencies
pip install -e ".[dev]"
# Run tests (when available)
pytest
# Code formatting
black ytdl.py
# Type checking
mypy ytdl.pyContributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Add comments for complex logic
- Update README for new features
- Test thoroughly before submitting
This project is licensed under the MIT License - see the LICENSE file for details.
- yt-dlp - The powerful downloader this tool is built upon
- questionary - Beautiful interactive prompts
- All contributors and users of this project
This tool is for personal use only. Please respect copyright laws and YouTube's Terms of Service. Only download content you have permission to download.
Found a bug or have a feature request? Please open an issue on GitHub.
- GitHub: @abd3lraouf
- Issues: GitHub Issues
- Configuration file support (~/.ytdlrc)
- Download queue management
- Resume interrupted downloads
- Batch download from file
- GUI wrapper (tkinter/PyQt)
- Docker support
- Download scheduler
Made with ❤️ by developers, for developers