8000 GitHub - brainkim/mixshell: Terminal-based music player · GitHub
[go: up one dir, main page]

Skip to content

About

Terminal-based music player

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

MixShell

A console-based music player that is deliberately easy to use. No vim keybindings, no command language, no modes to learn — browse with the arrow keys, press Enter to play, and every shortcut is labelled in the footer. If you can use a file manager, you already know how to drive it.

Under the hood it renders a full terminal UI (@b9g/termdom): plays everything ffmpeg can decode (MP3, FLAC, WAV, OGG, m4a, …), shows album art, and runs a live visualizer — all in the terminal.

MixShell's Main tab showing album art and keyboard shortcuts in the footer

MixShell is in beta. It works well for its author on Linux, but has had few other users yet. Feedback, bug reports, and macOS reports (see Media keys) are very welcome at github.com/Trippnology/mixshell/issues.

One thing to know before you ask, though: MixShell is deliberately simple and will stay that way. It plays music and gets out of the way, and it will not gain advanced features such as tag editing, an equaliser, scrobbling, or smart playlists — requests for them will be politely declined. Bugs and small improvements to what's already there are another matter; those are very welcome.

Installation

You'll need Node.js 22.12.0 or newer (check with node --version). Then:

npm install -g @trippnology/mixshell

That's it — everything else MixShell needs, including its own copy of ffmpeg, is downloaded automatically during install. One exception: the default engine's speaker module compiles from source at install time. On Windows that needs a C++ compiler: install the "Desktop development with C++" workload of Visual Studio Build Tools (or tick "Tools for Native Modules" in the Node.js installer). Without it the install still succeeds and MixShell plays through WebAudio instead, with a message at first play. See Troubleshooting below.

Usage

mixshell                          # start in your saved media directory, or home on first run
mixshell -d /path/to/music        # start in a media directory
mixshell -p ./playlist.json       # load a saved playlist

Everything on screen can be reached with the arrow keys and Enter, and the keys you can press are always listed in the footer. The global keys: Space play/pause, n/p next/previous, s stop, m mute. 1–5 switch tabs in the order shown in the header (6 with --debug); q quits. The arrow keys depend on the tab: ↑/↓ volume and ←/→ seek on Main; ↑/↓ select on Playlist, Library, Browser and Settings; ←/→ Back/Open on Browser, step ±1 on Settings. w save playlist is on Playlist only.

Enter plays what's under the cursor; Alt+Enter adds it to the queue instead. In the browser, a adds every audio file under the browsed directory — including subdirectories. Press g to type a directory path (relative paths start from the directory you're viewing), ← to go back or up, and → to open the highlighted folder.

By default, queueing the first track into an empty queue starts it playing straight away. To queue tracks without playback starting, switch off Settings → General → Auto-play First Queued (or set "play_when_first_track_queued": false in ~/mixshell/config.json). The change takes effect immediately.

Sound

MixShell ships two ways to play sound. The default works everywhere with no extra setup, so you can skip this section unless something won't play or you like tinkering. Switch in Settings → General → Audio Engine — the choice is saved and takes effect the next time you press play.

ffmpeg (default) webaudio
Extra setup Windows: C++ build tools (or WebAudio fallback) Linux: needs pipewire-jack (see below)
File types anything ffmpeg can decode MP3, FLAC, WAV, OGG, m4a
Memory use streams the file, stays constant loads the whole file into memory (~21 MB/min)
Sound device pick any output device in Settings system default only

Which to pick? The default is the safe choice: no system dependencies, small memory footprint, and any output device. The webaudio option can play a little more smoothly when the terminal is busy, and it's the automatic fallback on unusual platforms where the default's audio library won't build. Both engines pass the same test suite, and holding down a key to scroll fast through your library is glitch-free on both.

If webaudio can't start a sound session (for example, its optional package didn't install), the current track is skipped with an error message and playback carries on — switch back to ffmpeg and nothing else changes.

Album art

Nothing to set up. MixShell checks what your terminal can draw when it starts, and shows the cover the best way it can:

  • In kitty or Ghostty, the cover is a real image, drawn at the full resolution of the space it takes up.
  • In every other terminal, the same cover is drawn with block characters instead — the same picture in the same colours, just chunkier. Nothing else changes.

Inside tmux, the real image needs tmux's allow-passthrough option (set -g allow-passthrough on); with it off you get the block version.

Prefer the classic character look? Settings → UI → Album Art Style ("albumArtStyle" in config.json) swaps the cover for a rendition in plain characters — shade ramps, ones and zeros, or Braille — that doesn't depend on which terminal you use. The change applies immediately. blocks, the default, is the style that becomes a real image in kitty and Ghostty.

Media keys and desktop remote control

Linux

On a Linux desktop your keyboard's media keys (play/pause, next, previous), playerctl, and desktop tray controls work while MixShell is running:

playerctl -p mixshell status
playerctl -p mixshell play-pause
playerctl -p mixshell next
playerctl -p mixshell volume 0.8

This uses the optional dbus-next package, which normally installs automatically. If it's missing — or you're on a headless machine — MixShell simply runs without it. Nothing else changes.

macOS

Your keyboard's media keys and the Control Center playback controls drive MixShell while it runs, and Now Playing shows the current track.

It's off by default. Switch it on in Settings → General → Media Keys (or set "mediaKeys": true in ~/mixshell/config.json) and restart MixShell. The setting only appears on macOS; elsewhere the "mediaKeys": false line in config.json does nothing.

There's nothing to install — no npm package and no compiler. MixShell runs a small built-in helper through macOS's own osascript. If the helper can't start, MixShell logs one debug line and runs as usual.

This was written without access to a Mac and is untested on real hardware. Reports from macOS users — working or not — are very welcome.

Windows

