This guide covers installing, running and configuring FluxTuner.
FluxTuner requires:
- Python 3.11 or newer.
- At least one playback backend:
mpvrecommended for broad stream compatibility and live controls.ffplay, provided by FFmpeg, as a broad fallback.mpg123as an optional lightweight MP3/MPEG backend.ogg123, provided by vorbis-tools, as an optional lightweight Ogg/Vorbis/Opus-style backend.
- A terminal emulator with good Unicode support for the TUI.
The GTK desktop GUI also requires GTK4 and PyGObject.
sudo prt-get depinst mpv
sudo prt-get depinst ffmpeg
sudo prt-get depinst mpg123
sudo prt-get depinst libao vorbis-toolssudo apt install mpv ffmpeg mpg123 vorbis-toolssudo pacman -S mpv ffmpeg mpg123 vorbis-toolssudo dnf install mpv ffmpeg mpg123 vorbis-toolsbrew install mpv ffmpeg mpg123 vorbis-toolsVerify ffplay if you plan to use the fallback backend:
ffplay -versiongit clone https://github.com/pitill0/fluxtuner.git
cd fluxtuner
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python -m fluxtunerpipx install git+https://github.com/pitill0/fluxtuner.git
fluxtunerUpgrade:
pipx upgrade fluxtunerUninstall:
pipx uninstall fluxtunerFluxTuner provides four user-facing modes that share core services and library behavior: the Textual TUI, GTK4 GUI, legacy numbered CLI and browser-based Web/server mode.
fluxtuner # Textual TUI, default
fluxtuner --gui # GTK4 desktop GUI
fluxtuner --cli # legacy numbered CLI
fluxtuner-web --host 127.0.0.1 --port 8080 # Web/server modeThe Web/server command requires the optional Web dependencies, installed with
python -m pip install -e ".[web]" from a source checkout.
The examples in this guide use the installed fluxtuner command. When
working directly from a source checkout, use the equivalent module form:
python -m fluxtunerOptions are identical, so fluxtuner --doctor becomes
python -m fluxtuner --doctor, for example.
FluxTuner currently supports:
mpvffplaympg123ogg123
By default, FluxTuner uses automatic backend detection.
fluxtuner --player auto
fluxtuner --player mpv
fluxtuner --player ffplay
fluxtuner --player mpg123
fluxtuner --player ogg123List supported and available backends:
fluxtuner --list-players
fluxtuner --doctorBackend notes:
mpvsupports play/stop, live pause, live volume and live mute controls.ffplayis a broad fallback focused on simple play/stop.mpg123is a specialized lightweight backend for MP3/MPEG streams.ogg123is a specialized lightweight backend for Ogg/Vorbis/Opus-style streams, depending on the localogg123build.
List available themes:
fluxtuner --list-themesRun with a theme:
fluxtuner --theme nordSave a theme as default:
fluxtuner --theme nord --save-themeor:
fluxtuner --save-theme nordBuilt-in themes:
defaultnorddraculaamberptmtrx
fluxtuner --help
fluxtuner --version
fluxtuner --list-players
fluxtuner --doctor
fluxtuner --list-themes
fluxtuner --clear-cache
fluxtuner --export-favs favorites.json
fluxtuner --import-favs favorites.json
fluxtuner --export-playlists playlists.json
fluxtuner --import-playlists playlists.json| Key | Action |
|---|---|
/ |
Focus search |
Enter |
Play/apply selected row |
Escape |
Focus station list |
Space |
Play/stop selected station |
x |
Stop playback |
+ / - |
Volume up/down when supported by the active backend |
m |
Mute/unmute when supported by the active backend |
a |
Add selected station to favorites |
f |
Show favorites |
d |
Remove selected favorite |
e |
Rename favorite |
g |
Edit favorite tags |
u |
Filter favorites by tag |
p |
Show playlists |
n |
Create playlist |
b |
Add station to playlist |
r |
Play random favorite |
h |
Show history |
l |
Play last station |
t |
Show themes |
y |
Save selected theme |
q |
Quit |
FluxTuner stores local data in XDG-style locations.
The base directories respect XDG_CONFIG_HOME, XDG_DATA_HOME and XDG_CACHE_HOME when they are set.
Default locations:
- Library database:
~/.local/share/fluxtuner/fluxtuner.db - Config:
~/.config/fluxtuner/config.json - Data usage:
~/.local/share/fluxtuner/usage.json - Search cache:
~/.cache/fluxtuner/search_cache.json
The library database stores favorites, playback history, manual playlists and normalized station records for profile-scoped library data.
Favorites are the saved-station library used by all FluxTuner frontends. Manual playlists reference saved stations; adding a station to a playlist can therefore also save it to favorites/library if it is not already present. This keeps playlist resolution, exports and compatibility checks consistent across the TUI, GTK, CLI and Web modes.
Legacy library JSON files are still supported as migration sources:
~/.local/share/fluxtuner/favorites.json~/.local/share/fluxtuner/playlists.json~/.local/share/fluxtuner/history.json
Older dotfiles such as ~/.fluxtuner_favorites.json,
~/.fluxtuner_playlists.json, ~/.fluxtuner_history.json and
~/.fluxtuner_usage.json are copied into the current XDG locations when needed
and kept in place as a conservative migration.
Import and export commands still use JSON files:
fluxtuner --export-favs favorites.json
fluxtuner --import-favs favorites.json
fluxtuner --export-playlists playlists.json
fluxtuner --import-playlists playlists.jsonWhen using a Python virtual environment, PyGObject installed through Homebrew may not be visible inside the venv.
Install system dependencies:
brew install gtk4 pygobject3 mpv ffmpegIf the GUI fails with ModuleNotFoundError: No module named 'gi', find the Homebrew PyGObject path:
find "$(brew --prefix)" -path "*site-packages/gi/__init__.py" 2>/dev/nullThen run FluxTuner with that site-packages directory in PYTHONPATH.
FluxTuner supports both general-purpose and specialized playback backends.
General-purpose backends:
mpv— recommended backend with broad stream compatibility and live controls.ffplay— broad compatibility fallback provided by FFmpeg.
Specialized lightweight backends:
mpg123— lightweight backend for MP3/MPEG streams.ogg123— lightweight backend for Ogg/Vorbis/Opus/FLAC-style streams, depending on the localogg123build.
When a specialized backend is selected explicitly, FluxTuner filters search results where possible so the station list only contains streams that match the active backend capabilities. Saved favorites, history and playlists are kept intact, but incompatible stations are marked and blocked from playback with a clear message.
fluxtuner --player mpg123
fluxtuner --player ogg123The legacy numbered CLI uses the same compatibility checks for searches, favorites and random favorite playback when a specialized backend is active.
Use --doctor to print a compact runtime diagnostic report:
fluxtuner --doctorThe report includes the FluxTuner version, Python/runtime platform, XDG storage paths and player backend availability. This is useful when reporting issues or checking what FluxTuner can see inside a sandboxed environment.
Use --list-players to inspect which playback backends FluxTuner can find in the current environment:
fluxtuner --list-playersThe command shows whether each backend is available or missing, whether it is general-purpose or specialized, and which codecs or live controls it declares.
If no backend is available, install at least one supported player:
mpvfor the recommended general-purpose backend.ffmpeg/ffplayfor the broad fallback backend.mpg123for lightweight MP3/MPEG playback.vorbis-tools/ogg123for lightweight Ogg/Vorbis/Opus-style playback.
Inside Flatpak or other sandboxed environments, run the same command inside the sandbox to confirm which player binaries are actually visible to FluxTuner.
FluxTuner profiles separate favorites, manual playlists and playback history by context. They are useful for setups such as work, home, terrace, pool, focus or testing.
Profiles are not separate user accounts. Anyone using the same FluxTuner installation can still see and select the available profiles.
List known profiles:
python -m fluxtuner --list-profiles
Use --profile NAME to target a profile explicitly:
python -m fluxtuner --profile work
FluxTuner can persist an active profile for profile-aware commands and interfaces:
python -m fluxtuner --profile work --set-active-profile
python -m fluxtuner --show-active-profile
python -m fluxtuner --clear-active-profile
Profile resolution order is:
1. Explicit `--profile NAME` or Web `?profile=NAME`
2. Persisted active profile
3. Internal default profile
The legacy numbered CLI honors --profile NAME for favorites operations:
python -m fluxtuner --cli --profile work
This scopes saving favorites from search, listing/removing favorites and random favorite playback to the selected profile.
When --profile NAME is omitted, the legacy numbered CLI uses the persisted
active profile if one is configured, otherwise it falls back to the internal
default profile.
Import and export commands accept --profile NAME to target a named profile:
python -m fluxtuner --profile work --export-favs work-favorites.json
python -m fluxtuner --profile work --import-favs work-favorites.json
python -m fluxtuner --profile work --export-playlists work-playlists.json
python -m fluxtuner --profile work --import-playlists work-playlists.json
When --profile NAME is omitted, FluxTuner uses the persisted active profile
if one is configured, otherwise it falls back to the internal default profile.
The persisted active profile is used by CLI import/export commands, the legacy numbered CLI favorites flow, the Textual TUI, GTK GUI and Web mode.
Web API endpoints also accept ?profile=NAME as a per-request override:
/api/favorites?profile=work
/api/history?profile=work
/api/playlists?profile=work
Web profile overrides have the highest priority for that request, followed by the persisted active profile and then the internal default profile.