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

  1. Press Tab to switch to the Library tab
  2. Press / to open the actions panel
  3. Select "Add directory"
  4. 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 Tab until you reach the Online tab
  2. Press h to host a room, or j to join
  3. For joining, enter tunetui.online as the server address
  4. Share the invite code with friends!
$ 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 track up/down
Enter Play selected track
Backspace Go back in library (folder navigation)
Tab Cycle through tabs (Library → Lyrics → Stats → Online)

Playback

Space Pause / Resume
n Next track
b Previous track
d Seek forward (default 10s)
a Seek backward (default 10s)
m Cycle playback mode (Normal → Shuffle → Loop Playlist → Loop Single)
= + Volume up
- _ Volume down
Shift+= + Fine volume adjust (smaller increments)

Library Actions

/ Open actions panel (search & commands)
r Rescan music folders
s Save current state
t Minimize to system tray (Windows only)

Actions Panel

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

Enter Execute selected action
Esc Close actions panel
Type Filter actions by text
Backspace Clear 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

Move filter focus (range/sort)
Enter Cycle focused filter
Type Live filter by artist/album/search
Backspace Clear filter
Shift+ Jump back to top filters

Online Tab

l Leave current room
o Toggle room mode — host only (collaborative / host-only)
q Cycle stream quality — host only (Lossless / Balanced)
Ctrl+s Add selected to shared queue (Library tab only)
! 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 → Playback settings → Theme):

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:

  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 .lrc"

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.

Hosting a Room

  1. Press Tab to reach the Online tab
  2. If not connected to a server, enter tunetui.online (or your own server)
  3. Enter a room name
  4. Optional: Set a password (lock icon in directory = password protected)
  5. Friends connect to the same server to see your room in the directory

Joining a Room

  1. Press Tab to reach the Online tab
  2. If not connected to a server, enter tunetui.online (or your own server)
  3. Browse the room directory for available rooms
  4. Select a room to join
  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 --ip 0.0.0.0

This 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

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

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

  1. Open actions panel (/)
  2. 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.