Not supported yet. The API to target is SMTC (System Media Transport Controls); pull requests welcome.

Where MixShell keeps its data

All your settings and library data live in one folder, ~/mixshell/. Back it up, move it, or delete it as a unit. To put it somewhere else, set the MIXSHELL_DIR environment variable.

Configuration

Every option below can be changed in Settings — you don't need to edit config.json by hand. The headings match the Settings screens, and each row names the setting you want. Changes are saved as soon as you make them (except Media Keys, which takes effect on the next start).

General

  • Media Directory — mediaDirectory: a path (default: your home dir).
  • Output device — audioDevice: a device id, or null for the system default. The MIXSHELL_AUDIO_DEVICE environment variable overrides it.
  • Audio Engine — audioEngine: ffmpeg (default) or webaudio.
  • Volume Step — volumeStep: 1, 2, 5 (default) or 10, in percent.
  • Seek Step — seekStep: 5 (default), 10, 15 or 30 seconds.
  • Playlist Save Format — playlistSaveFormat: m3u (default) or pls.
  • Auto-play First Queued — play_when_first_track_queued: true (default) or false.
  • Media Keys (macOS only) — mediaKeys: false (default) or true.

UI

  • Theme — theme: default (default), terminal, nord, dracula, gruvbox, monokai, tokyo-night, solarized-dark or night-owl. terminal has no palette of its own: it uses the colours of whatever colour scheme your terminal is configured with (its default foreground and background, plus blue and bright black).
  • Album Art Style — albumArtStyle: blocks (default), basic, binary, braille, braille_plus, medium or complex.

Visualiser

  • Visualizer Quality — visualizerQuality: low, medium or high (default).
  • Visualizer FPS — visualizerFPS: 5, 7, 10, 15, 30 or 60 (default).
  • Visualizer Smoothing — visualizerSmoothing: 1 (Off, default), 0.9, 0.7, 0.5, 0.3 or 0.1.
  • FPS Counter — showFPS: false (default) or true.

Library

  • Library Dirs — libraryDirs: a list of paths to scan (default: empty). Add one with Shift+L in the Browser; remove one in Settings.
  • Scan on Start — libraryScanOnStart: false (default) or true.

MixShell also writes a few values to config.json as you use it, rather than offering them as Settings rows: volume (0–1) and visualizerMode (vu, bars, waveform, circles, cube, albumart, the default). Volume changes with ↑/↓ on Main; visualizer mode changes with v. The onboarded flag tracks first-run setup and is maintained by Settings → Library → Run setup again.

Troubleshooting and advanced setup

Node version. Below Node 22.12.0, npm only warns during install — it finishes anyway, and MixShell then fails at startup with a module error. If you see that, update Node rather than debugging the error.

speaker failed to build on Windows. At first play, a message says the default audio engine did not install and WebAudio output is being used. That means the native speaker module could not compile. To get the default engine back:

  1. Install the Visual Studio Build Tools with the "Desktop development with C++" workload, or tick "Tools for Native Modules" in the Node.js installer.
  2. Reinstall: npm install -g @trippnology/mixshell.

Use the 2022 Build Tools, not only Visual Studio 2026: releases before this fix ship a build helper (node-gyp) that predates VS 2026 and reports could not find a version of Visual Studio 2017 or newer even when 2026 is installed. Newer releases bundle a helper that recognises it. If npm also reports EPERM while removing a folder such as node_modules\speaker\deps, add an exclusion for AppData\Roaming\npm in your antivirus, remove C:\Users\<you>\AppData\Roaming\npm\node_modules\@trippnology, then reinstall.

Optional dependencies. Two npm packages MixShell uses are marked optional — npm tolerates their install failing and MixShell runs without them: dbus-next (media keys, above) and node-web-audio-api (the webaudio engine, above).

Keys in different terminals. kitty, Ghostty, tmux, and xterm (via its extended-keys protocol) also accept Shift+Enter (queue at bottom) and Ctrl+Enter (queue after current track); Ctrl+J works as queue-after-current in any terminal. Other terminals can't tell Shift+Enter from plain Enter, so MixShell doesn't guess — use the Alt spellings there.

Choosing a sound device. Settings → General → Output device opens a list of your output devices; pick one with ↑/↓ and Enter. ←/→ on the row step through devices directly. As an override (for scripts and launchers), the default engine also honours the MIXSHELL_AUDIO_DEVICE environment variable, e.g. MIXSHELL_AUDIO_DEVICE=pulse:my-sink mixshell.

webaudio on Linux (JACK). The webaudio prebuilts use the JACK audio API. Most desktops running PipeWire just need the pipewire-jack package. On Debian/Ubuntu that package installs its libjack outside the dynamic loader's search path, so starting a session fails with DeviceUnavailable until you either launch under the wrapper:

pw-jack mixshell

or make it permanent:

sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-x86_64-linux-gnu.conf /etc/ld.so.conf.d/
sudo ldconfig

Contributing

Start with DEVELOPMENT.md — it covers setup, testing, architecture, and the conventions (and gotchas) that keep changes from breaking things silently. Coding agents should read AGENTS.md, the condensed version of the same document.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature develop
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

MixShell began on 2 March 2025 as a small terminal MP3 player built on terminal-kit, with album art drawn as ASCII. terminal-kit served it well for a year and a half, but TermDOM came along and was a lot more enjoyable to work with: HTML, CSS and a real DOM, in the terminal. The UI was rewritten on TermDOM in August 2026.

The rest followed quickly: ffmpeg decoding and a SQLite library (October 2026), MPRIS and media keys, a second audio engine, native album art, and five visualizer modes.

Credits

MixShell was created by Trippnology, but it would not be possible without:

License

MIT — see LICENSE.

About

Terminal-based music player

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0