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

@brianluby/agent-brain

v1.1.2

Published

Give Claude Code photographic memory in ONE portable file

Downloads

27

Readme

Give your agents photographic memory.

License: MIT

Install in 30 seconds · How it Works · Commands ·

Memvid Shoutout

Memvid's creative approach to data storage—encoding text in video frames and using decades of video codec R&D for superior compression—inspired me to fork their Claude Brain project into an agent-agnostic version. None of this would be possible without their dedication to open source. If you're working on AI memory, check them out at github.com/memvid —it's seriously clever engineering.

The Problem

You: "Remember that auth bug we fixed?"
Agent 1: "I don't have memory of previous conversations."
Agent 2: "I did not work on this code yesterday.
You: "We spent 3 hours on it yesterday"
Agent 1: "I'd be happy to help debug from scratch!"
Agent 2: "Let me review the codebase to get an understanding" *sound of tokens burning*

small context window. Zero memory between sessions.

You're paying for a dory with a PhD.

The Fix

You: "What did we decide about auth?"
Agent 1: "We chose JWT over sessions for your microservices.
        The refresh token issue - here's exactly what we fixed..."
Agent 2: " JWT overs sessions is a more secure implementation, Here is the code we fixed"

One file. All your agents remember everything.

Installation

Claude Code (Marketplace)

# Optional one-time setup (if GitHub plugin URLs fail)
git config --global url."https://github.com/".insteadOf "[email protected]:"
# In Claude Code
/plugin add marketplace brianluby/Agent-brain

Then in Claude Code:

  1. Open /plugins
  2. Go to Installed
  3. Enable mind
  4. Restart Claude Code

On first run, memory is created at:

.agent-brain/mind.mv2

If you already have a legacy file at .claude/mind.mv2, migrate it safely to .agent-brain/mind.mv2:

if [ ! -f ".agent-brain/mind.mv2" ]; then
  mkdir -p ".agent-brain" && mv ".claude/mind.mv2" ".agent-brain/mind.mv2"
else
  echo "Destination .agent-brain/mind.mv2 already exists. Back up both .claude/mind.mv2 and .agent-brain/mind.mv2, then reconcile manually."
fi

OpenCode

Add this plugin package to your OpenCode config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@brianluby/agent-brain"]
}

Or use a local checkout while developing:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["file:///absolute/path/to/agent-brain"]
}

Then restart OpenCode. The plugin will:

  • inject memory context on the first message of each session
  • capture tool outputs to persistent memory
  • expose a mind tool (search, ask, recent, stats, remember)

Optional: install OpenCode slash commands globally for all projects:

mkdir -p ~/.config/opencode/commands
cp .opencode/commands/mind-*.md ~/.config/opencode/commands/

Project-local command files are already included in .opencode/commands/.

How it Works

After install, Your Agent's memory lives in one file:

your-project/
└── .agent-brain/
    └── mind.mv2   # Agent's brain. That's it.

No database. No cloud. No API keys.

What gets captured:

  • Session context, decisions, bugs, solutions
  • Auto-injected at session start
  • Searchable anytime

Why one file?

  • git commit → version control Agent's brain
  • scp → transfer anywhere
  • Send to teammate → instant onboarding

Commands

In Claude Code:

/mind stats                       # memory statistics
/mind search "authentication"     # find past context
/mind ask "why did we choose X?"  # ask your memory
/mind recent                      # what happened lately

In OpenCode (slash commands):

/mind-stats
/mind-search authentication
/mind-ask "why did we choose X?"
/mind-recent
/mind-remember "Project uses pnpm, not npm"

These are provided in .opencode/commands/ for project-local usage. To use them in every repo, copy them to ~/.config/opencode/commands/.

Or just ask naturally: "mind stats", "search my memory for auth bugs", etc.

OpenCode Support

Agent Brain supports the same core memory lifecycle through a platform adapter model.

  • Claude and OpenCode sessions can share project memory continuity.
  • Unknown or incompatible platforms fail open (session continues, memory capture safely skips).
  • Adapter contracts are SemVer-checked and validated through regression and contract tests.
  • OpenCode packaging is published through the npm package @brianluby/agent-brain.

CLI (Optional)

No separate CLI install is required. Use the built-in memory commands in Claude Code (/mind ...) or OpenCode (/mind-* ...) for direct access.

FAQ

Empty: ~70KB. Grows ~1KB per memory. A year of use stays under 5MB.

100% local. Nothing leaves your machine. Ever.

Sub-millisecond. Native Rust core. Searches 10K+ memories in <1ms.

rm .agent-brain/mind.mv2


Built as a local-first, single-file memory plugin for Claude Code and OpenCode.

If this saved you time, star the repo

Send me your .mv2 file and I'll tell you what's wrong with your code. No context needed - I already know everything.