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.

TuneTUI Library page with playback controls, queue actions, and song info
Library, now playing, queue shortcuts, and playback controls in one terminal view.

# 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

  1. Press h to switch to the Library page
  2. Select [+] Add Directory and press Enter
  3. Choose your music folder (or type the path)

Basic Playback

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.

  1. Press l to open the Online page
  2. Set a nickname if prompted
  3. Press Enter on [ Show Public Servers ]
  4. Select a room to join, or select [+] Create Room to host
$ First time? You'll be prompted to enter a nickname. This is saved for next time.

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

Select item up/down
Enter Open or play selected item
Backspace Edit/clear search, otherwise go back
h j k l Switch pages: Library, Lyrics, Stats, Online
Ctrl+f Focus Library search
Esc Clear Library search

Playback

Space Pause / Resume
n Next track
b Previous track
d Seek forward (default 10s)
a Seek backward (default 10s)
m Cycle repeat mode (Off → Playlist → One)
v Toggle shuffle
= + Volume up
- _ Volume down
Shift+= + Fine volume adjust (smaller increments)

Library Actions

/ Open actions panel (search & commands)
r Rescan music folders
Ctrl+p Add selected item to playlist
Ctrl+o Add now playing song to playlist
Ctrl+u Add selection to queue end
Ctrl+y Add selection to queue next
Ctrl+s Add selection to Online shared queue
t Minimize/collapse to tray

Actions Panel

Press / to open. Type to filter actions. Use / to navigate, Enter to select.

TuneTUI actions panel filtered to quality, theme, and queue commands
The actions panel gives searchable access to themes, audio tools, queues, and settings.
Enter Execute selected action
Esc Close actions panel
Type Filter actions by text
Backspace Edit search filter

Lyrics Tab

Ctrl+e Toggle lyrics editor mode
Navigate lyric lines
Enter Insert new line after selection (editor mode)
Ctrl+t Timestamp current line with playback position (editor mode)

Stats Tab

TuneTUI stats page with listening trend and recent play log
Stats summarize listening time, plays, trends, filters, and recent history.
Move filter focus (range/sort)
Enter Cycle focused filter
Type Live filter by artist/album/search
Backspace Edit focused text filter
Shift+ Jump back to top filters

Online Tab

Ctrl+n Start shared queue / next shared item
Ctrl+l Leave current room
o Toggle room mode — host only (collaborative / host-only)
q Cycle stream quality — host only (Lossless / Balanced)
t Show/hide room code or room link
2 Copy active room link/code
! Host-only mode: In this mode, listeners cannot control playback. Only the host can play/pause/skip.

Quitting

Ctrl+c Quit TuneTUI

# Configuration

Config Directory

Files

Playback Settings

Open actions panel (/) → "Playback settings"

Themes

Available themes (actions panel → Theme):

Audio Output

Select your audio output device via actions panel → "Audio driver settings""Select output speaker". The selection persists across launches.

Lyrics

TuneTUI looks for lyrics in this order:

TuneTUI lyrics page with synced lines and editor mode
Synced lyrics can be viewed, edited, timestamped, and saved as sidecar LRC files.
  1. .lrc sidecar file in the config lyrics folder
  2. 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 lyrics"

Metadata Editor

Actions panel → "Edit selected track metadata" to edit:

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.

TuneTUI Online page with room controls, participants, and shared queue
Online rooms show participants, stream quality, room codes, drift, and the shared queue.

Hosting a Room

  1. Press l to reach the Online page
  2. Set a nickname if prompted
  3. Show public servers, or type a custom homeserver/link in Server / Link
  4. Select [+] Create Room, then enter room name and optional password
  5. Friends connect to the same server or use the copied room link/code

Joining a Room

  1. Press l to reach the Online page
  2. Set a nickname if prompted
  3. Show public servers, or type a custom homeserver/link in Server / Link
  4. Search or browse the inline room directory and select a room
  5. If password-protected, enter the password

Room Modes

Press o to toggle between modes (host only).

Stream Quality

Press q to cycle quality (host only).

Shared Queue

Sync Mechanics

TuneTUI syncs playback state (track, position, pause) every sub-second, including:

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:

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 --host-ip 0.0.0.0

This runs the server on port 7878 (default).

--host-ip is the address the server binds to. Use 0.0.0.0 to listen on all IPv4 interfaces.

Run server + TUI app together:

tune --host --app --host-ip 0.0.0.0

This starts both the server and the client app in one process.

Custom port:

tune --host --host-ip 0.0.0.0:9000

Custom room port range:

tune --host --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

--ip is the server address the app connects to. Replace with your server's IP or domain.

Port Requirements

! Firewall: Open these ports in your firewall for remote connections.

Room Port Range

The range determines how many simultaneous rooms can exist. Default is 9000-9100. Adjust with --room-port-range if needed.

# Troubleshooting

No Audio Output

  1. Open actions panel (/)
  2. Select "Audio driver settings""Select output speaker"
  3. Choose a valid audio device

Missing Album Art

  1. Actions panel → Playback settings
  2. Set "Missing cover fallback" to a template (default: Music Note)

Lyrics Not Showing

Check that:

If neither exists, the Lyrics tab will offer to create a new sidecar file.

Connection Issues

Stats Not Tracking

  1. Actions panel → Playback settings
  2. 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.