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

@thomas-labs/ai-rules

v1.3.0

Published

Shared AI coding-agent rules sync (Claude Code, Codex CLI, Gemini CLI, DeepSeek Harness, Cursor) — npm wrapper around the ai-rules Go CLI; postinstall downloads the matching prebuilt binary from GitHub Releases.

Readme

ai-rules (npm)

This is a thin npm wrapper, not a reimplementation. npm install/pnpm add runs scripts/postinstall.js, which downloads the real Go binary for your platform (darwin/linux, amd64/arm64) from this project's GitHub Releases and drops it at bin/ai-rules-bin; bin/ai-rules.js just execs it with your args.

See the main README for what ai-rules actually does and how to use it — this file only covers npm-specific install mechanics.

Install

npm install -g @thomas-labs/ai-rules
# or: pnpm add -g @thomas-labs/ai-rules

The source repo is private, so the postinstall download needs a GitHub token — resolved the same way the CLI's own --token flag is: checks $GITHUB_TOKEN, then $GH_TOKEN, then gh auth token. If none of those resolve to a token with read access to Thomas-xDo/ai-rules, install fails with a clear error rather than silently producing a broken ai-rules command.

pnpm-specific gotchas

Both of these are pnpm's own default behavior (not specific to ai-rules), but they've actually bitten a real install, so noting them here rather than making you rediscover them:

  • "minimum release age" guard: recent pnpm (11.x) refuses to install a package published too recently, as a supply-chain-attack mitigation. If pnpm add -g @thomas-labs/ai-rules fails right after a fresh publish (possibly with a confusing internal error instead of a clean message), add --config.minimum-release-age=0.
  • postinstall scripts are blocked by default: pnpm won't run a package's install/postinstall scripts unless approved, so the binary download may silently not happen even though pnpm add reports success. Run pnpm approve-builds (interactive) and select @thomas-labs/ai-rules, or pnpm approve-builds @thomas-labs/ai-rules if it's already listed as pending. If you already declined once (or hit Enter through an empty prompt), it gets recorded as denied in pnpm-workspace.yaml under the global install dir (~/Library/pnpm/global/v11/<hash>/pnpm-workspace.yaml on macOS) as allowBuilds: { '@thomas-labs/ai-rules': false } — flip that to true and run pnpm rebuild @thomas-labs/ai-rules (or, if that still doesn't trigger it, node node_modules/@thomas-labs/ai-rules/scripts/postinstall.js directly from that same dir) to actually fetch the binary.
  • Plain npm install -g doesn't have either of these gates.

Why not a "real" npm package

ai-rules is a Go CLI; there's no Node code to actually publish. This wrapper exists purely so npm i -g @thomas-labs/ai-rules is a valid install path alongside gh release download and building from source — the version published here always tracks the matching Go binary release 1:1 (CI sets this package's version to the git tag before npm publish, see .github/workflows/release.yml).