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

brandrail

v0.10.3

Published

Keep AI-generated UI on-brand: an MCP server and CLI that give Claude Code, Cursor, Copilot and Codex your design system, and check code and live pages against it.

Downloads

2,967

Readme

brandrail

Keep AI-generated UI on-brand. brandrail checks code and live pages against your design system (Brand Kit), and writes your rules into the files AI coding tools read.

npx brandrail init            # brandrail.config.json, src/brandrail.tokens.css + AGENTS.md, CLAUDE.md, Cursor/Copilot/Windsurf/Gemini rules
npx brandrail check           # violations + brand score for this repo
npx brandrail scan <url>      # check a running page in a real browser

With a Brandrail account

npx brandrail connect                     # sign in through the browser; sets up the Brand Kit, AI rule files,
                                          # the MCP server for Claude Code / Cursor / Copilot, and the UI kit
npx brandrail check --changed --upload    # only changed lines, results in the dashboard

connect makes an API key on your machine and saves it in ~/.config/brandrail/credentials.json (mode 600); Brandrail only ever receives its hash, and the files it writes into the repo hold no key. AI tools start npx brandrail mcp, which checks code on your machine: code is never uploaded. In CI, set BRANDRAIL_KEY instead.

MCP server

brandrail mcp is an MCP server for Claude Code, Cursor, Copilot, Codex, Windsurf and any other MCP client. It runs on your machine over stdio; code is checked locally and never uploaded. It works without an account, using starter tokens; connect an account (or set BRANDRAIL_KEY) to use your own Brand Kit.

{
  "mcpServers": {
    "brandrail": { "command": "npx", "args": ["-y", "brandrail", "mcp"] }
  }
}

npx brandrail connect writes this config for you, plus the rule files each AI tool reads.

| Tool | What it does | | --- | --- | | get_guidelines | The project's design system rules: components to use in its framework, allowed tokens, what the checker enforces. Called once before writing UI. | | get_design_tokens | Every colour, spacing, radius and type token with the CSS variable to use. | | find_component | Finds the component for a need ("date picker", "primary action") with its import, rules and an example. | | get_component_docs | Full docs for one component in the project's framework: import or tag, props, rules, example. | | get_template | A whole page (list, detail, form, settings, dashboard, sign-in) built from your components, with the files to create and the page's rules. | | get_migration_map | What replaces each piece of Material, MUI, Bootstrap, Ant, Chakra or PrimeNG. | | validate_snippet | Runs the checker on generated code and returns a brand score and each fix. |

All tools are read-only. Docs: https://www.brandrail.com.au/docs/connect

Commands

| Command | | | --- | --- | | check [paths] | --format pretty\|json\|markdown\|github, --fail-below 80, --changed [base], --upload | | scan <url> | --pages 3, --storage-state auth.json (pages behind a login), --wait 2000, --upload. Needs npm i -D playwright && npx playwright install chromium | | init | --from-api, --mcp, --tokens-css <file>, --no-rules, --force. Writes the Brand Kit as CSS variables; import that file once at your app entry | | import <tokens.json> | DTCG, Tokens Studio or Figma variables JSON into the config. --replace, --primitives | | rules | List the rules | | connect | --no-browser, --no-install, --remote (hosted MCP server), --framework, --force (sign in again) | | mcp | The MCP server over stdio, for AI tools. --framework, --report (send scores, never code) | | migrate [paths] | What's left on the way to the design system: other UI libraries (Material, MUI, Bootstrap, Ant Design, Chakra, PrimeNG) per library and per file. --json, --top 30, --upload | | report | A shareable HTML handover report (paths and counts, never code). --out file.html | | whoami, logout | Show or remove the saved sign-in |

Nothing is uploaded unless you pass --upload, and code snippets are never uploaded.

Licence

MIT. The Brandrail web app and dashboard are a separate, paid service: https://www.brandrail.com.au/pricing