Skip to content

Latest commit

ย 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TuiTunes

A terminal music player and podcast client with YouTube Music search, synced lyrics, podcast transcripts, and 8 color themes.

Built on OpenTUI (Zig native rendering + React 19) with mpv as the audio engine.

Screenshots

Music Search (Tokyo Night theme)

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ TuiTunes  โ™ช Music โ”‚ ๐ŸŽ™ Podcast  Search music...                                 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎโ•ญโ”€Results (20)โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ™ช Music      โ”‚โ”‚  1  โ–ธ Let Down                                             5:00 โ”‚
โ”‚  โ–ธ / Search  โ”‚โ”‚       Radiohead โ€” OK Computer                                   โ”‚
โ”‚    Q Queue   โ”‚โ”‚  2    Creep                                                3:59 โ”‚
โ”‚    โ™ฅ Favoritesโ”‚โ”‚       Radiohead โ€” Creep                                        โ”‚
โ”‚    โŸฒ History โ”‚โ”‚  3    No Surprises                                         3:49 โ”‚
โ”‚              โ”‚โ”‚       Radiohead โ€” OK Computer                                   โ”‚
โ”‚              โ”‚โ”‚  4    Everything In Its Right Place                        4:12 โ”‚
โ”‚              โ”‚โ”‚       Radiohead โ€” Kid A                                         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ–ถ โ–ƒโ–†โ–…โ–‡โ–‚ Let Down โ€” Radiohead ๐Ÿ”€ ๐Ÿ”             ๐Ÿ”Š80% 1.25x  2:07 / 5:00        โ”‚
โ”‚ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                       โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Podcast Section

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ TuiTunes  โ™ช Music โ”‚ ๐ŸŽ™ Podcast  Search podcasts...                               โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎโ•ญโ”€Podcastsโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐ŸŽ™ Podcasts   โ”‚โ”‚  1  โ–ธ Lex Fridman Podcast                                    โœ“ โ”‚
โ”‚  โ–ธ / Search  โ”‚โ”‚       Lex Fridman                                                โ”‚
โ”‚    ๐Ÿ“‹ My Feedsโ”‚โ”‚  2    Huberman Lab                                              โ”‚
โ”‚    ๐Ÿ“œ Episodesโ”‚โ”‚       Scicomm Media                                              โ”‚
โ”‚              โ”‚โ”‚  3    All-In Podcast                                             โ”‚
โ”‚              โ”‚โ”‚       All-In Podcast, LLC                                         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โน โ–โ–โ–โ–โ– No track                                        ๐Ÿ”Š80%  0:00 / 0:00     โ”‚
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Features

Music

  • YouTube Music search via youtubei.js (no API key needed)
  • Audio streaming via mpv + yt-dlp (audio-only, ~83MB RAM)
  • Synced lyrics from LRCLIB with per-line highlighting
  • Lyrics translation via Lingva, DeepL, or MyMemory โ€” cached locally per track + language
  • Queue management, favorites, play history (SQLite)
  • Shuffle, repeat (off/track/all), playback speed (0.5x-2x)

Podcasts

  • Podcast discovery via iTunes Search API
  • RSS feed parsing with subscription management
  • YouTube-backed playback for perfectly synced transcripts
  • Flowing transcript display with inline phrase highlighting
  • Smart paragraph splitting using sentence-ending punctuation

Interface

  • 6 layout presets: Default, Compact, Minimal, Split, Wide, Focus
  • 8 color themes: Tokyo Night, Catppuccin, Dracula, Nord, Gruvbox, Solarized, Rose Pine, Kanagawa
  • Command palette (Ctrl+P) with fuzzy-searchable commands
  • Full Unicode support (CJK, Vietnamese, emoji)
  • Vim-style navigation (j/k/g/G)

Getting Started

Prerequisites

Dependency Version Install
Bun >= 1.2 curl -fsSL https://bun.sh/install | bash
mpv >= 0.35 See below
yt-dlp latest See below

Linux (Arch)

sudo pacman -S mpv yt-dlp

Linux (Debian/Ubuntu)

sudo apt install mpv
pip install yt-dlp

macOS

brew install mpv yt-dlp

Windows - See PLATFORM.md for status. Currently requires Unix socket support (TCP fallback planned).

WSL2 (Windows Subsystem for Linux)

# Works like native Linux. Requires WSLg (Win11 22H2+) for audio.
sudo apt install mpv
pip install yt-dlp

Quick Install

curl -fsSL https://raw.githubusercontent.com/5c0r/TuiTunes/main/install.sh | bash

Installs Bun (if needed), tui-tunes, and checks for mpv + yt-dlp.

