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 🙏

© 2025 – Pkg Stats / Ryan Hefner

djesbe

v0.3.0

Published

A terminal based audio player

Downloads

12

Readme

djesbe

Terminal based audio player for Node.js. Written to solve my very specific problem: how to DJ my own party maintaining an easy to view record of all the songs I had already played.

App

Terminal interface of the app

dj [path/to/playlists] loads djesbe as a terminal app. Path can be left blank to scan the current directory.

The top left pane is a list of m3u8 files that the app found and parsed. The lower left pane is a list of tracks in the selected playlist. The right pane is the actual queue of tracks to play. As tracks get enqueued, they are grayed out from the track pane (though they are still playable).

From anywhere

  • tab toggles focus between the queue and the selection panes
  • space starts and stops the current track in the queue
  • shift-right and shift-left skip forward and backward in the queue

From the playlist pane (app starts with it focused)

  • enter selects a playlist and expands the track pane
  • a marks a playlist as "autoplay." The jukebox will pull from this list if the queue runs dry
  • e enqueues all tracks at once, ignoring those already queued up. shift-e enqueues everything without checking

From the track pane

  • enter enqueues a track
  • escape shrinks the pane and returns focus to the playlist pane
  • e and shift-e, as above

From the queue

  • enter skips directly to the selected track and plays it
  • delete and backspace removes that track from the queue

Library

If this module is required from within node, it will just expose Jukebox and Track. Most of the async flow is controlled (poorly, at the moment) by promises.

Jukebox.load(directory) parsed all of the m3u8 files in the specified directory, turning them into arrays of Tracks. It returns a promise.

Track.unique is a constructor that memoizes tracks by filename, so that multiple playlists can load duplicates of the same file without generating multiple copies of it in memory.

A Track is responsible for playing itself with the play, stop, and isPlaying methods.

A Jukebox loads the playlists, maintains the queue of tracks to play, and keeps the queue playing tunes. It has enqueue, play, and stop methods that each take a Track object as their only argument; they also handle the callbacks that enable the next track in the queue to autoplay. The unqueue method is tricky because even though it should accept a Track, it accepts an index instead (the queue must be able to contain duplicate tracks, so it need to know which index is being removed from the queue). Jukebox.advance takes an integer, positive or negative, and skips that many tracks ahead or behind in the queue.

To do

  1. The queue needs its own model to move logic out of Jukebox
  2. AAC support
  3. "undo" levels (maybe just 1)
  4. websocket interface?

Bites

Currently supports only mp3 and ogg files. (It will filter out extensions that it does not support.)

Some of the architecture has come from poring over the Decibel project for insights.

A few alterations were made to Blessed as well, to accomodate how I preferred to use list boxes.

I meant to type "Notes" for this section but my right hand was off a letter.