OCDJ
Free tool — v0.1 — macOS

OCDJ

Library & tag hygiene for DJs

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.

House rules

Your library is safe

Never moves, renames or deletes a single file or folder.
Never writes to your Rekordbox database. Cue points, beatgrids and play counts stay put.
Dry run first. Nothing changes until you add --write, and every file’s tags are backed up before any change.
Your library, keys and reports stay on your Mac. One command undoes tag changes.
Class skills

Six tools, one library

01 Audit

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.

LosslessTrue 320SuspectLikely transcodeLow bitrate
02 Tagger

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.

#deep-house#uk-garage#peak-time
03 Origin & language

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.

#from-mexico#lang-japanese
04 Bins

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.

House / DanceLatin / AfroTo Sort
05 Buy list

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.

06 Upgrades

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.

Setup — about 15 minutes, once

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.

  1. 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
  2. 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 setup

    Prefer git? git clone https://github.com/traviszane/dj-crate-tools.git works too, and git pull updates it later.

  3. Add your free keys

    Make your settings file, then open it in TextEdit:

    cp .env.example .env
    open -e .env

    Paste each key after its = sign and save. Keys stay on your Mac. You only need the ones for the tools you use:

  4. 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.toml with 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"
  5. Export your Rekordbox library

    In Rekordbox: File → Export Collection in xml format. Save it as rekordbox.xml inside the private folder of dj-crate-tools-main. Re-export whenever your library changes.

Daily driver

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
CommandWhat it does
crate audit --sample 200Grades 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 200Dry 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 tagThe 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 --writeWrites the cleaned tags into your files, after backing up each file’s tags. Add --overwrite genre to replace genres you already set.
crate tag --vibesOptional: 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 playlistsBuilds the playlists file for Rekordbox (see below).
crate buy-list --from rulesTracks 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 upgradesSwap checklist for new files in your HD folder.
crate restore-tags --allPuts every file’s original tags back.
Make it yours: genre bins live in 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)

  1. Go to developer.spotify.com/dashboard, sign in (Spotify Premium is required for personal developer apps), and click Create app.

  2. Name it anything. Set the Redirect URI to exactly http://127.0.0.1:8888/callback and click Add. Tick Web API, accept the terms and save.

  3. In the app’s Settings, copy the Client ID, then View client secret, into .env as SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET.

  4. Run crate spotify-login once 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.

Back in the booth

Bring it into Rekordbox

A

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.

B

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.

C

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

FAQ

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.