npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rekordbox-connect

v1.1.0

Published

Library to read the Rekordbox database and emit change events

Readme

rekordbox-connect

Library for reading the Rekordbox SQLCipher-encrypted database and emitting events when the library or play history changes. Built to decouple Rekordbox integration out of NowPlaying into a standalone, reusable package.

Features

  • Polls the Rekordbox database file for changes (mtime-based)
  • Typed events: ready, db-changed, tracks, history, error
  • Incremental history emission (only new plays after start)
  • Uses better-sqlite3-multiple-ciphers for SQLCipher support
  • Automatically reads database path and password from Rekordbox options.json
  • Decrypts database password using Blowfish encryption
  • Configurable DB path, password, polling interval, track max rows, and history max rows

Quick Start

import { RekordboxConnect } from 'rekordbox-connect';

const rb = new RekordboxConnect({ pollIntervalMs: 2000, maxRows: 5000, historyMaxRows: 100 });

rb.on('ready', (info) => {
  console.log('Rekordbox ready:', info);
});

rb.on('db-changed', (change) => {
  console.log('Database changed:', change);
});

rb.on('tracks', (payload) => {
  console.log('Loaded tracks:', payload.count);
});

rb.on('history', (payload) => {
  console.log('New plays:', payload.count);
});

rb.start();

// later
// rb.stop();

API

new RekordboxConnect(options?)

Options:

  • dbPath?: string — Absolute path to the Rekordbox DB. If omitted, read from Rekordbox options.json.
  • dbPassword?: string — Database password for SQLCipher decryption. If omitted, read and decrypted from Rekordbox options.json.
  • pollIntervalMs?: number — Milliseconds between file mtime polls. Default 2000.
  • maxRows?: number — Limit for tracks emission. Default 5000.
  • historyMaxRows?: number — Limit for history emission per poll. Default 100.

Methods:

  • start() — Locate/open DB, emit initial ready, load tracks/history, and begin polling.
  • stop() — Stop polling and close DB handle.

Events:

  • ready{ dbPath, modifiedTime } when the DB is opened.
  • db-changed{ dbPath, previousModifiedTime, modifiedTime } when file mtime increases.
  • tracks{ dbPath, count, rows } with a slice of tracks (schema best-effort per Rekordbox version).
  • history{ dbPath, count, rows, lastRowId } with new plays since the previous poll.
  • error(error) for any recoverable errors.

Notes

  • Rekordbox stores its library as a SQLCipher-encrypted SQLite database. By default, the library reads both the database path and encrypted password from Rekordbox's options.json file (located at ~/Library/Application Support/Pioneer/rekordboxAgent/storage/options.json on macOS).
  • The password is decrypted using Blowfish encryption before opening the database.
  • If dbPath and dbPassword are not provided, the library automatically locates and reads them from options.json.
  • Track schema varies across Rekordbox versions. When unknown, tracks emits raw rows from the detected song table (e.g., djmdSong). Map to your internal types as needed.
  • History polling is rowid-based: on startup the cursor seeds to the current max rowid, so history only emits new plays after the library starts.

Related Packages

These libraries power Now Playing — a real-time track display app for DJs and streamers.

License

MIT