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

kraal

v0.47.0

Published

A sandboxing tool built on haberdash.

Readme

Kraal

Kraal is a sandboxing tool built on haberdash. It runs project commands inside an isolated Docker container, composing AbstractCommand and AbstractServiceFactory from haberdash to provide a standalone CLI.

Getting started

Run npx kraal generate-project in your project root to create a kraal.js config file:

export default {
    sandbox: {
        provider: 'docker',
        name: 'my-project-kraal-sandbox',

        // Env vars passed into the sandbox container.
        env: {},

        // Shell script run as root (sh -e) at image build time, after the
        // kraal user exists — add the tools your sandboxed commands need.
        install: ``
    }
};

The sandbox image is generated in memory from this config — no Dockerfile is written to your project. Editing install triggers a rebuild (and container recreation) on the next start-sandbox; named volumes survive, so installed node_modules carry over.

Custom commands

Define named commands under sandbox.commands to expose them as first-class kraal subcommands. Each value is a shell string run inside the sandbox:

export default {
    sandbox: {
        commands: {
            'run-afk-claude': 'claude --dangerously-skip-permissions --model opus'
        }
    }
};

kraal run-afk-claude then runs that string in the sandbox (interactively), and it appears in kraal list-commands and kraal run-afk-claude --help. Names that collide with a built-in command are skipped with a warning.

Commands

  • generate-project — creates kraal.js (only available outside a project)
  • list-commands — lists the available commands (the default when none is given)
  • start-sandbox — builds the sandbox image (cached no-op when unchanged) and starts the container
  • stop-sandbox — stops the container
  • remove-sandbox — removes the container and its named volumes
  • run-in-sandbox [command] — runs a command (default bash) inside the sandbox
  • any command defined under sandbox.commands in kraal.js (see Custom commands)

Worktrees

Every kraal command adapts to the worktree it is invoked from. Run from the primary checkout, commands target the base container (sandbox.name); run from a linked worktree checked out on branch foo, they target <sandbox.name>--foo (branch names are sanitized [^a-zA-Z0-9_.-]-). All containers share one image.

Worktrees are created and removed with standard git worktree — kraal never creates or manages them, and remove-sandbox removes only the container and its named volumes.

Migrating from --branch

Earlier versions created worktrees under node_modules/.kraal/worktrees via the removed --branch param. These are now orphaned — clean them up with git worktree remove <path> && git worktree prune.