Music Text User Interface - User-friendly command line music player

(quasar) nebula 880e8b9b16 fix the guessing game lol 1 week ago
.editorconfig 4bb56a667d Add editorconfig file 1 year ago
.gitignore 0899802dc4 DOUBLE SIGH 2 years ago
LICENSE.txt 6d270d43d5 Add GPL license file 2 years ago 7f7166bc37 make note of socat in readme 6 months ago
backend.js a58f064072 clear timeData when a new track starts 5 months ago
client.js 05d29dff7b rename "song" terminology to "track" 1 month ago
crawlers.js ba828b4f12 use better package for natural sorting 3 months ago
downloaders.js 9ee3dca97a sanitize yo cache 8 months ago
general-util.js 48ed5168d4 cli args (bass boost ur music) 8 months ago
guess.js 880e8b9b16 fix the guessing game lol 1 week ago
index.js 8927fb3f3e update old process.argv checks to use parseOptions 3 months ago
metadata-readers.js e9ccfa2fd4 Metadata (stored, throttle, status, and more) 1 year ago
package-lock.json ba828b4f12 use better package for natural sorting 3 months ago
package.json ba828b4f12 use better package for natural sorting 3 months ago
players.js 05d29dff7b rename "song" terminology to "track" 1 month ago
playlist-utils.js 5d58951225 better hiding track numbering in queue 1 month ago
record-store.js 8766d0f6c9 Automatically play next track 2 years ago
screenshot.png 466582b32b update screenshot for 2020 1 month ago
smart-playlist.js 3d73a0da45 make locally opened playlists have a group name! 3 months ago
socat.js 17963e2e9f be even more careful with socat 6 months ago
stress-test.txt 9a4f04fbd3 Dramatically optimize perf of large playlists 1 year ago
telnet.js 7ea3291db7 rename telnet-server.js to telnet.js 3 months ago
todo.txt 3233c5ba82 rework mark/selection system 1 month ago
ui.js 3233c5ba82 rework mark/selection system 1 month ago
undo-manager.js a8fec45b10 Stub undo manager, remove 2 years ago

Screenshot of the player


You will need a relatively recent version of Node.js, as well as mpv (apt install mpv and the like work fine). socat is also highly recommended and necessary for pausing/seeking/etc; you can install that with your local package manager (apt, Homebrew, etc).

git clone  # Or
cd mtui
npm install
npm link  # Or sudo npm link
mtui  # Or node .

Add music to the ~/Music folder to make it show up in mtui, or pass mtui a playlist.json file (usually generated by http-music or downloaded from online) or any directory containing music you'd like to play.

Bugs or ideas?

Feel free and encouraged to report any bugs (unexpected behavior or crashes) to the issue tracker on! You're also welcome to share any ideas, suggestions, and questions through there.


  • Ctrl+C: exit
  • Up, Down: select previous or next item in a listing
  • Tab, Shift+Tab: switch between UI elements
  • g/G, Home/End: move to the first and last item in a listing
  • [: focus the main track/group listing
  • ]: focus the queue listing
  • Enter: play the selected track
  • Ctrl+Up, p: play previous track
  • Ctrl+Down, n: play next track
  • o: open the selected item through the system
  • Shift+Up/Down or drag: select multiple items at once
  • Space: toggle pause
  • Escape: stop playing the current track
  • l: toggle track loop
  • Right: seek ahead
  • Left: seek back
  • m, f: open a menu of actions related to the selected track/group/item(s)
  • v, V: increase and decrease playback volume
  • Ctrl+F or /: jump to a track or group by entering (part of) its name
  • Ctrl+O: open a playlist from a source (like a /path/to/a/folder or a YouTube playlist URL) (you can also just pass this source to mtui)
  • t, T: switch between playlist tabs
  • Ctrl+T: open the current playlist in a new tab (so, clone the current tab)
  • Ctrl+W: close the current tab
  • Ctrl+E: edit the notes of the selected track/group
  • Meta+c: create a new music player (for listening to multiple tracks at once, or swapping between two tracks without losing playback position)
  • Meta+Up/Down, Meta+p/n: select the previous/next music player (each player has its own independent queue, pause status, etc)
  • Meta+a, Meta+!: mark the selected music player so that any keyboard actions - seeking, pausing, etc - apply to it and any other marked players (if no player is marked, which is the default case, actions will apply to the selected music player)
  • Meta+x: delete the selected music player
  • |: focus the list of music players, if there are at least two music players
  • In the main listing:
    • Enter: if the selected item is a group, enter it; if it's a track, play it
    • Backspace: leave the current group (if in one)
    • q: queue the selected track or group to play after the track which is selected in the queue
    • d: download the selected track (but don't play it)
  • In the queue listing:
    • s: shuffle the queue
    • c: clear the queue
    • x: remove the selected track from the queue
    • Ctrl+L: jump to the track that's currently playing
  • In path displays: (Path displays are the things that show below the main and queue listings. They show the path of groups to the selected item in the listing.)
    • Enter, Space: view the selected item in the main listing
    • Left, Right: navigate the path display
  • In a context menu:
    • All the usual controls (up, down, tab, space, enter) work
    • Backspace or Escape: close the menu without taking any action
    • Type the beginning of the name of an option, like its first letter, to quickly jump to it
  • With a number pad:
    • Should be in NumLock!
    • 2, 4, 6, 8: cursor keys (down/left/right/up)
    • 5: pause (and any action that would take the space bar)
    • 7, 9: focus main track/group, queue listings
    • /, *: decrease, increase playback volume
    • .: back (and any action that would take backspace)
    • +: open a context menu
    • 1, 3: skip to previous, next track
  • In the text file / notes editor:
    • (mtui will automatically present an embedded text editor when you select a '.txt' file. It will also show this editor when there is an adjacent file to a selected group or track: a file whose name is the same, but with the '.txt' extension. This is useful for keeping track of notes, lyrics, etc on tracks or groups, and for just quickly accessing any miscellaneous text files.)
    • Ctrl+S: manually save the text file (it will also auto-save when it is closed)
    • Ctrl+X or Escape: defocus the text editor