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

mixxx-smart-crates

v1.0.1

Published

automatically populate mixxx crates by quering the library

Readme

MIXXX Smart Crates

A command line utility to create mixxx crates by filtering the library.

Installation

npm install -g mixxx-smart-crates

might require sudo privileges

Usage

mixxx-smart-crates -h | --help

mixxx-smart-crates [-v | -V] [--db MIXXXDB] -q QUERY

mixxx-smart-crates [-v | -V] [--dry] [--db MIXXXDB] [DIR]

Options

  • -h, --help Show this help message
  • --db MIXXXDB Path to Mixxx SQLite database (default: $HOME/.mixxx/mixxxdb.sqlite)
  • -q QUERY Run a query against the track library.
  • -q @FILE Same as -q, but query is read from FILE. @- reads from STDIN
  • -v Verbose
  • -V Debug and verbose
  • --dry Dry run: don't write crates to MIXXXDB (only for directory mode)

Directory Mode

If no -q is provided, DIR is scanned for .crate files (default: current directory).

Each .crate file must contain a valid QUERY.

Crate name corresponds to filename wihtout extension.

Query syntax

A formal definition can be found in dsl.ebnf.

The base unit is a predicate in the form property operation value, for example:

artist = "Mauro Brianza"

all tracks of Mauro Brianza

Values can be numbers literals (0, 3.14) or strings ("Mauro", 'Brianza').

Quotes around strings can be omitted in absence of spaces: artist ?= Senisa.

Any predicate can be negated with !( predicate ) or ~( predicate ), for example:

!(artist = "Mauro Brianza")

all tracks except those of Mauro Brianza

Different predicates can be combined in AND (,, &, &&) or OR (;, |, ||) logic.

AND has association precedence over OR (as expected):

artist = "Mauro Brianza",
genre = "Tech House";

artist = "Senisa";

all Tech House tracks of Mauro brianza and all track of Senisa

Parentesis alter the order of association:

artist = "Mauro Brianza",
(genre = "Tech House"; genre = "Garage"),

all tracks of Mauro Brianza, but only if Tech House or Garage

Mixing separators is allowed, even inside the same combination (altough discouraged):

artist = "Mauro Brianza" & genre = "Tech House", bpm >= 128

all Tech House tracks of Mauro Brianza with bpm from 128 upwards

Example:

!(location ? Recordings) & (
    genre ? "Tech House",
    bpm >= 126, bpm <= 132
    $hotcues > 0,
    $playlists = 0,
)

exclude tracks in recordings. Then, take all Tech House tracks with bpm between 126 and 132 (both included), with at least one cue set and not used in other playlists.

Operations (Predicates)

String operations have both case-insensitive and case-sensitive variants.

Number operations will try to parse the string value. If unable, the predicate will evaluate to false.

Equality and inequality operations treat numbers as strings.

Equality (=, ==, ===)

artist = mauro; artist == mauro

Property must exactly match value:

  • "mauro"
  • "Mauro" (case insensitive)
  • × "Mauro Brianza"
artist === mauro
  • "mauro"
  • × "Mauro" (case sensitive)

Inequality (!=, <>, !==)

Shortcut for !(a = b).

artist != mauro; artist <> mauro

Property must differ from value:

  • "Senisa"
  • "Mauro Brianza"
  • × "Mauro"
artist !== mauro
  • "Mauro" (case sensitive)
  • × "mauro" (matches)

Includes, Contains (?, ?=)

artist ? mauro;

Property must contain value:

  • "mauro"
  • "Mauro Brianza" (case insensitive)
  • × "Senisa"
artist ?= mauro
  • "mauro Brianza"
  • × "Mauro Brianza" (case sensitive)

Excludes (!?, !?=)

Shortcut for !(a ? b).

artist !? mauro;

Property must not contain value:

  • "Senisa"
  • "Mauro Brianza"
  • × "Mauro"
artist !== mauro
  • "Mauro" (case sensitive)
  • × "mauro" (matches)

Regex (/=, /==)

genre /= "(Deep )?Tech House";

Property must match regex:

  • "deep tech house" (case insensitive)
  • "tech house"
  • × "deep house"
genre /== "(Deep )?Tech House";
  • "Deep Tech House"
  • × "deep tech house" (case sensitive)

Greater than (or equal to) (>, >=)

bpm > 130
  • × 128
  • × 130
  • 174
bpm >= 130
  • × 128
  • 130
  • 174

Less than (or equal to) (<, <=)

bpm < 130
  • 128
  • × 130
  • × 174
bpm <= 130
  • 128
  • 130
  • × 174

Properties

Propeties map directly to mixxx db model, table library:

  • artist
  • title
  • album
  • year
  • genre
  • tracknumber
  • location
  • comment
  • url
  • duration
  • bitrate
  • samplerate
  • cuepoint
  • bpm
  • channels
  • key
  • rating
  • datetime_added
  • timesplayed
  • mixxx_deleted
  • filetype

It also provides this custom properties:

  • $hotcues: number of memory cues set on a track
  • $playlists: number of playlists featuring a track
  • $age: how old is the track in year (if year field is filled)