________ ___ ________________ ______
/_ __/ / / / | / / ____/_ __/ / / / _/
/ / / / / / |/ / __/ / / / / / // /
/ / / /_/ / /| / /___ / / / /_/ // /
/_/ \____/_/ |_/_____/ /_/ \____/___/
tunetui.online
Performance-oriented terminal music player
TuneTUI uses a folder-based library—add your music directories and browse as you would in a file manager. Listen together with friends over the public server at tunetui.online. Stats tracking records your listening history, and lyrics stay in sync with playback.
# Getting Started
› Quick Start (Windows)
Download tune.exe from the releases page and run it. No installation required.
› Installing on Linux and macOS
TuneTUI is a Rust project. Install Rust via rustup, then clone and build:
git clone https://github.com/Sqble/tui_music.git
cd tui_music
cargo build --release
The binary will be at target/release/tune. Add it to your PATH or run it directly.
To install system-wide: cargo install --path .
Check the releases page for prebuilt Linux or macOS binaries when available.
› Adding Your Music
- Press Tab to switch to the Library tab
- Press / to open the actions panel
- Select "Add directory"
- Choose your music folder (or type the path)
› Basic Playback
- ↑ / ↓ — Navigate through your tracks
- Enter — Play the selected track
- Space — Pause / Resume
- n — Next track
- b — Previous track
› Want to Listen with Friends?
TuneTUI supports real-time listen-together via the Online tab. The public server at tunetui.online is already running and available for anyone to use.
- Press Tab until you reach the Online tab
- Press h to host a room, or j to join
- For joining, enter
tunetui.onlineas the server address - Share the invite code with friends!
› SSH Usage
If running over SSH, TuneTUI automatically sets TERM=xterm-256color when needed. For clipboard support over SSH, ensure your terminal allows OSC 52 escape sequences.
# Controls
› Navigation
› Playback
› Library Actions
› Actions Panel
Press / to open. Type to filter actions. Use ↑ / ↓ to navigate, Enter to select.
› Lyrics Tab
› Stats Tab
› Online Tab
› Quitting
# Configuration
› Config Directory
- Linux:
$XDG_CONFIG_HOME/tunetui/(defaults to~/.config/tunetui/) - Windows:
%USERPROFILE%\.config\tunetui\ - Override: Set
TUNETUI_CONFIG_DIRenvironment variable
› Files
state.json— Playback state, library folders, playlists, settingsstats.json— Listen history and statisticslyrics/— LRC sidecar files (one per track)
› Playback Settings
Open actions panel (/) → "Playback settings"
- Loudness normalization — Normalize track volumes
- Crossfade — Smooth transitions between tracks
- Scrub length — How far to seek with a/d keys (5s/10s/15s/30s/1m)
- Stats tracking — Enable/disable listen history
- Top songs rows — How many rows to show in stats charts
- Missing cover fallback — Template for tracks without album art
- Online nickname — Your display name for online rooms
- Online sync delay — Manual delay, auto-ping, recalibrate, sync correction threshold
› Themes
Available themes (actions panel → Playback settings → Theme):
- Dark (default)
- Pitch Black
- Galaxy
- Matrix
- Demonic
- Cotton Candy
› Audio Output
Select your audio output device via actions panel → "Output speaker". The selection persists across launches.
› Lyrics
TuneTUI looks for lyrics in this order:
.lrcsidecar file in the config lyrics folder- Embedded lyrics in audio file metadata
Sidecar files are named based on track path and stored in lyrics/. If no lyrics exist, the Lyrics tab offers to create a new sidecar.
To import plain .txt lyrics: actions panel → "Import .txt to .lrc"
› Metadata Editor
Actions panel → "Edit selected track metadata" to edit:
- Title
- Artist
- Album
You can also copy now-playing cover art to selected track, current folder, current playlist, or all songs.
# Online Sync
› Using the Public Server
The server at tunetui.online is already running and available for anyone to use. No setup required.
› Hosting a Room
- Press Tab to reach the Online tab
- If not connected to a server, enter
tunetui.online(or your own server) - Enter a room name
- Optional: Set a password (lock icon in directory = password protected)
- Friends connect to the same server to see your room in the directory
› Joining a Room
- Press Tab to reach the Online tab
- If not connected to a server, enter
tunetui.online(or your own server) - Browse the room directory for available rooms
- Select a room to join
- If password-protected, enter the password
› Room Modes
- Collaborative — Anyone can add music to the shared queue
- Host-only — Only the host controls playback; listeners are locked
Press o to toggle between modes (host only).
› Stream Quality
- Lossless — Direct audio streaming from host (best quality)
- Balanced — Opus 160kbps VBR (lower bandwidth, still great quality)
Press q to cycle quality (host only).
› Shared Queue
- In Library tab, select tracks and press Ctrl+s to add to shared queue
- You can add individual tracks, folders, playlists, or all songs
- The queue is FIFO — tracks play in order and are removed when played
- Auto-start when idle: the queue begins playing automatically
› Sync Mechanics
TuneTUI syncs playback state (track, position, pause) every sub-second, including:
- Ping-compensated target position
- Drift deadzone to avoid micro-seeks
- Periodic ping RTT measurements
- Automatic peer cleanup on disconnect
› File Streaming (Reverse Stream Safety)
When hosts don't have a track that listeners have added to the queue, listeners can upload that track to the host. This is limited to:
- Only shared-queue items owned by that peer
- Capped at 1 GiB per file
› Nickname
Your nickname is saved in state.json. Set or change it via: actions panel → Playback settings → Online nickname
# Hosting Your Own Server
› CLI Options
tune --help
Run only the home server (headless):
tune --host --ip 0.0.0.0
tune --helptune --host --ip 0.0.0.0This runs the server on port 7878 (default).
Run server + TUI app together:
tune --host --app --ip 0.0.0.0
This starts both the server and the client app in one process.
Custom port:
tune --host --ip 0.0.0.0:9000
Custom room port range:
tune --host --ip 0.0.0.0 --room-port-range 9000-9100
Default room range is 9000-9100.
Connect to your server from another machine:
tune --ip 192.168.1.100
Replace with your server's IP or domain.
› Port Requirements
- 7878 — Home server signaling port (TCP)
- 9000-9100 — Room transport ports (TCP, default range)
› Room Port Range
The range determines how many simultaneous rooms can exist. Default is 100 ports (9000-9100). Adjust with --room-port-range if you need more or fewer rooms.
# Troubleshooting
› No Audio Output
- Open actions panel (/)
- Select "Output speaker"
- Choose a valid audio device
› Missing Album Art
- Actions panel → Playback settings
- Set "Missing cover fallback" to a template (default: Music Note)
› Lyrics Not Showing
Check that:
.lrcsidecar exists inlyrics/folder in your config dir- Or lyrics are embedded in audio file metadata
If neither exists, the Lyrics tab will offer to create a new sidecar file.
› Connection Issues
- Verify the server address is correct
- Check that port 7878 (server) and 9000-9100 (rooms) are open
- If using a password-protected room, ensure you're entering it correctly
› Stats Not Tracking
- Actions panel → Playback settings
- Ensure "Stats tracking" is enabled
› Clear Listen History
Actions panel → "Clear listen history (backup)" — resets stats but saves a .bak snapshot first.
› Debug Output
RUST_BACKTRACE=1 tune
This provides detailed error information for troubleshooting.
› Clipboard Over SSH
If clipboard copy fails natively, TuneTUI falls back to OSC 52 terminal escape sequences. Ensure your terminal (and tmux/screen if used) allows clipboard passthrough.