Changelog · Install · Services · Keys · Contributing
TIDAL, Spotify, Apple Music, Deezer, YouTube Music, Subsonic, Jellyfin and your own files —
in the terminal, over sonora's music crate.
Not part of Sonora. sonora-tui is an independent project, not affiliated with or endorsed by Sonora; it builds on Sonora's open-source
musiccrate. Please report sonora-tui problems here, not to the Sonora project.
Not a piracy tool. Each service wants the subscription it wants — a paid TIDAL or Spotify Premium account, an Apple Music subscription — and so does this. Nothing here exports streams, keys or licences, and nothing here will. Unofficial throughout: no service endorses it, and the private APIs it speaks can change at any time.
- TIDAL, Spotify, Apple Music, Deezer, YouTube Music, Subsonic/Navidrome, Jellyfin and local files — one service at a time, switched from Settings
- The home page, Explore, search, album and artist pages, your playlists, albums, artists and favourites, each in its own view
- Playback up to 24-bit hi-res where the service delivers it, gapless, normalised from the service's own loudness measure, an equaliser with presets, a sleep timer
- A queue with shuffle, repeat and autoplay, and favouriting from anywhere
- Synced lyrics, following the track
- Scrobbling to Last.fm, Libre.fm, ListenBrainz, Maloja and teal.fm
- Discord Rich Presence
- The keyboard's media keys and the desktop's player widget — MPRIS on Linux, Now Playing on macOS (none yet on Windows)
- Cover art through the terminal's image protocol, or half blocks where there is none
- Seven themes, and any colour by hand
Runs on macOS 12 or later (Apple Silicon, Intel), Linux (x86_64, aarch64) and Windows (x86_64). On Linux it plays through ALSA, which every desktop has.
macOS or Linux. The one way in that follows the releases: brew upgrade
brings the next version.
brew install ColinTenaguillo/tap/sonora-tuiDownloads the binary for your platform into ~/.cargo/bin. Run it again
for a newer release.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ColinTenaguillo/sonora-tui/releases/latest/download/sonora-tui-installer.sh | shOn Windows, in PowerShell:
powershell -ExecutionPolicy Bypass -c "irm https://github.com/ColinTenaguillo/sonora-tui/releases/latest/download/sonora-tui-installer.ps1 | iex"The flake builds on the four macOS and Linux platforms above:
nix run github:ColinTenaguillo/sonora-tuiEach release
carries an archive per platform and its SHA-256. Unpack it and put
sonora-tui (sonora-tui.exe on Windows) on your PATH.
Rust (stable), a C++ compiler for the Widevine host, CMake for the Opus decoder, and on Linux the ALSA headers:
sudo apt install build-essential cmake pkg-config libasound2-dev # Debian, Ubuntu
sudo dnf install gcc-c++ cmake pkg-config alsa-lib-devel # Fedora
sudo pacman -S base-devel cmake pkgconf alsa-lib # Archcargo install --git https://github.com/ColinTenaguillo/sonora-tuior from a checkout, cargo build --release and run target/release/sonora-tui.
The service comes from the config, and TIDAL is the default:
[provider]
kind = "tidal" # spotify, apple, deezer, youtube, subsonic, jellyfin, localSettings (8) has the same choice as its first row: pick a service with
h/l, press Enter, and the app leaves the one it is on and signs in to the
other. On the sign-in screen itself, Tab steps to the next service. Each
service keeps its own session, so coming back asks nothing.
Each signs in from the same screen, its own way:
kind |
How it signs in |
|---|---|
tidal |
A code and a link, confirmed in your browser. HiFi Plus for hi-res. See TIDAL below. |
spotify |
A link opens in the browser; authorise there and come back. Needs Premium, and an account Spotify still hands playback keys to: it refuses them to some newer accounts (late 2025 on) whatever their plan. |
apple |
Paste the Cookie header of a signed-in music.apple.com tab. Playback needs Google's Widevine module: see below. |
deezer |
Paste the Cookie header (or just the arl cookie) of a signed-in deezer.com tab; on a family plan, pick your profile. |
youtube |
g to continue as a guest, or paste the Cookie header of a signed-in music.youtube.com tab; with several accounts on it, pick one. |
subsonic |
Server and user asked on the login screen the first time, then kept in the config; the password is typed at sign-in, and the session is kept until the server changes. |
jellyfin |
The same as subsonic; an account with no password signs in with an empty one, and an empty user signs in by Quick Connect. |
local |
Nothing: the first run asks for a folder, and the folders in the config are read at each start. |
In practice the service's own sign-in page opens in a window instead: sign
in there and it closes itself, handing the cookies over. It keeps its own
throwaway session, so your browser's session is not shared and does not
rotate the cookies away. On Linux the window needs WebKitGTK
(libwebkit2gtk-4.1, or 4.0), loaded at runtime; on macOS "Continue with
Google" and the like work in it too. Close the window to paste the header
instead, out of the browser's devtools (Network, any request, Request
Headers, the Cookie line); Enter on the empty box opens the window
again. Cookies, passwords and tokens are kept
by the provider's own credential store, never written to the config.
What each view shows is what the service answers with. The mixes are TIDAL's; a Subsonic server has no Explore; the local library has no radio. The quality badge shows on any service that names how its stream is encoded. The audio quality in Settings is asked of every service that has levels to choose from, starting with the next track.
Navidrome, Gonic, Airsonic — anything that speaks the Subsonic API. The first run asks for the server and the user and writes them here:
[provider]
kind = "subsonic"
[subsonic]
server = "https://music.example.org"
username = "you"A server that keeps several libraries apart (Navidrome's, for one) can be
read one library at a time: the Subsonic library row in Settings steps
through them with h/l, and Enter opens the session again on the one
picked.
The music libraries of a Jellyfin server, asked for and kept the same way, under their own section:
[provider]
kind = "jellyfin"
[jellyfin]
server = "https://jellyfin.example.org"
username = "you"Leave the user empty on the sign-in screen to sign in by Quick Connect instead: the server gives a code, its Quick Connect page opens in the browser, and approving the code there from an account already signed in opens the session. The server has to have Quick Connect turned on. Once a user is kept, the sign-in screen asks for its password instead; empty the Jellyfin user row in Settings to be offered Quick Connect again.
With no folder named, the sign-in screen asks for one and writes it to the config. The folders are read at each start, from an index kept under the cache between runs, and every track, album and artist found is the library:
[provider]
kind = "local"
[local]
folders = ["~/Music", "/media/flac"]Apple's streams are encrypted, and only Google's Widevine module decrypts
them. Nothing ships it — Google publishes nothing anyone may redistribute —
so once an Apple Music account is in, the machine is searched for a
browser's copy. With none, the app offers to download the module from
Google's update service, as Chrome and Kodi get theirs, shows Google's terms
out of the archive, and installs it into its own store only on a second yes.
SONORA_WIDEVINE_CDM=/path/to/module names one of your own instead.
Declined, Apple Music keeps its catalogue and refuses to play. The module
runs in a process of its own, this binary started again, so its memory is
spent only while an Apple track is loaded.
TIDAL grants full playback only to its own applications, so sonora — like
every third-party TIDAL client — sends the client_id of one of them, and
TIDAL believes it is talking to that application. That is a
misrepresentation, and it is worth knowing before you run it. It is nothing
private to you: your login happens in your browser, and your session token
stays on your machine, mode 0600 (on Windows, under your profile's own
access rules).
There is no legitimate way to replace them today:
- TIDAL's developer portal issues credentials, but they are refused for the
device flow — the code-and-a-link login a terminal needs — with
Client is not a Limited Input Device client. - Those credentials also cap playback at 30-second previews, and only through TIDAL's Player SDK, which has no build for a terminal.
- Device-flow credentials are documented as internal to TIDAL, and public requests for third-party access have gone unanswered.
The sign-in goes through the device client, which since April 2026 is served AAC where it asks for CD-quality FLAC. So the session is then renewed as TIDAL's Android app client, which is served FLAC at every tier. If TIDAL refuses that, the session stays on the device client and plays what it is given.
The pair is sonora's and cannot be set from the config: when TIDAL caps it, the fix comes with a newer sonora.
Press ? in the app for the full list.
| Key | Action |
|---|---|
j / k, ↓ / ↑ |
Down / up in the list or grid |
Ctrl-d / Ctrl-u |
Half a screen down / up |
h / l, ← / → |
Left / right along a row |
J / K |
Move through the sidebar |
1 – 7 |
Straight to a nav entry — 1 is Music, 7 is Settings |
Enter |
Open a playlist, album or artist, or play a track |
Esc, [ |
Back one view, or out of the filter or the bio; on the sign-in screen, out of the sign-in under way |
] |
Forward again, through views and sections |
/ |
Filter the current view: case and accents ignored, words in any order, letters in order will do ("kdl" finds Kendrick Lamar, below exact hits) |
O / I |
Order a track list by the next of the columns it draws — title, artist, album, added, time, then back to its own order — or reverse it. The direction stays as you move on. Works on top of /, and on an album's page / shows in the Tracks heading |
s |
Search the catalogue |
o |
See all of a row |
b |
Open an artist's biography |
a / c |
Open the artist, or the album whose cover you are looking at |
R |
Radio from the selected track, or the one playing |
t, Tab |
Next tab in search; on the sign-in screen, the next service |
v |
Playlists and Albums as covers, or as rows like a track list's (year, or count, and length beside each); kept for next time |
Space |
Pause / resume |
A |
Favourite the track, or take it out again |
F |
Favourite the artist, album, playlist or mix under the cursor, or the one whose view is open; again to take it out |
P |
Add the selected track to one of your playlists — a list with covers and sizes, / to search it — or to a new one named on the spot |
N |
New playlist |
m / D |
Rename, or delete after a y, the playlist open or under the cursor — yours only |
V |
Make the playlist open or under the cursor private, or public again — yours only, where the service allows it (Deezer does not); a private one says so beside its maker |
x |
In a playlist of yours: take the highlighted track out |
< > |
In a playlist of yours, in its own order: move the highlighted track up / down (Spotify, Subsonic, local files) |
n / p |
Next / previous in the queue |
. / , |
Ten seconds forward / back in the track |
e / E |
Queue the selected track next, or after the rest |
Q |
What is playing next — j/k to move, x to remove, enter to play, i to switch autoplay off or on |
H |
What has been played |
z |
Shuffle the queue |
r |
Repeat: off, all, one |
S |
Sleep timer: 15, 30, 45, 60 minutes, end of track, off |
L |
The lyrics, synced where they are — j/k to scroll, Esc to close |
Z |
Zen: the playing track's cover alone over the bar — Z or Esc to leave |
? |
The key list; j/k scroll it on a short terminal, / searches it |
q |
Quit |
Esc steps back rather than quitting: only q leaves the app.
Any of the command keys can be moved, by action name, in the config:
[keys]
quit = "x"
play_pause = "p"
queue_previous = "P"The names are down, up, left, right, sidebar_next,
sidebar_previous, back, forward, filter, sort, sort_reverse,
search, see_all, biography, open_album, open_artist,
track_radio, sleep, lyrics, zen, next_tab, play_pause,
favourite, queue_next, queue_previous, seek_forward, seek_back,
shuffle, repeat, queue, history, queue_track_next,
queue_track_last, help and quit. A key is one character, or space,
tab, enter or esc. A rebound action leaves its default key: binding
quit to x frees q. An unknown action, an unreadable key or a key bound
twice is reported in the status bar and skipped. Text typed into a box is
never remapped.
Q shows what is playing next. Three things can be in it, and they are kept
apart the way the services' own clients keep them:
- Queued — what you asked for by name. Survives starting another album, because you asked for the track rather than the album it came from.
- The album, playlist or mix you started. Replaced when you start another one.
- Autoplay — similar tracks, filled in behind everything else as the
queue nears its end, and refilled as long as you keep listening. Seeded
from the last track queued. Dropped as soon as there is something real to
play, so a radio picked twenty minutes ago never resurfaces. On by
default;
autoplay = falseunder[playback]in the config, oriin the queue view, stops the music at the end of the queue.
The keyboard's media keys work too — play/pause, next, previous — and they reach the app whether or not the terminal has focus, since the desktop delivers them rather than the terminal.
Settings (8) edits config.toml in place, row by row: the service, the
sound, the content filters, the look, the proxy, the scrobbling accounts, the Discord
application, the Subsonic and Jellyfin servers and the music folders. h/l step a
value, Enter opens a box on a text row and
saves on Enter, x drops the last music folder. A secret is drawn as dots
and never shown back. What something reads live follows at once: the
colours, the scrobblers (linked again, through the browser where needed),
the Discord presence, the library of local files.
[playback]
explicit = true # false: tracks marked explicit do not play
ai = true # false: tracks marked AI-generated do not playThe rows the engine reads, all written to the config:
[audio]
normalisation = false # bring every track to one level, from the service's own measure
gapless = true # line the next track up behind this one
equalizer = "off" # or flat, rock, pop, jazz, classical, electronic, acoustic,
# vocal, bass-boost, bass-reducer, treble-boost, loudness
output = "" # empty for the system's default, or an id the Output row picks
match_rate = false # on a direct output, follow each track's sample rateThe equaliser changes as you step through the presets. Normalisation and gapless restart the engine, which picks the track back up where it was.
Bit-perfect. The Output row lists every output the system offers, h
and l to pick and Enter to play on it. One marked direct is played on past
the sound server and taken from every other app while it plays: on macOS
through CoreAudio's hog mode, on Linux as the sound card's own ALSA device.
With Match sample rate on, a direct output switches to each track's own rate,
so nothing resamples it on the way to the DAC. For the samples to reach it
untouched, keep the volume full and the equaliser and normalisation off.
L opens them over the main pane. Synced lyrics follow the position, the
line being sung in the middle; plain ones are a page to scroll. They come
from the sources sonora asks — the file's own tags, YouTube Music, lrc.red,
Musixmatch, LRCLIB, Kugou, NetEase, and the service you are signed in to
where it keeps lyrics of its own: Spotify, Subsonic or Jellyfin — ranked its
way: synced over plain, a close match over a loose one.
Name a service in the config and listens go to it: what is playing now, and each track once it has run half its length or four minutes, as the services themselves count it.
[scrobble]
listenbrainz = "the user token from listenbrainz.org/settings"
listenbrainz_server = "https://lb.example.org" # your own, or multi-scrobbler; leave out for listenbrainz.org
lastfm = { key = "an API key", secret = "its secret" } # from last.fm/api/account/create
librefm = true
maloja = { url = "https://maloja.example.org", key = "an API key" }
tealfm = { handle = "you.bsky.social", password = "an app password" } # from bsky.app/settings/app-passwordsLast.fm and Libre.fm approve the account in the browser, once, at the first
start after. The linked accounts are kept in scrobble.json beside the
config, mode 0600.
teal.fm reads the listens from your Bluesky or other atproto account, so the app writes them there itself, signed in with the handle (or the DID) and an app password. Make one for this rather than giving your own: it sits in the config, and can be revoked on its own.
What is playing, on your Discord profile, with the album art and a clock that counts down the track. The name shown beside it is a Discord application's, so register one at discord.com/developers — any name you like — and give the config its id:
[discord]
application_id = "1234567890123456789"Discord not running is not an error: it is tried again a little later.
Seven are built in, each taken from the values its own project publishes:
theme = |
|
|---|---|
default |
TIDAL's own colours |
catppuccin |
Catppuccin Mocha |
gruvbox |
Gruvbox dark |
tokyonight |
Tokyo Night Storm |
nord |
Nord |
dracula |
Dracula |
solarized |
Solarized dark |
[ui]
theme = "catppuccin"Any colour can be set by hand, and wins over whichever theme is named:
[ui]
theme = "catppuccin"
[ui.colors]
accent = "#f5c2e7"
selection = "#585b70"The eleven names are accent, text, dim, heading, surface,
selection, quality, track, placeholder, border and on_accent.
Values are #rrggbb, with the # optional.
A line that cannot be read is skipped, not fatal. A misspelt colour name or a
value that is not #rrggbb leaves that one colour as the theme had it, keeps
the rest, and says what went wrong in the status bar and the log. An unknown
theme name falls back to default the same way. The app always starts.
Named themes are drawn in truecolor; default falls back to 256 colours where
the terminal cannot do better.
[ui]
nerd_font = false # plain glyphs for the icons, for a font that is not a Nerd Font;
# on by default, since a terminal cannot be asked
halfblocks = true # covers as half blocks, for a terminal that claims an image
# protocol and draws it wrong; read at start
list_view = true # Playlists and Albums as a list rather than covers; `v`
notifications = true # a desktop notification when a track starts; off by defaultThe notification names the track, the artist and the album; "Notify on
track change" in Settings is the same key. On Linux and Windows the cover
is beside them, written to the temporary folder as one file that each
track writes over, and on Linux each notification replaces the last. On
macOS the system shows none from a program that is not an application, so
it is sent through one that is. With
terminal-notifier
installed (brew install terminal-notifier) it has the cover and replaces
the last; allow its notifications the first time macOS asks, or in System
Settings. Without it, or while it is not allowed, the notification goes
through AppleScript: no cover, and shown under Script Editor's name.
[network]
proxy = "socks5h://127.0.0.1:1080" # empty: none
no_proxy = "localhost,192.168.0.0/16,music.example" # optional, see belowThe requests to the services go through it: the catalogue, the covers, the
lyrics and the audio. It takes socks5h, socks5, socks4a, socks4,
http and https; a user name and password go in the address
(socks5h://user:password@host:1080), and are then in config.toml as
written. With socks5h and socks4a the proxy looks the names up too;
with socks5 and socks4 this machine does first. The Proxy row in
Settings writes the same key, and draws the password as dots. It is read
at the start, so a change waits for the next one, and an address that is
not one stops the start rather than let the requests leave directly.
It is handed on as ALL_PROXY, HTTPS_PROXY and HTTP_PROXY, over
whatever the shell had set, and the programs the app starts inherit them.
NO_PROXY is set too: this machine and the private ranges (10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16) are reached directly, so a Subsonic,
Jellyfin or Maloja server at home still answers. no_proxy replaces that
list with its own, written as NO_PROXY is: names, addresses and ranges
with commas between. Left empty (no_proxy = ""), nothing is exempt, this
machine included. It has no row in Settings.
What does not go through it:
- Spotify's connection to its access point and its remote control. They are sockets of their own and are not handed this proxy. Its sign-in and the catalogue pages asked over HTTP do go through.
- Jellyfin's remote control, a WebSocket of its own. The library and the audio do go through.
- The sign-in windows of Apple Music, Deezer and YouTube Music, which are the system's browser engine and follow the system's proxy settings. So with a proxy set they do not open on their own: the sign-in starts at the box the cookies are pasted in, and Enter on it, empty, opens the window for whoever wants it anyway.
| What | Linux | macOS | Windows |
|---|---|---|---|
| Config | ~/.config/sonora-tui/config.toml, mode 0600 |
~/Library/Application Support/sonora-tui/config.toml, mode 0600 |
%APPDATA%\sonora-tui\config\config.toml, under your profile's own access rules |
| Service sessions | ~/.local/share/sonora/accounts, mode 0600 |
~/Library/Application Support/sonora/accounts, mode 0600 |
%LOCALAPPDATA%\sonora\accounts, under your profile's own access rules |
| Scrobbling accounts | scrobble.json alongside the config, mode 0600 |
same | scrobble.json alongside the config, under your profile's own access rules |
| Local-files index, Widevine module | under the cache directory | same | same |
| Log | ~/.cache/sonora-tui/sonora-tui.log |
~/Library/Caches/sonora-tui/sonora-tui.log |
%LOCALAPPDATA%\sonora-tui\cache\sonora-tui.log |
The sessions are kept by sonora's own credential store, where the Sonora desktop app keeps its: signed in to a service in one, you are signed in to it in the other. A TIDAL session an earlier version kept beside the config is moved there on the first start.
A config or a cache left by ratidal, this app's earlier name, is moved under the new name on the first start.
- One service at a time. Switching signs out of the view, not of the account: each service keeps its session.
- Bit-perfect only on a direct output. A shared one, the default, is left at the rate it runs at, so content is resampled to it. The quality badge reports what the service delivered, not what reached the speakers.
- No videos. This plays audio, so the video rows on genre pages are left out.
- A refused scrobble is retried with the next batch, in memory, up to two hundred listens a service; nothing survives quitting but the one last try on the way out.
- A card's year is what the service sends. Spotify and YouTube Music send none on their home shelves, so their album cards there have no year; the album page and the Albums view do.
How the crate is laid out, what the test suites cover, and the rules the build enforces: CONTRIBUTING.md.
- sonora — the services, the
engine, the lyrics and the scrobblers. This is a terminal front for its
musiccrate. - ratatui and ratatui-image — the terminal UI and the cover art.
- spotify-player — how a network-backed ratatui app is put together.
- rmpc — the single-flight image-encoding pattern.
GPL-3.0-or-later, like sonora whose music crate it links — see
LICENSE. The crate is a git dependency pinned to a commit:
sonora does not publish it, which is also why this build is not on
crates.io.
