Terminal audio streaming with Spotify-like discovery. Search YouTube from your terminal and stream best-quality audio through ffplay with intelligent recommendations and smart queue management.
- Search YouTube (
yt-dlp) and fetch best-audio URLs - Plays audio via
ffplay(part of FFmpeg) with no GUI - Interactive controls during playback:
p– pauser– resumen– next tracks– search and add new tracksa– find more songs by current artistq– quit program
- Smart Search Strategies: Multiple search approaches for better variety
direct– Standard YouTube search with quality filteringartist– Find songs by specific artistsrelated– Discover similar artists and genresgenre– Search by mood or genremixed– Intelligent combination of all strategies
- Advanced Metadata Extraction: Automatically identifies artists, titles, and song info
- Quality Scoring: Filters out low-quality content, covers, and duplicates
- Smart Deduplication: Avoids the same song from different channels
- Smart Shuffling: Maintains musical flow while avoiding repetition
- Auto-Recommendations: Continuously fills queue based on listening history
- Artist Variety: Prevents clustering of songs from the same artist
- Listening History: Tracks preferences and improves recommendations over time
- Priority Queue: Add urgent tracks that play next
- Multiple Search Modes: Choose your discovery strategy on the fly
- Real-time Queue Management: Add, remove, and reorganize tracks while playing
- Session Persistence: Remembers your preferences across sessions
- Quality Indicators: See track quality scores and channel info
- Python ≥ 3.8
ffplayavailable in$PATH(install theffmpegpackage)yt-dlpavailable in$PATH(install theyt-dlppackage)- Internet connection
Install ffmpeg:
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt install ffmpeg - CentOS/RHEL:
sudo yum install ffmpeg - Windows: Download from ffmpeg.org
The installer automatically handles Python dependencies:
yt-dlp(YouTube downloading)readchar(keyboard input)
# Download installer and run locally
curl -O https://raw.githubusercontent.com/5iri/youterm/main/install.sh
chmod +x install.sh
./install.shThe installer automatically handles dependency management using uv and creates an isolated environment. It will install uv if it's not already available on your system.
# Interactive mode with smart discovery
youterm
# One-shot search & play with auto-recommendations
youterm "lofi hip hop"When tracks are playing you will see:
[p]ause / [r]esume / [n]ext / [s]witch music / [a]rtist / [m]ode / [q]uit?
p– pause current trackr– resume playbackn– skip to next tracks– search and switch to new music (resets context)a– switch to current artist (resets context)q– quit program
# Test different search strategies
youterm-discover "indie rock" --strategy artist --limit 15
# Manage your queue
youterm-queue add "jazz piano" --strategy genre --limit 20
youterm-queue status
youterm-queue shuffle smart
youterm-queue recommendations
# View listening history and preferences
youterm-queue history --artists# Find specific songs (default)
youterm "Bohemian Rhapsody"
# Discover an artist's catalog
youterm-discover "Radiohead" --strategy artist
# Explore a genre or mood
youterm-discover "chill electronic" --strategy genre
# Find music similar to a query
youterm-discover "Pink Floyd" --strategy related
# Mixed approach for maximum variety
youterm-discover "90s alternative" --strategy mixedYouterm automatically creates configuration files in ~/.config/youterm/:
listening_history.json– Your play history and preferencespreferences.json– Customizable settings
{
"preferred_duration_range": [120, 360],
"skip_threshold": 0.3,
"shuffle_strategy": "smart",
"preferred_quality": 0.6
}youterm [query]– Main streaming interfaceyouterm-discover <query>– Advanced search and discovery toolyouterm-queue <command>– Queue management utility
--strategy {mixed,direct,artist,related,genre}– Search approach--limit <number>– Maximum results--quality-filter– Show quality scores--test-metadata– Test metadata extraction
status– Show current queue stateadd <query>– Add tracks to queueshuffle <mode>– Set shuffle behaviorclear– Clear queue or played historyrecommendations– Get queue suggestionshistory– View listening patterns
git clone https://github.com/5iri/youterm.git
cd youterm
# Use uv for development (recommended)
uv sync
uv run youterm
# Or use the installer
./install.shpip install youtermPermission denied error:
chmod +x install.sh
./install.shffplay not found:
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg
# Check installation
ffplay -versionPython version issues:
# Check Python version
python3 --version
# If too old, install newer Python
# Ubuntu: sudo apt install python3.8
# macOS: brew install python@3.8PATH not working after install:
# Add to your shell profile
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Or use full path
$HOME/.local/bin/youterm "test"No audio playback:
- Check audio output device is working
- Try:
ffplay -f lavfi -i testsrc2=duration=5:size=320x240:rate=30
Search returns no results:
- Check internet connection
- Try different search terms
- Use quotes for exact phrases
# If installed with install.sh
youterm-uninstall
# Manual removal
rm -rf ~/.local/lib/youterm
rm -f ~/.local/bin/youterm*rm -rf ~/.config/youterm- Query Analysis: Understands search intent and extracts context
- Multi-Strategy Search: Uses different approaches based on query type
- Metadata Extraction: Identifies artists, titles, and song characteristics
- Quality Scoring: Evaluates tracks based on duration, source, and content
- Deduplication: Removes same songs from different channels
- Intelligent Shuffling: Organizes queue for optimal listening flow
- Listening History: Tracks what you play, skip, and enjoy
- Artist Preferences: Learns your favorite artists over time
- Smart Variety: Balances familiarity with discovery
- Contextual Suggestions: Considers current queue and recent plays
For developers who want to build packages:
git clone https://github.com/5iri/youterm.git
cd youterm
python -m pip install --upgrade build
python -m build
ls dist/
# youterm-0.2.0-py3-none-any.whl
# youterm-0.2.0.tar.gz- Audio Analysis: Extract tempo, key, and mood from tracks
- Playlist Import: Support for Spotify/YouTube playlist imports
- Social Features: Share queues and discover friends' music
- Advanced Filters: Genre, decade, language, and mood filters
- Desktop Integration: System notifications and media key support
- Streaming Services: Expand beyond YouTube to other platforms
- Mobile Companion: Web interface for remote control
MIT License © 2025 Your Name