A music player and server for your own library, local or on any OpenSubsonic server: a desktop app on macOS and Linux, the same GPUI app on iOS, a SwiftUI app on Apple TV, a Compose app on Android, a terminal UI on macOS (Apple silicon) and Linux, and a server with a web UI, on one Rust core. koan.rocks
It's a music player and server, for local collections and remote ones (anything OpenSubsonic). Remote libraries sit behind a fairly aggressive local cache. It handles multi-terabyte libraries with ease and has all the core audio features you'd want, like gapless and bit-perfect output (where the system allows). It's built from 25 years of messing about with music, being annoyed with pretty much everything, and wanting my dream application.
The idea is to be fully compatible with the existing ecosystem while bringing the decent UX and modern ideas that professionally made streaming services have. It started as a little cross-platform CLI and TUI app on a Rust core. Now there's a native desktop app for macOS and Linux (no Electron) that links that core directly, the same app on iPhone, a SwiftUI app for Apple TV, an Android app, and a server. The UX takes what I like about Apple Music and fb2k and fixes the things I thought were dumb. The point is to do the basics properly before adding features, and I'm really proud of it.
I wanted UX that makes it easy as hell to do what you want, while staying SUPER low on resources (and now battery). And I wanted the stuff you don't really see in the self-hosted space: device control and handoff, EQ profiles and convolution, DLNA output (with EQ!), and a cache built for a commuter who often has no signal, so you never have to remember to download your whole queue first. The best of every world, why not?
My philosophy is that you should lead with your opinions, but let people customise and tweak them to match theirs.
Because it grew organically, and I've insisted on staying compatible with OpenSubsonic, every part works on its own. You can use the desktop app with Navidrome. You can use the server with Arpeggi. Or you can use kōan all the way down and get the non-standard (sorry) features such as remote control. I think a shared standard like OpenSubsonic is incredibly important so everyone plays nicely together, but it shouldn't stop us experimenting to compete with how well the professional streaming platforms integrate.
One thing I've noticed: when you mix self-hosted apps with proprietary tech, say AirPlay from the fantastically solid play:Sub, you're treated as a second-class citizen. The audio has to stream over the wire from your phone, which is laggy. With kōan's remote features, the device you send it to plays its own copy.
I did use AI-assisted coding for this project. I've been building fairly high-quality software for a loooong time (decades) before AI existed, and I'd like to think the decisions reflect that rather than vibing slop. I probably could have written it myself, but I wanted to step back and be more of an architect, technical lead and product owner than the person typing out the code, as I'm just one person.
To look around first, sign in to demo.koan.rocks as demo, password demo, from a browser or any of the apps. It resets every day at midnight UTC.
Desktop app (macOS and Linux):
brew install --cask radiosilence/tap/koan-appYou may have to update brew's trust settings to trust the tap.
Alternatively, download Koan.dmg from the latest release. On Linux, each release carries an AppImage and a .deb. See the desktop app.
CLI/TUI:
# mise (recommended)
mise use -g github:radiosilence/koan@latest
# homebrew
brew install radiosilence/tap/koan
# or via cargo
cargo install koan-cli
# or build from source
git clone https://github.com/radiosilence/koan.git && cd koan
cargo install --path crates/koan-cliSingle binary. macOS needs nothing else. Linux needs the ALSA and D-Bus development headers:
# Debian/Ubuntu
sudo apt install libasound2-dev libdbus-1-dev
# Fedora
sudo dnf install alsa-lib-devel dbus-devel
# Arch
sudo pacman -S alsa-lib dbusBuilding the whole workspace on Linux, as just check does, also builds the kōan GUI app, which needs GPUI's libraries as well (on Debian and Ubuntu: libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libfontconfig-dev libfreetype-dev libx11-xcb-dev libvulkan-dev).
The iOS and Apple TV apps are in App Review; until they are released, the TestFlight beta installs them on an iPhone, iPad or Apple TV. The iOS app can also be built from source: just ios-phone installs it on a plugged-in iPhone, signed with your own (free) Apple developer team. Both need iOS or tvOS 26 and a kōan, Navidrome or other Subsonic server to play from.
The Android app is sideloaded from koan-android-arm64.apk on each release, and needs Android 10 or later on a 64-bit ARM phone. See Android.
koan config init # create config dir + commented template
# edit ~/.config/koan/config.local.toml:
# [library]
# folders = ["/path/to/your/music"]
koan scan # index your library
koan # launch the TUIspace to pause, </> to skip, p to pick tracks, a for albums, q to quit.
The desktop app needs none of this: Settings → Library adds folders, Settings → Server signs in to a kōan, Navidrome or Subsonic server.
To run a server, play from Navidrome, or move off it, see the documentation.
- Bit-perfect output through CoreAudio on macOS and ALSA on Linux: the device is switched to the source's sample rate rather than resampled to reach it, and the format badge says when a device refuses.
- Gapless, including after the queue is edited: the decoder runs ahead across track boundaries, and an edit restarts it at the playhead.
- EQ and convolution per output device. Profiles are imported as other tools write them: AutoEQ, Equalizer APO configs with their includes, CamillaDSP, REW, rePhase, Convolver
.cfgfiles and Roon's zips of impulse responses, one per sample rate. AutoEQ is searchable by name or by maker and model, a correction can be moved to another target curve or layered under other profiles, and the apps draw the response and edit the bands. An output without a profile runs nothing. See Equalisation and convolution. - Network amplifiers and streamers (UPnP/DLNA) get the original file, or, with a correction profile, one processed FLAC stream for the whole queue. See Playing on another device.
- Formats: FLAC, MP3, AAC, Vorbis, Opus, ALAC, ADPCM, WAV, AIFF and CAF, in Ogg, Matroska/WebM and MP4.
- ReplayGain in track and album modes, a sleep timer, shuffle and repeat, and media keys through Control Center and MPRIS.
- Any kōan app controls any other, on the same network directly or anywhere through a kōan server, and moves what is playing to it, saying when a device has not woken or the music has not arrived. The device it moves to plays its own copy, so it carries on when the phone sleeps. With Keep running in the menu bar, a closed Mac app stays reachable.
- A cache built for losing signal: the queue is fetched ahead of the playhead, as many tracks as you choose or all of it, within the cache limit, so it keeps playing underground. A limit of zero keeps only what plays next. See Cache management.
- Signing in without a password: invite links, approving another device by code, a passkey in the web UI, and app passwords for Subsonic apps that only sign in with a token. See Authentication.
- Local files and a Subsonic or Navidrome server in one library, with favourites and playlists synced both ways. Compilations stay one album, and one artist is one artist whatever the case or Unicode form.
- Smart playlists, including Navidrome's
.nspfiles and.m3ufiles in the library folders. See Smart playlists. - Play history and Recently played, shared between an account's devices.
- Synced lyrics from LRCLIB, and artist biographies and photos from Wikipedia.
- Search with SQLite FTS5, and an album-grouped queue with 100 levels of undo that survives restarts.
- File organisation with foobar2000-compatible format strings (59
$functions()), every move previewed first. kōan never writes your tags.
koan --headless, or the container image, serves the library to everything else. See Running a server, or Migrating from Navidrome.
- A web UI laid out for a phone and a desktop, with gapless playback in the browser.
- Share links whose pages play without an account and unfurl with their cover.
- An OpenSubsonic API, so Subsonic apps play from it too, with favourites, ratings, bookmarks, saved play queues and transcoding to Opus, MP3 or AAC.
- Accounts with API keys and app passwords, managed from the web UI or the apps, and web UI sign-in through an authenticating reverse proxy.
- Two-step sign-in: an authenticator app (TOTP, RFC 6238), a security key or a passkey (WebAuthn) beside the password, with recovery codes, set up on the web UI's Account page; a passkey signs in on its own. The apps, terminal UI and CLI ask for the code. See Two-step sign-in.
- ListenBrainz and Last.fm scrobbling per account, sent by the server. ListenBrainz is set up from the web UI or the apps, Last.fm from the web UI.
- MCP at
/mcpwith its own sign-in, so an assistant such as Claude can browse the library and drive playback on your devices. It can never move, rename or delete a file. See MCP integration. - GraphQL for everything the apps can do.
A full-screen Ratatui player on macOS and Linux, shaped like the apps: the queue, now playing, the album, artist and track browsers, favourites, recent, search, playlists, history, downloads, the EQ and settings as pages, linked record and artist pages, an actions menu on every row, cover art drawn as real images where the terminal supports it, a now-playing page with the signal path and the EQ in use, an accent that follows the cover, full mouse support and 22 visualiser modes. Like the apps, it can control other kōan devices and be controlled by them. See the terminal UI guide.
koan.rocks/compare compares kōan feature by feature with Subsonic, Jellyfin and Plex apps for iPhone and Mac, desktop players including Roon and foobar2000, room-correction software and self-hosted servers. It covers what kōan does not do as well. The table below covers terminal players, which that page leaves out.
| kōan | ncmpcpp | cmus | musikcube | termusic | rmpc | stmp | |
|---|---|---|---|---|---|---|---|
| Language | Rust | C++ | C | C++ | Rust | Rust | Go |
| Standalone | Yes | No (MPD) | Yes | Yes | Yes | No (MPD) | No (Subsonic) |
| Bit-perfect | Yes | Via MPD | Via ALSA | No | No | Via MPD | No |
| Gapless | Yes | Yes | Yes | Yes | Yes | Yes | No |
| Subsonic/Navidrome | Yes | No | No | No | No | No | Yes |
| Local library | Yes | Via MPD | Yes | Yes | Yes | Via MPD | No |
| Local + remote unified | Yes | -- | -- | -- | -- | -- | -- |
| Album art | Kitty/iTerm2, halfblock elsewhere | Kitty | No | No | Kitty/Sixel | Kitty/Sixel | No |
| ReplayGain | Yes | Via MPD | Yes | Yes | No | Via MPD | No |
| fb2k format strings | 59 functions | Column fmt | Basic | No | No | Basic | No |
| File organization | Yes | No | No | No | No | No | No |
| FTS search | SQLite FTS5 | MPD search | Filter | Text | Filter | MPD search | Basic |
| Queue undo/redo | 100-deep | No | No | No | No | No | No |
| Mouse support | Full | Yes | Yes | Basic | Yes | Yes | No |
| Media keys | macOS CC + MPRIS | Via MPRIS | Via MPRIS | -- | Via MPRIS | Via MPRIS | -- |
| Drag & drop | Finder -> TUI | No | No | No | No | No | No |
| Lyrics | Synced + plain | Via MPD | No | Plugin | No | Via MPD | No |
| Visualizer | 22 modes | No | No | No | No | No | No |
| Favourites | Yes (syncs) | Via MPD | No | Yes | No | Via MPD | Yes |
| Streaming playback | Yes (256KB) | Via MPD | No | No | No | Via MPD | Yes |
| API / MCP | GraphQL + MCP | MPD protocol | No | No | No | MPD protocol | No |
| Tag editing | No | Via MPD | No | Yes | Yes | Via MPD | No |
| DSP / EQ | EQ + FIR | Via MPD | Yes | Yes | No | Via MPD | No |
| Auth | JWT + roles | No | No | No | No | No | No |
| Platforms | macOS, Linux | Linux/macOS | Linux/macOS/BSD | Linux/macOS/Win | Linux/macOS/Win | Linux/macOS | Linux/macOS |
- Tag editing: inline editing, bulk operations and a vimv-style external editor.
- Similar artists, from MusicBrainz and Last.fm.
At koan.rocks/docs, rendered from docs/. Start with Getting started, Running a server or Migrating from Navidrome.
File -> Symphonia -> f32 samples -> rtrb ring buffer -> CoreAudio/cpal callback -> DAC
Eight crates: koan-core (audio engine, player, database, indexer), koan-tui (Ratatui TUI, visualizers, media keys), koan-server (GraphQL, Subsonic REST, MCP), koan-runtime (KoanEngine, the facade every app drives), koan-ffi (its uniffi bindings for the iOS, tvOS and Android apps), koan-gui (the desktop app, in GPUI, on macOS and Linux), koan-kit (the desktop app's design system) and koan-cli (the koan binary). See ARCHITECTURE.md for the full technical manual.
The desktop app links the engine in-process through koan-runtime rather than talking to a server, and shares one library and config with the terminal UI. The iOS app (apps/ios) links it through koan-ffi; it asks iOS for each track's sample rate, so a USB DAC that supports the rate is switched to it and there is no resampling in koan or iOS; on any other route iOS resamples, and the format badge shows the rate the hardware runs at. The Apple TV app is the same again, built around the remote and mostly played to from a phone or a Mac; tvOS keeps app files only in a cache it may empty, so the configuration is mirrored into the app's preferences, which survive. The Android app (apps/android) is Compose over the same core, loading koan-ffi through uniffi's Kotlin bindings.
just check # test + clippy + actionlint
just fmt # cargo fmt
just cli # cargo run -p koan-cli -- <args>
just gui-run # build and launch the desktop app
just gui-bundle # package the desktop app: .app and DMG on macOS, AppImage and .deb on Linux
just gui-ios # build and launch the iOS app on a simulator
just ios-phone # install on the iPhone plugged in, signed with your personal team
just tv-run # build and launch the Apple TV app on a simulator
just tv-device # install on the Apple TV paired with XcodeSee CONTRIBUTING.md for guidelines.
AGPL-3.0-or-later, so anyone who runs a changed kōan, including as a network service, has to publish their changes. NOTICE carries an additional permission for app store distribution, which the licence would otherwise conflict with. Releases up to 0.71.4 remain under MIT.