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

@gblp/chords-db

v1.0.0

Published

Instrument Chords Database

Readme

chords-db

Deploy to GitHub Pages

This is a javascript database of string instruments chords. Open, free to use, easily improved with more chords. Contributions are welcomed, still a lot of chords (and instruments) missing. Use the pull request feature of Github to add your desired chords if you want to contribute.

Live demo

Browse the chord diagrams interactively:

https://elparaquecosadeque.github.io/chords-db/

Guitar, ukulele, and piano — pick a key and explore every chord position.

Install

npm install @gblp/chords-db

Usage

import { guitar, ukulele, piano, instruments } from '@gblp/chords-db';

// all chord positions for C major on guitar
const cMajor = guitar.chords.C.find(c => c.suffix === 'major');
console.log(cMajor.positions);

// instrument metadata
console.log(guitar.main);    // { strings: 6, fretsOnChord: 4, name: 'guitar' }
console.log(guitar.keys);    // ['C', 'C#', 'D', ...]
console.log(guitar.suffixes); // ['major', 'minor', ...]

// instruments summary (chord counts)
console.log(instruments); // { guitar: { ... }, ukulele: { ... }, piano: { ... } }

You can also import the JSON files directly:

import guitar from '@gblp/chords-db/lib/guitar.json' with { type: 'json' };

For example, let's take a look at the Dsus2 chords of guitar. We can see this information in the D/sus2.js file:

export default {
  key: 'D',
  suffix: 'sus2',
  positions: [{
    frets: '0320xx',
    fingers: '031000'
  },
  {
    frets: '55775x',
    fingers: '114310',
    barres: 5,
    capo: true
  }]
}

Each position define a new chord variation of the Dsus2 chord. We must define the frets needed to obtain the chord in the respective strings. We can define too the fingers information for easy reading of the chord. If the chord need to barre some string, we will define if in the barre field. If you want the barre be represented with capo, you can define the "capo" property too.

How to build/contribute

This project uses npm as package manager. Three basic commands

npm run build

Generates a new version of the library when new chords are added.

npm test

Make some testing of the new added chords. Very useful to detect basic mistakes.

How to use

All this information is packed in a JSON library, that you can use to render visually with a utility able to parse this information.

The chords-ui/ directory in this repo is an Angular 22 app that renders interactive chord diagrams — it's what powers the live demo above.

To run it locally:

cd chords-ui
npm install
npm start