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(May need to use http://127.0.0.1:8888/callback instead)
  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.4.tar.gz (23.4 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.4-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dj_rara-0.1.4.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dj_rara-0.1.4.tar.gz
Algorithm Hash digest
SHA256 af7fa972f4b73f5f7b77b9bf80309d50f16afdfedbf0baf7425ce74d9572da00
MD5 d9ee047dad6f07731ad68289a1a781e2
BLAKE2b-256 eda87d647b2734b13ea593c13e5dcbcb37c9b55299c018d9e3a2b0bfcad79082

See more details on using hashes here.

Provenance

The following attestation bundles were made for dj_rara-0.1.4.tar.gz:

Publisher: publish.yml on azhou555/dj-rara

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: dj_rara-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dj_rara-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9a3800309fb7d87ca84eb058291e9cbb62cc70c0754589e11dbd1aa6d01bbaed
MD5 af50ea97b8ed412a8e364afab0cff574
BLAKE2b-256 b4ac92df7bb6ce2dc08020a38ff3c091fb278425b1decef34388d08d55d52aba

See more details on using hashes here.

Provenance

The following attestation bundles were made for dj_rara-0.1.4-py3-none-any.whl:

Publisher: publish.yml on azhou555/dj-rara

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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