A simple terminal UI player for di.fm
Find a file
2025-11-28 22:13:18 -08:00
.chglog feat: generate changelogs and build binaries with nix 2025-11-28 19:12:19 -08:00
.github/workflows fix: don't tag before creating a release 2025-11-28 22:13:18 -08:00
app Expand media key support: add play/pause 2024-01-28 08:16:31 -07:00
bin Update shell.nix with dependencies 2024-01-20 12:25:36 -07:00
components feat: Support the whole audio addict network 2024-05-05 11:44:58 -07:00
config feat: Support the whole audio addict network 2024-05-05 11:44:58 -07:00
context feat: sort favorites alphabetically 2025-11-28 12:14:05 -08:00
difm feat: sort favorites alphabetically 2025-11-28 12:14:05 -08:00
mpris fix mpris bug on macos 2025-09-23 14:50:51 -07:00
player Fix leaky stream on channel switch bug 2023-06-20 16:41:48 -06:00
views feat: sort favorites alphabetically 2025-11-28 12:14:05 -08:00
.envrc chore: add .envrc 2025-09-22 09:18:34 -07:00
.gitignore chore: add .envrc 2025-09-22 09:18:34 -07:00
CHANGELOG.md bump di-tui version 2025-11-29 06:10:01 +00:00
default.nix bump di-tui version 2025-11-29 06:10:01 +00:00
envrc.sample Update shell.nix with dependencies 2024-01-20 12:25:36 -07:00
flake.lock Merge pull request #29 from acaloiaro/remove-unnecessary-dependency 2024-10-10 11:47:27 -04:00
flake.nix Generate changelog in workflow using git-chglog 2025-11-28 19:24:38 -08:00
go.mod fix: revert back to go 1.21 for nixpkgs 2025-01-01 09:23:38 -07:00
go.sum chore: remove unnecessary dependency 2024-10-10 08:45:44 -07:00
gomod2nix.toml chore: remove unnecessary dependency 2024-10-10 08:45:44 -07:00
LICENSE Initial commit 2020-02-23 21:48:39 -05:00
main.go bump di-tui version 2025-11-29 06:10:01 +00:00
README.md docs: clarify that favorites must be edited on the web player 2025-11-19 15:00:38 +00:00
shell.nix Add devenv / update go version 2024-02-25 09:10:05 -07:00

di-tui

A simple terminal UI player for di.fm Premium

Packaging status

App Screenshot


This app began as di.fm player, but now supports the whole Audio Addict network

  • Classical Radio
  • DI.fm
  • Radio Tunes
  • Rock Radio
  • Jazz Radio
  • Zen Radio

Run / Install

Binary Releases

Binary releases are available in releases.

go install

go install github.com/acaloiaro/di-tui@latest

Nixpkgs (currently unstable channel only)

di-tui is currently in nixpkgs/nixos-unstable.

Run the flake

nix run github:acaloiaro/di-tui

Usage

Authenticate

There are two authentication options

  • Enter your username and password directly into di-tui with the --username and --password switches
  • If you're justifiably uncomfortable with entering your username/password into this application, copy your "Listen Key" from (https://www.di.fm/settings) and create the following file:

~/.config/di-tui/config.yml

token: <YOUR LISTEN KEY>
album_art: <BOOLEAN>
key description
token string Your di.fm authentication "Listen Key" found at https://www.di.fm/settings
album_art boolean Enable/disable album ASCII art

Choose a network

DI.fm is the default network, but other audio addict networks can be chosen with the --network switch.

switch value network
classicalradio Classical Radio https://classicalradio.com
di DI.fm https://di.fm
radiotunes Radio Tunes https://radiotunes.com
rockradio Rock Radio https://rockradio.com
jazzradio Jazz Radio https://jazzradio.com
zenradio Zen Radio https://zenradio.com

Favorites

Favorites must be edited on the web player (e.g. at DI.fm) and cannot be edited via this app. It used to be possible to edit favorites from this app, but DI.fm introduced limitations on their API.

Dependencies

PulseAudio

Both linux and MacOS depend on pulseaudio to be running.

MacOS

By default, pulseaudio on MacOS runs as "root", which is not ideal. PulseAudio is best run by non-root users. By symbolically linking the pulseaudio plist file into your user's ~/Library/LaunchAgents/, it runs as your user.

brew install pulseaudio
ln -s $(brew info pulseaudio | grep "/usr/local/Cellar" | awk '{print $1}')//homebrew.mxcl.pulseaudio.plist ~/Library/LaunchAgents
brew services start pulseaudio

Debian / Ubuntu

apt install pulseaudio

MPRIS/D-bus support

MPRIS is a D-Bus specification allowing media players to be controlled in a standardized way, e.g. with playerctl.

di-tui supports a very limited set of MPRIS commands. The limited set is due to the fact that di-tui is a streaming audio player, and it doesn't make sense to support next, previous, seek, etc., because audio streams have no next or previous track; or the ability to seek forward.

Supported MPRIS commands

play-pause Toggles Play/Pause, e.g. playerctl --player=di-tui play-pause toggles play/pause on di-tui if it's the active player

Supported MPRIS metadata

track The currently playing track

artist The currently playing artist

status The status of the player, e.g. playing, paused, stopped

playerName The name of the player: di-tui

Configuration

Themes

By default, di-tui respects your terminal's color scheme. However, there are four color settings that one can change by adding a theme to config.yml.

Tomorrow-Night inspired theme

theme:
  primary_color: "#81a2be"
  background_color: "#2a1f1a"
  primary_text_color: "#969896"
  secondary_text_color: "#81a2be"