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

@pyyupsk/nit

v0.3.0

Published

Lightweight zero-dependency Git hooks manager for JavaScript/Node.js projects

Readme

@pyyupsk/nit

Lightweight, zero-dependency Git hooks manager for JavaScript/Node.js projects.

Configure hooks in package.json — no extra config files, no dependencies.

Features

  • Zero runtime dependencies
  • Config lives in package.json under a "nit" key
  • Auto-installs hooks via the prepare lifecycle script
  • CI-safe check command — exits 1 when hooks are out of sync
  • Staged hooks — run commands only on files that match a glob pattern
  • Works with any package manager (bun, npm, pnpm, yarn)

Installation

bun add -D @pyyupsk/nit

Then add a prepare script so hooks are installed automatically on bun install:

{
  "scripts": {
    "prepare": "nit install"
  }
}

Configuration

Add a "nit" key to your package.json:

{
  "nit": {
    "hooks": {
      "pre-commit": "bun run lint && bun run typecheck",
      "commit-msg": "bun run test"
    }
  }
}

Any valid Git hook name is supported as a key. The value is the shell command to run.

Staged Hooks

Instead of a plain command string, a hook can be defined as a stages object. Each key is a glob pattern and the value is the command to run on the matching staged files. Use {staged_files} as a placeholder — nit replaces it with the list of matched files before running the command.

{
  "nit": {
    "hooks": {
      "pre-commit": {
        "stages": {
          "**/*.{ts,js}": "biome check --write {staged_files}",
          "**/*.css": "stylelint --fix {staged_files}"
        }
      }
    }
  }
}

Stages only run when at least one staged file matches the pattern. If no files match a stage, that stage is skipped entirely. Commands without {staged_files} run as-is (useful for project-wide checks triggered by any staged file).

CLI

nit install          # write hooks to .git/hooks/ (default when run bare)
nit sync             # alias for install
nit check            # exit 1 if installed hooks differ from config (CI-safe)
nit exec <hook>      # run the staged hook for <hook> against currently staged files

nit install / nit sync

Reads nit.hooks from package.json and writes a shell script for each entry into .git/hooks/. Each hook file is made executable automatically.

$ nit install
nit: installed pre-commit, commit-msg

nit check

Compares the installed hook files against the current config without writing anything. Exits with code 1 if any hook is missing or has a different command — useful in CI to enforce that hooks are committed.

$ nit check
nit: hooks are up to date

nit exec <hook>

Runs a staged hook by name against the currently staged files. This is the command that the generated hook script calls internally — you rarely need to run it directly.

nit exec pre-commit

Self-hosting Example

nit manages its own hooks:

{
  "nit": {
    "hooks": {
      "pre-commit": {
        "stages": {
          "**/*.{ts,json}": "biome check --write {staged_files}"
        }
      },
      "pre-push": "bun typecheck && bun test && bun run build"
    }
  }
}

License

MIT