XML Export
XML structure
Section titled “XML structure”A minimal Rekordbox XML file looks like this:
<?xml version="1.0" encoding="UTF-8"?><DJ_PLAYLISTS Version="1.0.0"> <PRODUCT Name="rekordbox" Version="7.2.10" Company="AlphaTheta"/> <COLLECTION Entries="12"> <TRACK TrackID="1" Name="Track Title" Artist="Artist Name" Genre="Deep House" Comments="Great track" Rating="204" Location="file://localhost/Users/.../track.flac" Tonality="Am" AverageBpm="124.00" Colour="0x25FDE9"/> </COLLECTION> <PLAYLISTS> <NODE Type="0" Name="ROOT" Count="1"> <NODE Type="1" Name="My Set" Entries="12" KeyType="0"> <TRACK Key="1"/> </NODE> </NODE> </PLAYLISTS></DJ_PLAYLISTS>What reklawdbox exports
Section titled “What reklawdbox exports”Editable fields (actively written by write_xml): Genre, Comments, Rating (1-5), Colour, Label, Year, Album.
Pass-through fields (read from DB, included in export): title, artist, album, remixer, label, year, key, BPM, file location, file kind, bit rate, sample rate, play count, date added, total time.
Omitted fields (not included in export): Composer, Grouping, Mix, Size, DiscNumber, TrackNumber.
Playlists are included when write_xml is called with the playlists parameter.
Importing into Rekordbox
Section titled “Importing into Rekordbox”-
Add XML to Rekordbox — Open Preferences → Advanced → rekordbox xml → Imported Library → Browse → select the exported XML file.
-
Verify in the XML view — In the sidebar, click the “Display rekordbox xml” icon. Browse the imported tracks under “All Tracks” and check that the metadata looks correct before importing.
-
Import into collection — Once satisfied, select all tracks (Cmd+A), right-click → Import To Collection. When prompted “Do you want to load information in the tag of the library being imported?”, click Yes (tick “Don’t ask me again” for bulk imports).
What survives a round-trip
Section titled “What survives a round-trip”Preserved: Genre, Comments, Rating, Colour, Label, Year, title, artist, album, remixer, key, BPM, playlist structure.
Not included: Cue points, beat grids, My Tags, Hot Cue Banks, phrase analysis, smart playlist criteria, waveform data (ANLZ files). These remain in the Rekordbox database — reimport doesn’t touch them.
Rating values
Section titled “Rating values”Rekordbox maps stars to 0/51/102/153/204/255. reklawdbox converts automatically — you specify 1-5 in tool calls.
Track colors
Section titled “Track colors”Rekordbox supports eight track colors. Use these hex values in reklawdbox:
| Color | Hex |
|---|---|
| Rose | 0xFF007F |
| Red | 0xFF0000 |
| Orange | 0xFFA500 |
| Lemon | 0xFFFF00 |
| Green | 0x00FF00 |
| Turquoise | 0x25FDE9 |
| Blue | 0x0000FF |
| Violet | 0x660099 |
Key format
Section titled “Key format”Rekordbox XML uses classic notation (Am, Bb, F#m). Camelot is display-only in the UI. reklawdbox converts automatically.
Backup behavior
Section titled “Backup behavior”Every write_xml call automatically backs up your Rekordbox database files before writing. The backup is a compressed archive of master.db and related files, stored in ~/Music/rekordbox-backups/. Up to 20 pre-operation backups are kept; older ones are rotated out.
If the backup fails, staged changes are restored and the export is blocked — your XML file is never written with a failed backup.
You can also manage backups manually with reklawdbox backup — see CLI Commands.
To use a custom backup script instead of the built-in one, set REKLAWDBOX_BACKUP_SCRIPT in your environment. See Environment Variables.
XML files are written to ~/reklawdbox-exports/ by default.