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

ruleprint

v0.1.0

Published

Command-line interface: init, scan, serve and build a rule book from a repository.

Downloads

143

Readme

RulePrint

A browsable book of business rules, generated from the code your team already writes. No documentation to maintain. Your only job is to say "yes".

The RulePrint rule book: a searchable list of rules with confidence badges, approval status and tags

RulePrint points at a repository and drafts the rule book for you:

  • Tests become rules. A vitest or jest tree like describe('shipping') › it('is free above 300 in the Southeast') becomes a rule with a link to the test.
  • People can promote and annotate. A markdown file in .ruleprint/rules/ makes a rule official; a // @rule RP-… comment links code to it.
  • Code can be read too (experimental). With a glossary of your domain terms, RulePrint infers rules from conditionals.
  • Approval is the only human work. Approvals live in ruleprint.lock, and CI fails when a rule changes without a new "yes".

Quick start

Requires Node 20.19+. Nothing to install globally:

cd your-project
npx ruleprint init              # scans the repository, writes ruleprint.json
npx ruleprint serve             # browse the rule book at http://localhost:4141
npx ruleprint approve --all     # approve what you see; writes ruleprint.lock
npx ruleprint check             # in CI: exit 1 when rules changed without approval

Commit ruleprint.json and ruleprint.lock so the rule book travels with the code. To pin a version for the whole team, add it as a dev dependency: npm install --save-dev ruleprint.

Confidence levels

| Level | Where it comes from | In the book | | ---------- | ------------------------------------------ | ---------------------------------------- | | declared | written by a person in .ruleprint/rules/ | green badge, the official rule | | derived | inferred from an automated test | blue badge, links to the test and status | | inferred | inferred from the code's conditionals | grey badge, "not verified", to review |

Commands

| Command | What it does | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | ruleprint init [dir] | scans, writes ruleprint.json, prints the next steps | | ruleprint scan [dir] [--out file] [--json] | the same scan for CI; --json prints a machine-readable summary | | ruleprint serve [dir] [--port 4141] [--no-watch] | serves the UI; rescans and reloads the browser on every change | | ruleprint build [dir] [--out ruleprint-site] | writes UI + ruleprint.json as a static site | | ruleprint check [dir] [--json] | compares the scan with ruleprint.lock; exit 1 on added, changed, renamed or removed rules; lists orphans | | ruleprint approve [dir] [ids...] [--all] [--by who] | approves changes (interactive in a terminal), writes ruleprint.lock, refreshes ruleprint.json | | ruleprint promote <id> [-C dir] | writes .ruleprint/rules/<slug>.md so the rule becomes declared on the next scan | | ruleprint describe <id> [text] [--from-file f] [-C dir] | writes the description into that markdown file (creates it when the rule is not declared yet) | | ruleprint pr [-C dir] [--dry-run] [--no-push] [--no-fail-on-changes] [--limit n] | GitHub Action: comments on the pull request and approves rules from ticked boxes |

Exit codes: 0 ok, 1 (check and pr on a pull request) changes waiting for approval, 2 error. Every command is headless and CI-friendly.

GitHub Action

A bot keeps one comment per pull request with a checkbox per new, changed, renamed or removed rule. Ticking a box approves the rule and commits ruleprint.lock to the branch.

- uses: actions/checkout@v4
- uses: cedric-sd/Ruleprint@v1

Inputs, permissions and limits: GitHub Action.

Learn more

Licensed under Apache-2.0.