A clipboard-watching CLI tool that automatically downloads YouTube videos as MP3 files.
- Run
y2with a destination directory - Copy any YouTube link to your clipboard
- The MP3 downloads automatically and the clipboard is cleared
- Repeat — copy another link, it downloads again
- Press
Ctrl+Cto stop
y2 -d ~/Music
Downloads a prebuilt binary — no Rust required. The script also installs the runtime dependencies (yt-dlp and ffmpeg) for you.
curl -fsSL https://raw.githubusercontent.com/TVMD/y2/main/install.sh | bashOr clone and run locally:
git clone https://github.com/TVMD/y2.git && cd y2 && ./install.shRequires Rust toolchain. You still need yt-dlp and ffmpeg installed.
# Install dependencies
# macOS
brew install yt-dlp ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg && sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && sudo chmod a+rx /usr/local/bin/yt-dlp
# Arch
sudo pacman -S ffmpeg yt-dlp
# Build and install
git clone https://github.com/TVMD/y2.git && cd y2
cargo install --path .https://www.youtube.com/watch?v=...https://youtu.be/...https://www.youtube.com/shorts/...
Downloads run one at a time. If you copy a new link while a download is in progress, it will be picked up automatically once the current download finishes. You don't need to wait — just keep copying links and they will be processed in order.
If you copy a YouTube Mix or Radio URL (e.g. watch?v=xxx&list=RDMMxxx&start_radio=1), yt-dlp will download every track in that mix — this could be 50+ songs. Be careful when copying links from YouTube's "Mix" or "Radio" auto-playlists. Make sure the URL you copy is for a single video, not an entire mix.
MIT