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

@brain_ai/claude-darwin-arm64

v1.2.0

Published

Deterministic rule engine: materializes per-session context and guards tool calls.

Readme

brain

brain governs how an AI coding assistant works. For the current project and machine it assembles the rules the assistant should follow, delivers them throughout the session, and enforces the non-negotiable ones on every tool call — deterministically, without relying on the assistant to remember them. It currently targets Claude Code and GitHub Copilot CLI.

The rules themselves are authored separately and are not part of this repository.

Installation

brain is distributed as a plugin, one per harness it targets. Each plugin brings its own runtime, so you do not need Bun or jq installed. Follow the guide for your harness:

With the plugin installed, brain runs on its own; you supply the rules by authoring layers. See Create a layer and the reference, or follow the tutorial for your harness to build one end to end.

Documentation

The full documentation set is published at https://man.sr.ht/~cpradog/brain:

  • Documentation home — overview and map of the docs.
  • Tutorials — author your first layer and watch it materialize.
  • How-to guides — task recipes for installing brain, authoring rules, and working on brain itself.
  • Reference — the layer, rule, topic, and predicate format, the brain command, and the plugin and guard contracts.
  • Explanation — how brain works and why it is built this way.

Development

Working on brain from source requires Bun (1.3.x, pinned in dependencies.pin) and jq. End users need neither — the published plugin brings its own runtime. For the format, typecheck, and test commands see Check a change to brain; to have a harness run your working copy, see the guide for Claude Code or GitHub Copilot CLI.

Contributing

Development happens over email on the sr.ht mailing list. Patches are sent with git send-email; you do not need a sr.ht account to contribute.

  1. Clone the repository:

    git clone https://git.sr.ht/~cpradog/brain
    cd brain
  2. Make your change on a local branch, keeping commits focused. Commit messages follow Conventional Commits (feat:, fix:, docs:, …), matching the existing history.

  3. Before sending, make sure bun run format:check, bun run typecheck and bun run test pass.

  4. Send the patch to the list. The list is shared across projects, so set a subject prefix once:

    git config sendemail.to '~cpradog/[email protected]'
    git config format.subjectPrefix 'PATCH brain'
    git send-email -1            # the last commit
    # for a series, send a range, e.g.:
    git send-email <base>..HEAD

If you have not used git send-email before, https://git-send-email.io walks through the one-time setup.

Bug reports

File bugs and feature requests on the issue tracker: https://todo.sr.ht/~cpradog/brain, or by email to ~cpradog/[email protected].

Please include:

  • what you did, what you expected, and what happened instead;
  • the harness you run brain in, and the brain version it reports — /brain:doctor in Claude Code, brain doctor in Copilot CLI;
  • your operating system and architecture;
  • any relevant hook or materializer output.

Resources

License

brain is licensed under the European Union Public Licence v1.2 (EUPL-1.2). See LICENSE for the full text. Contributions are accepted under the same licence.