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

@bancada/inventory

v0.1.2

Published

Inventory plugin for bancada: what you own, how much, and what each lesson consumes

Readme

@bancada/inventory

Inventory plugin for bancada: a stock of things you own, and what each lesson consumes from it.

Why it is not about electronics

Take the subject away and everything here still stands. "What do I have, how much, what does this lesson need, can I build it" reads the same for filament, lumber, a paid tool subscription and a resistor.

So an item is an id, a name, a quantity and whether it is usable. Anything a subject adds — a resistor's voltage, a filament's nozzle temperature — rides along in extra, untouched, and is read by the plugin that understands it.

Putting voltage in this type would make every 3D printing repository carry a field about electricity.

What it does

  • Parts card on each lesson, naming what it uses and how many
  • an inventory page listing the stock, with the lessons each item appears in
  • checks for the repository gate: enough stock, nothing blocked, and a warning for consumables running out

A blocked item is one you own but cannot use yet — a board that came without soldered headers, say. It fails the check loudly, because a lesson that depends on it is a lesson you cannot do.

Requirements

bun 1.3 or newer, and bancada as its host. The package ships TypeScript with no build step and reads files through Bun.file.

Install

bun add @bancada/inventory
{
  "plugins": [
    {
      "name": "inventory",
      "script": "@bancada/inventory",
      "config": { "file": "inventory.yml", "label": "Parts", "route": "/inventory" }
    }
  ]
}

| setting | default | what it is | |---|---|---| | file | inventory.yml | the stock, relative to the repository root | | label | Parts | the card and menu title | | route | /inventory | where the inventory page lives | | key | componentes | the frontmatter key a lesson lists its uses under | | columns | [] | extra table columns, each reading one key out of extra | | labels | English | every string the page puts on screen |

The file is loaded once at startup. A missing one stops the server rather than becoming an empty inventory — an empty one makes every "you do not own this" finding true and useless.

Your own columns

The stock table shows item, quantity and where each one is used. Anything else is your subject's, so you name it:

"columns": [{ "key": "voltage", "label": "Voltage" }]

Each key is read out of the item's extra, in order, between quantity and the used-in column. An item without that field gets a dash.

Another language

Every visible string has a key, and overriding one leaves the rest in English:

"labels": { "item": "Peça", "qty": "Qtd", "usedIn": "Usado em" }

| key | default | |---|---| | item | Item | | qty | Qty | | usedIn | Used in | | blocked | blocked | | runningLow | Running low | | source | Source of truth | | hint | the sentence under the title |

The file

items:
  - id: red-led
    name: Red LED 5mm
    qty: 5
    consumable: true
    voltage: 3v3      # not ours; kept in `extra`

For another plugin

Read what this one resolved instead of parsing the file again:

onLesson(lesson) {
  const uses = lesson.items;   // [{ id, qty, item }]
}

Declare inventory before your plugin in the config — the order is what makes the data be there.

License

MIT.