Search, preview, and play YouTube videos directly from the terminal.
yt-cli is a lightweight command-line tool that allows users to search YouTube, browse results interactively, preview video information, and play or download videos — all without leaving the terminal.
The tool combines several powerful utilities:
- yt-dlp → fetches YouTube metadata and streams
- fzf → interactive fuzzy search interface
- mpv → video/audio playback
- jq → JSON parsing for preview data
This makes it possible to build a fast, terminal-based YouTube experience.
- Search YouTube from the terminal
- Interactive video selection using fzf
- Preview video metadata while browsing results
- Play videos directly with mpv
- Play audio-only mode
- Download videos using yt-dlp
- Open selected video in the browser
- Choose playback quality
- Adjust playback speed
- Maintain search history
- Clean CLI interface designed for Linux environments
The recommended installation method is pipx.
pipx installs Python CLI applications globally but keeps dependencies isolated.
Install pipx if not installed:
sudo apt install pipx
pipx ensurepath