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

pumice-cli

v0.0.7

Published

Worktree-scoped service guards for finite commands

Readme

Pumice

Pumice keeps worktree-scoped development services alive while a finite command uses them. One daemon directly owns the service process groups. A ServiceGuard connection owns the references acquired through it, and closing that connection releases them atomically.

Both resources surrounding a run are async-disposable:

import { ServiceGuard, startCommand } from "pumice-cli/core";

await using guard = await ServiceGuard.connect(process.cwd());
await guard.run({
  services: [
    {
      name: "database",
      command: "database --port 5432",
      healthcheck: "database-ready --port 5432",
    },
  ],
});

await using command = startCommand("pnpm test");
const outcome = await Promise.race([
  command.exited,
  guard.failure.then((error) => {
    throw error;
  }),
]);

run() provides the complete policy: it waits for service readiness, starts the command, terminates the command's process group if a required service dies, waits for that group to exit, and finally releases the guard.

import { run } from "pumice-cli/core";

const result = await run(
  process.cwd(),
  { services: [{ name: "database", command: "database", healthcheck: "database-ready" }] },
  { command: "pnpm test" },
);

Services with the same name and definition share one generation. Acquiring an active name with a different definition fails. Unexpected service exits and daemon disconnects are terminal for every affected guard. There is no automatic restart policy.

Vite Task integration

definePumice() compiles a service chain and finite command into an immutable, content-addressed manifest. The returned task runs the Node wrapper shipped in this package, so there is no separate Pumice task executable to install:

import { definePumice } from "pumice-cli";

const pumice = definePumice({
  ports: ["DATABASE_PORT"],
  services: {
    db: {
      command: "pglite-server --port $DATABASE_PORT",
      healthcheck: "pg_isready --port $DATABASE_PORT",
    },
  },
});

const db = pumice.service("db");

export default defineConfig({
  run: {
    tasks: {
      migrate: db.task({ command: "pnpm drizzle-kit migrate" }),
      ...pumice.viteServices,
    },
  },
});

pumice.viteServices adds one non-cached Vite task for each registered service. Running vp run db, for example, starts db and its dependencies, waits until they are healthy, and holds their leases until the task is stopped. The map is resolved when it is read, so services added through nested handles are included.

Nested handles compose dependencies. In this example, api.task() starts and health-checks db, then api, before it starts the finite command:

const api = db.service({
  name: "api",
  command: "node apps/api/server.mjs --port $API_PORT",
  healthcheck: "curl -f http://127.0.0.1:$API_PORT/health",
  ports: ["API_PORT"],
});

Generated manifests live under node_modules/.cache/pumice/manifests/<sha256>.json. Equivalent plans reuse the same file, while any plan change produces a new path. The generated Vite Task definition defaults to cache: false; extra arguments passed by Vite Task are forwarded to the real command as distinct argv values.

Each wrapper owns one service lease. Strictly sequential Vite Task nodes can therefore stop and restart a service between nodes when no other wrapper holds a reference. A run-level lease spanning multiple task nodes is outside v1.

Pumice currently uses POSIX process groups for descendant cleanup. On Windows, termination is limited to the direct child until Job Object containment is implemented.

Development

The project uses the Vite+ TypeScript library structure:

vp install
vp check
vp test
vp pack

vp pack emits the library, generated declarations, source maps, and the pumice-daemon executable into dist/.

Pre-commit checks are installed by vp config --no-agent. The committed .vite-hooks/pre-commit hook runs vp staged, which applies vp check --fix to staged files using vite.config.ts.

Publishing

Pumice uses stable releases. Do not create a prerelease version or tag unless a prerelease is explicitly requested.

Update the version in package.json, commit it, then create and push the matching v<version> tag:

git tag -s v0.0.7 -m "Release 0.0.7"
git push origin v0.0.7

The Release workflow checks, tests, and packs the tagged source, then waits for approval from the GitHub npm environment before publishing with provenance and creating the GitHub release.