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

@open-crate/core

v0.1.1

Published

Framework-agnostic engine for harmonic DJ set generation: Camelot/harmonic theory, a swappable set-generator, a portable crate schema, and pluggable import/enrichment adapters.

Readme

@open-crate/core

The framework-agnostic engine behind open-crate. Zero runtime dependencies. MIT.

It does four things:

  1. A portable crate schema (the Open Crate Format) so your library isn't trapped in one app.
  2. Camelot + harmonic theory — notation, conversions, and transition scoring built on the one fact that one step round the Camelot wheel is a perfect fifth (7 semitones).
  3. A swappable set-generator — an interface + an open default. Bring your own algorithm.
  4. Pluggable adapters for importing libraries and enriching key/BPM/metadata.
npm install @open-crate/core

Want the full reference app and import tools? Clone the repo:

git clone https://github.com/raullee/open-crate
cd open-crate
corepack pnpm install
corepack pnpm build:core
import { generateSet, planTrackCount, type Track } from "@open-crate/core";

const crate: Track[] = [
  { artist: "Gouryella", title: "Walhalla", key_camelot: "11A", bpm: 137, energy: 4 },
  { artist: "Energy 52", title: "Café Del Mar", key_camelot: "4A", bpm: 137, energy: 5 },
  // ...your collection
];

const { tracks } = planTrackCount(60, 45, 5); // 60-min set, 45s blends, ~5 min/track
const set = generateSet(crate, { count: tracks, mode: "adventurous" });

for (const step of set.steps) {
  console.log(step.track.artist, "-", step.track.title, step.transition?.label ?? "(open)");
}

Bring your own generator

The set-generation algorithm is a strategy you can replace. Implement SetGenerator, register it, select it by id:

import { registerGenerator, generateSet, type SetGenerator } from "@open-crate/core";

const mine: SetGenerator = {
  id: "my-sound",
  label: "My sound",
  generate(pool, opts) {
    // your logic: return ordered steps
    return { generator: "my-sound", steps: /* ... */ [] };
  },
};

registerGenerator(mine);
const set = generateSet(pool, { count: 12, mode: "smooth" }, "my-sound");

The maintainer keeps a personal, heavily-tuned generator private — it's just a SetGenerator that lives outside this repo. The interface is the gift; the tuning is the art. You're encouraged to do the same: fork the default, tune it to your sound, keep it yours or share it back.

API

  • Schema: Track, Keyer, Crate, trackId, isTrack, OCF_VERSION
  • Camelot: parseCamelot, harmonicNeighbours, areCompatible, musicalToCamelot, camelotToMusical, camelotToOpenKey, camelotRank
  • Harmonic: camelotTransition -> { smoothness, tension, semitones, note }
  • Generator: generateSet, registerGenerator, listGenerators, greedyHarmonicGenerator, defaultEnergyArc, types SetGenerator / GenerateOptions / GeneratedSet
  • Adapters: csvAdapter, parseCsv, interfaces ImportAdapter / EnrichmentProvider
  • Crate ops: planTrackCount, setRuntimeMin, mergeTracks, leaderboard, crateStats, recentlyAdded

MIT © open-crate contributors