Skip to main content

A lo-fi Spotify recommendation TUI — personalized tracks, mood-based discovery, playlist curation.

Project description

DJ Rara

A lo-fi Spotify recommendation TUI. Mood-based discovery, track curation, playlist creation, and Music DNA stats — all in the terminal.

Python 3.11+ License MIT

Install

pip install dj-rara

Spotify Setup (one time)

  1. Go to developer.spotify.com/dashboard and create a free app
  2. In the app settings, add http://localhost:8888/callback as a Redirect URI and save
  3. Note your Client ID and Client Secret

On first run, DJ Rara will open a setup screen where you paste these in. After that, a browser window opens for Spotify login — authorize it and you're done. Credentials are saved locally in .env.

Usage

dj-rara

Or if running from source:

python -m dj_rara

Screens

Mood Screen (home)

Pick your settings and hit ♫ discover:

Setting Description
mood chill / energetic / focus / melancholy — shapes search keywords
genre Your top genres from Spotify + a few random ones to explore
time range last 4 weeks / 6 months / all time — which era of your taste to draw from
vibe familiar → mostly your artists' catalogues · new → mostly search-based discovery
how many number of tracks to generate (1–100)

Recommendations Screen

Browse and curate the generated tracks before saving.

Key Action
↑ ↓ navigate tracks
space toggle keep (green) / skip (strikethrough)
o preview track — plays 30s audio in terminal via iTunes, or opens Spotify if unavailable. Press again to stop
c create playlist from kept tracks (falls back to all tracks if none kept)
s go to Stats
esc back to Mood

Stats Screen — Music DNA

Genre bars, audio profile, and top artists for your listening history.

Key Action
t cycle time range (last 4 weeks / 6 months / all time)
p go to Playlists
esc back

Playlists Screen

Browse all DJ Rara playlists you've created. Highlights show mood, genre, and track count.

Key Action
↑ ↓ navigate playlists
enter open selected playlist in Spotify
esc back

Themes

Press ctrl+pThemes to switch:

Theme Description
spotify Deep black, Spotify green, teal accents (default)
apple-music Light gray, red accent — clean light mode
lofi-cafe Warm dark brown, muted gold, cream text
midnight Dark navy, soft purple, moonlight blue
amoled Pure black, neon green — minimal

How Recommendations Work

Since Spotify deprecated their recommendations API for new apps in late 2024, DJ Rara builds your queue from three sources:

  1. Artist top tracks — fetches the most-played tracks from your top artists (personalized, possibly new-to-you songs)
  2. Saved library — your liked songs
  3. Mood + genre search — keyword searches like "shoegaze chill" or "lo-fi indie" to surface discovery tracks

The vibe slider controls the mix:

  • familiar (10% discovery) — mostly sources 1 & 2
  • mixed (50/50, default)
  • new (90% discovery) — mostly source 3

Tracks you've already curated into a DJ Rara playlist are filtered out automatically so you don't see the same songs twice.

Troubleshooting

Auth failed / redirect URI mismatch Make sure http://localhost:8888/callback is added exactly as shown in your Spotify app's Redirect URIs settings.

Try deleting .cache if authentication gets stuck and re-run.

No tracks found Try setting vibe to new and clearing genre selections — a very specific genre + familiar setting can sometimes return an empty pool.

Preview not playing afplay is used for terminal audio on macOS. On other platforms the track opens in Spotify instead.

Requirements

  • Python 3.11+
  • macOS / Linux / Windows
  • A free Spotify account + Spotify Developer app

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dj_rara-0.1.1.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dj_rara-0.1.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file dj_rara-0.1.1.tar.gz.

File metadata

  • Download URL: dj_rara-0.1.1.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dj_rara-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b1db437b4b325e713c5aefab53eac098c6f96a8296be8731347b7c5fa9451dfa
MD5 7597370cf950f8a4bd9c810018ad3a93
BLAKE2b-256 783ba9bd2098d7a0f2228fbe842995ab5879f6142873f155f4e64cd3d9fd4d98

See more details on using hashes here.

File details

Details for the file dj_rara-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dj_rara-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dj_rara-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8db89f7a7be5f6c45c85380cf02458b863e73f714e2d7e55d3eb6234fc70e52e
MD5 c9a4a9d4dcfef271f37fa77adea87b8f
BLAKE2b-256 20fd5903950773ca681d99f519df75042e176c2c509f7727ab1e1f5c8e5c92ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page