Install via npm

bun install -g tui-tunes@alpha
tui-tunes

Install from Source

git clone https://github.com/5c0r/TuiTunes.git
cd TuiTunes
bun install
bun run start

Quick Start

  1. Press / to focus the search bar
  2. Type a song name, press Enter
  3. Use j/k to navigate results
  4. Press Enter to play
  5. Press Ctrl+2 to switch to Podcasts

Keybindings

Global

Key Action
Ctrl+P Command palette
Ctrl+L Cycle layout
Ctrl+T Cycle theme
Ctrl+1 Music section
Ctrl+2 Podcast section
Ctrl+Q / Ctrl+C Quit

Playback

Key Action
Space Play / Pause
n / p Next / Previous (queue)
> / < Seek +/- 10 seconds
t Jump to specific time
+ / - Volume up / down
m Toggle mute
] / [ Speed up / down
s Toggle shuffle
r Cycle repeat (off / all / track)

Navigation

Key Action
j / k Move down / up
g / G Go to top / bottom
Enter Play selected / Browse episodes
Tab Cycle focus: main / sidebar / search
/ Focus search
Escape Back to main
? Help overlay

Actions

Key Action
q Add to queue
x Remove from queue
f Toggle favorite
l Toggle lyrics / transcript
L Load more results

Sections

TuiTunes has two independent sections, each with its own sidebar and search routing:

Music (Ctrl+1)

  • Search - YouTube Music search with pagination (Shift+L for page 2)
  • Queue - User-controlled playlist (q to add, x to remove)
  • Favorites - Saved tracks (f to toggle, persisted in SQLite)
  • History - Recently played tracks

Podcast (Ctrl+2)

  • Search - iTunes podcast discovery
  • My Feeds - Subscribed podcasts (subscribe via command palette)
  • Episodes - Browse and play episodes from a feed

Podcast episodes prefer YouTube-backed playback when available, giving perfectly synced auto-generated transcripts. Falls back to RSS audio when no YouTube match exists.

Themes

Cycle with Ctrl+T or via command palette:

  • Tokyo Night - Cool blues (default)
  • Catppuccin Mocha - Soft pastels
  • Dracula - Classic purple
  • Nord - Arctic frost
  • Gruvbox - Warm retro
  • Solarized Dark - Low contrast
  • Rose Pine - Muted elegant
  • Kanagawa - Japanese ink

Layouts

Cycle with Ctrl+L or via command palette:

Layout Description
Default Sidebar + main content + now-playing footer
Compact No sidebar, full-width content
Minimal Search + track list + footer only
Split Queue on left, results on right
Wide Extended now-playing with queue preview
Focus Distraction-free, now-playing only

Configuration

Config file: ~/.config/tuimusic/config.json

{
  "defaultProvider": "youtube",
  "volume": 80,
  "localMusicDirs": ["~/Music"],
  "theme": "dark",
  "poToken": null,
  "visitorData": null
}

Data stored in:

  • ~/.config/tuimusic/tuimusic.db - Favorites, history, podcast subscriptions (SQLite)
  • ~/.config/tuimusic/debug.log - Debug log

Building

Development

bun run start     # Launch
bun run dev       # Watch mode (auto-restart on changes)
bun test          # Run 196 tests
bunx tsc --noEmit # Type check

Compiled Binary

bun build --compile --minify src/index.tsx --outfile dist/tuimusic
./dist/tuimusic

Produces a standalone ~105MB binary (includes Bun runtime). Still requires system mpv and yt-dlp.

Architecture

src/
  index.tsx          Entry point: bootstrap + cleanup
  app.tsx            Root component: keyboard handler + layout rendering
  commands.ts        35 commands for the command palette

  player/            mpv JSON IPC over Unix socket
  providers/         YouTube, podcast, lyrics, transcripts
  store/             Jotai atoms (player, queue, UI, library, podcast)
  ui/                OpenTUI React components (12 components)
  db/                SQLite persistence (bun:sqlite)
  utils/             Config, logging, formatting

See AGENTS.md for the full development guide, and PLATFORM.md for cross-platform details.

Tech Stack

Component Technology
Runtime Bun
TUI Framework OpenTUI (Zig + React 19)
Audio Engine mpv via JSON IPC
Streaming yt-dlp
YouTube Search youtubei.js
State Management Jotai v2
Database bun:sqlite (WAL mode)
Lyrics LRCLIB
Podcast Search iTunes Search API

License

MIT

About

Terminal music player & podcast client with YouTube Music, synced lyrics, podcast transcripts, 8 themes, and vim-style navigation. Built on OpenTUI + mpv.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages