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

storyshelf

v0.3.2

Published

StoryShelf CLI: create projects, upload builds, purge, and retry from CI.

Readme

storyshelf

The StoryShelf command-line interface (binary storyshelf): scaffold servers, initialize client config, create projects and CI tokens, upload built Storybooks as builds, purge expired builds, and retry failed builds. It talks to a running StoryShelf server over /api/v1 and has no Playwright or server dependencies, so it installs cleanly in CI.

Install

nub add storyshelf

or

npm install -g storyshelf

Quick start

Initialize client config (requires .storybook/main.*):

storyshelf init --url https://shelf.example.com --slug my-app
# writes .storybook/storyshelf.json

Create a project on the server (requires site-admin token and .storybook/main.*):

storyshelf create --url https://shelf.example.com --name my-app --token $STORYSHELF_ADMIN_TOKEN
# prints slug + CI token and writes .storybook/storyshelf.json

Scaffold a server:

storyshelf server init --dir ./my-shelf

API

Commands

storyshelf init — initialize .storybook/storyshelf.json (client config). Fails if .storybook/main.* not found. Prompts if flags missing.

storyshelf init --url <url> --slug <slug> [--build-dir <dir> --build-command <cmd> --skip <glob> -c <config>]

storyshelf create — create a project and CI token on a server (requires admin token). Fails if .storybook/main.* not found and writes .storybook/storyshelf.json.

storyshelf create --url <url> --name <name> --token <admin-token>
# or env STORYSHELF_ADMIN_TOKEN / ADMIN_TOKEN

storyshelf server init — scaffold a new StoryShelf server project.

storyshelf server init --dir <dir>

storyshelf upload — upload a built Storybook as a build. --url/--slug optional when .storybook/storyshelf.json exists (flags > env > file). --token/--sha/--branch fallback to STORYSHELF_TOKEN/GITHUB_SHA/GITHUB_REF_NAME. Running storyshelf with no args defaults to upload if config exists, else shows help to run init.

storyshelf upload --url <url> --slug <slug> --token <token> \
  --sha <sha> --branch <branch> \
  [--build-dir <dir> --build-command <cmd> --force-build --skip <glob> -c <config>] [--message <msg>] \
  [--author-email <email>] [--author-name <name>]

The default --build-dir is storybook-static or buildDir from .storybook/storyshelf.json (see Configuration). If buildDir is missing/empty, upload runs buildCommand or npm run <buildScriptName>.

storyshelf purge — purge expired builds (requires admin token when auth enabled).

storyshelf purge --url <url> [--token <admin-token>]

storyshelf retry — retry a failed build.

storyshelf retry --url <url> --slug <slug> --build-id <id> [--token <token>]

Example CI snippet

# .github/workflows/visual.yml
on:
  push:
  pull_request:

jobs:
  visual:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: nub install && nub run build
      - run: nubx storybook build -o storybook-static
      - run: nubx storyshelf upload \
          --token "${{ secrets.STORYSHELF_TOKEN }}" \
          --sha "${{ github.sha }}" \
          --branch "${{ github.ref_name }}"
          # --url/--slug from .storybook/storyshelf.json

How it fits in

The server is scaffolded via storyshelf server init, which assembles @storyshelf/core, @storyshelf/db-sqlite, and @storyshelf/storage-local and runs Playwright captures. The CLI never imports that stack — client-only by design.

See docs/architecture.md for the capture workflow and docs/testing.md for the gated browser integration suite.