**Yet another interactive YouTube search + playback from your terminal. ** Powered by
yt-dlp,fzf, andmpv.
Search YouTube, pick videos with arrow keys, play in your terminal — audio or video — and now, loop the experience as many times as you want.
- 🔍 Search YouTube directly from the terminal
- 🎬 Browse top 30 results (default, configurable)
- ⏯️ Play video or audio-only
- 🔁 Repeat selection N times (or infinitely)
- ⌨️ Keyboard-based selection (no mouse needed)
- 🚀 Fast and minimal setup
- And more importantly, no f*cking ads!
Install dependencies using Homebrew:
brew install yt-dlp fzf mpv- Clone the repo
git clone https://github.com/hepidad/yay.gitThen, enter to the directory
cd yay- Load the function in your shell For Zsh:
echo 'source /full/path/to/yay/yay.sh' >> ~/.zshrc
source ~/.zshrcFor Bash:
echo 'source /full/path/to/yay/yay.sh' >> ~/.bash_profile
source ~/.bash_profileIf you prefer yay to be a standalone command (and discoverable by whereis), you can symlink it to your PATH:
chmod +x yay.sh
sudo ln -s "$(pwd)/yay.sh" /usr/local/bin/yayTo update to the latest version:
cd /path/to/yay
git pull
source yay.shSee RELEASE_NOTES.md for version history.
- Basic video search
yay nature sound- Shows top 30 YouTube results for “nature sound”
- Press arrow keys to select a result, or Esc to play the top result.
- Loops forever until you quit (Ctrl+C)
- Enable logging/history.
- Play audio-only:
yay -a nature sound- Loop n times
yay -n 3 nature sound- Loop n times and audio only
yay -a -n 3 nature sound- By default, logging is enabled. To pause logging:
yay -l nature sound- Specify number of search results (default is 30)
yay -r 10 nature sound- Check version
yay --version- Check installation location
yay --location- Self-update
yay --updateyay using the power of yt-dlp this mean you can:
- Download video. For an example:
yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID"- Download audio. For an example:
yt-dlp -x --audio-format mp3 "https://www.youtube.com/watch?v=VIDEO_ID"- Save into specific directory
yt-dlp -P /path/to/folder "https://www.youtube.com/watch?v=VIDEO_ID" - Best Quality
yt-dlp -f bestvideo+bestaudio "https://www.youtube.com/watch?v=VIDEO_ID" MIT — feel free to fork and improve!