OCDJ
Thousands of downloads, half of them fake 320s, genres all over the place, and no idea what you still need to buy. OCDJ checks every file, sorts your Rekordbox library into clean genre bins, tags where each track is from and what language it’s sung in, and builds a buy list of what to replace.
Open source (MIT). Runs on your own computer. Uses free music databases, with free Gemini AI as an optional extra. Built for Rekordbox.
Your library is safe
--write, and every file’s tags are backed up before any change.Six tools, one library
Spot fake 320s
Checks the frequency content of every file to catch MP3s labeled 320 or WAVs that were really made from a low-bitrate source. Thresholds are deliberately conservative, so warm or vinyl-sourced masters don’t set off false alarms.
Clean genres & tags
Looks each track up on MusicBrainz, Discogs and Last.fm, sets Genre to one of your bins, and keeps the detail as searchable #hashtags in Comments. Your old genre is kept as a hashtag too. Uncertain matches are flagged for review, never guessed.
Play by region
Works out each track’s country of origin and vocal language from several clues: artist country, lyrics language, the ISRC code, the alphabet a title is written in, and community tags. The tagger then adds tags like #from-japan and #lang-spanish, each with a confidence level.
Playlists for Rekordbox
Generates ready-made playlists: one per genre bin, To Sort, Needs Review, an HQ Upgrade List, plus By Language and By Country folders. You import the playlists only, so the rest of your collection is never touched.
Know what to buy
Point it at a Spotify playlist you own, a CSV, a Rekordbox playlist, or rules like “played 5+ times and below True 320”. You get a list of what’s missing and what to upgrade, with one Compare button that searches Bandcamp, Beatport, Traxsource, Volumo and Qobuz at once.
Swap in HQ copies
When you buy a better copy, OCDJ pairs it with the old one and writes a checklist: the swap, which playlists the old copy is in, and how many cue points and loops to re-create when the format changes.
Install
You’ll paste a few commands into Terminal (in Applications → Utilities). Copy each grey box with its button, paste it into Terminal, and press Return.
-
Install the basics
Apple’s command-line tools, then Homebrew (the standard Mac package manager), then Python and ffmpeg. Skip any you already have.
xcode-select --install/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install python ffmpeg -
Download OCDJ
Download the zip and double-click it in Downloads, which makes a folder called
dj-crate-tools-main. Then go into that folder and set it up:cd ~/Downloads/dj-crate-tools-main make setupPrefer git?
git clone https://github.com/traviszane/dj-crate-tools.gitworks too, andgit pullupdates it later. -
Add your free keys
Make your settings file, then open it in TextEdit:
cp .env.example .env open -e .envPaste each key after its
=sign and save. Keys stay on your Mac. You only need the ones for the tools you use:- DISCOGS_TOKEN (tagger): discogs.com → Settings → Developers → Generate new token.
- LASTFM_API_KEY (tagger): last.fm/api/account/create. Only the API key is needed.
- GEMINI_API_KEY (optional vibes): aistudio.google.com/apikey. The free tier is enough.
- SPOTIFY_CLIENT_ID / SECRET (buy lists from Spotify): see the Spotify step below.
-
Tell it where your music is
OCDJ expects two folders: your main library, and one for high-quality copies you buy later. Subfolders, like dated imports, are fine. Create
private/local.tomlwith your own paths:open -e private/local.toml 2>/dev/null || (touch private/local.toml && open -e private/local.toml)# paste this into the file, with your own paths, and save [library] main_folder = "/Users/YOU/Music/DJ Library" hd_folder = "/Users/YOU/Music/DJ Library - HD" -
Export your Rekordbox library
In Rekordbox: File → Export Collection in xml format. Save it as
rekordbox.xmlinside theprivatefolder ofdj-crate-tools-main. Re-export whenever your library changes.
Use it
Run commands from inside the OCDJ folder. Each one writes an HTML report you can open in your browser, plus a CSV, into private/output/.
# go to the folder and turn on OCDJ for this Terminal window
cd ~/Downloads/dj-crate-tools-main
source .venv/bin/activate
| Command | What it does |
|---|---|
crate audit --sample 200 | Grades 200 random files so you can see how it works. Leave out --sample to check everything; results are cached, so re-runs only check new files. |
crate tag --limit 200 | Dry run of the tagger on 200 tracks. The report shows matches, tracks to review, and genres that didn’t fit a bin. Nothing is written. |
crate tag | The full library. With 6,000 tracks this takes hours because of the databases’ rate limits, so start it at night. Stop it any time with Ctrl-C; it picks up where it left off. |
crate tag --write | Writes the cleaned tags into your files, after backing up each file’s tags. Add --overwrite genre to replace genres you already set. |
crate tag --vibes | Optional: Gemini adds 3–5 vibe words and a suggested 1–5 energy rating. Capped at 50 requests a day (about 2,500 tracks); the rest is queued for the next day. |
crate playlists | Builds the playlists file for Rekordbox (see below). |
crate buy-list --from rules | Tracks you’ve played 5+ times or rated 4+ stars whose copy is below True 320. |
crate buy-list --from spotify:<playlist link> | What you own, what to upgrade and what’s missing from a Spotify playlist you own. csv:<file> works for any exported list. |
crate upgrades | Swap checklist for new files in your HD folder. |
crate restore-tags --all | Puts every file’s original tags back. |
buckets.toml, quality thresholds in quality.toml, energy rules in energy.toml and buy-list rules in buylist.toml. They’re plain text with comments, so open any of them in TextEdit.Spotify (optional)
Go to developer.spotify.com/dashboard, sign in (Spotify Premium is required for personal developer apps), and click Create app.
Name it anything. Set the Redirect URI to exactly
http://127.0.0.1:8888/callbackand click Add. Tick Web API, accept the terms and save.In the app’s Settings, copy the Client ID, then View client secret, into
.envasSPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRET.Run
crate spotify-loginonce and click Agree in the browser window that opens.
Spotify only shares tracks from playlists you own or collaborate on. To use someone else’s, open it in Spotify, select all (Cmd-A), right-click → Add to playlist → New playlist, and use your copy’s link.
Bring it into Rekordbox
Load the new tags
After crate tag --write: select the changed tracks in Rekordbox, right-click, and choose Reload Tag. Cue points and beatgrids aren’t affected. WAV files are skipped, because WAV tags are unreliable; edit those inside Rekordbox instead.
Import the playlists
1. File → Library → Backup Library first.
2. Preferences → Advanced → Database → rekordbox xml: choose the crate-playlists-….xml from private/output.
3. Preferences → View: tick rekordbox xml so it appears in the sidebar.
4. Open rekordbox xml → Playlists → crate, right-click a playlist → Import Playlist.
Import playlists only. Never import the whole collection from this file.
Intelligent Playlists
Rekordbox XML can’t carry My Tag values, so OCDJ puts the detail in Comments as hashtags, and Intelligent Playlists filter on them:
Genre is House / Dance + Comments contains #lang-spanish
Rating ≥ 4 + Genre is Latin / Afro
Comments contains #from-japan + Comments contains #peak-time
Questions
Does it cost anything?
No. OCDJ is free and open source. It uses free music databases, and Gemini’s free tier for the optional vibes step. A Spotify buy list needs Spotify Premium (Spotify’s rule for personal apps); the CSV option doesn’t.
Will it mess up my cue points or my folders?
No. It never writes to the Rekordbox database and never moves, renames or deletes files. Tag changes only happen with --write, after a backup, and crate restore-tags --all undoes them.
Why are so many of my files “Suspect”?
Many downloads are 320 kbps files made from a lower-bitrate source. You can see it as a hard cutoff around 19 kHz instead of the 20 kHz or more of a real 320. Suspect means “worth a listen”, not “bad”. The thresholds are in quality.toml.
How long does the first tagging run take?
MusicBrainz allows one request per second, so expect a few hours per few thousand tracks. Every lookup is cached and runs can be stopped and resumed, so later runs only process new or changed tracks.
Windows? Serato? Traktor?
OCDJ is built and tested on macOS with Rekordbox. The audit, buy list and file tagging aren’t tied to Rekordbox, but the playlist import and the library reading are. Contributions are welcome on GitHub.
Can I use it with an AI assistant?
Yes. OCDJ includes a local MCP server with read-only tools (search your library, build a buy list, quality report) for Claude, Gemini CLI and other MCP clients. See AGENTS.md in the repo.