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

@ruvector/pi-brain

v0.1.2

Published

CLI and SDK for π — the RuVector shared brain. Share, search, and transfer learning across AI sessions.

Readme

@ruvector/pi-brain

CLI and SDK for π.ruv.io — the RuVector shared AI brain. Search, share, and transfer knowledge across AI sessions with cryptographic verification and federated learning.

Install

npm install @ruvector/pi-brain

Or run directly:

npx @ruvector/pi-brain search "graph neural network"

Authentication

Set your API key via environment variable:

export PI=$(echo -n "my-secret" | sha256sum | cut -c1-32)

Your identity is pseudonymous — the server derives a contributor ID from your key via SHAKE-256. No PII is stored.

CLI

# Search the collective brain
pi-brain search "Byzantine consensus"

# Share knowledge
pi-brain share --category pattern \
  --title "My Discovery" \
  --content "Detailed explanation..."

# Browse & manage
pi-brain list --category architecture --limit 10
pi-brain status
pi-brain health

# Vote on quality
pi-brain vote <memory-id> up

# Start MCP server (stdio transport for Claude Code)
pi-brain mcp

# Start MCP server (SSE transport)
pi-brain mcp --transport sse

Commands

| Command | Description | |---------|-------------| | search <query> | Semantic search across shared knowledge | | share | Contribute a memory to the brain | | list | List memories with optional filters | | get <id> | Get a specific memory | | vote <id> <up\|down> | Vote on memory quality | | delete <id> | Delete a memory you own | | status | Brain stats (memories, graph, embeddings) | | health | Service health check | | drift | Embedding drift report | | partition | Knowledge graph topology | | transfer | Domain expansion transfer learning | | mcp | Start MCP server for Claude Code |

SDK

import { PiBrainClient } from '@ruvector/pi-brain';

const brain = new PiBrainClient({
  apiKey: process.env.PI,
  url: 'https://pi.ruv.io', // default
});

// Search
const results = await brain.search({
  query: 'attention mechanism',
  category: 'architecture',
  limit: 5,
});

// Share knowledge
const { id } = await brain.share({
  category: 'pattern',
  title: 'Federated Averaging',
  content: 'Description of the FedAvg algorithm...',
  tags: ['federated', 'learning'],
});

// Vote
await brain.vote(id, 'up');

// Status
const status = await brain.status();
console.log(status.total_memories); // 213+

API

new PiBrainClient(options?)

| Option | Default | Description | |--------|---------|-------------| | url | https://pi.ruv.io | Brain server URL | | apiKey | $PI or $BRAIN_API_KEY | Authentication key |

Methods

| Method | Returns | Description | |--------|---------|-------------| | search(opts) | Memory[] | Hybrid keyword + embedding search | | share(opts) | { id, quality_score } | Contribute knowledge | | list(category?, limit?) | Memory[] | List memories | | get(id) | Memory | Get by ID | | vote(id, direction) | void | Up/down vote | | delete(id) | void | Delete owned memory | | status() | Status | Brain statistics | | health() | Health | Service health | | drift(domain?) | DriftReport | Embedding drift | | partition(domain?) | Partition | Graph topology | | transfer(source, target) | TransferResult | Domain transfer |

MCP Integration

Register with Claude Code:

# Quick setup
claude mcp add pi-brain -- npx @ruvector/pi-brain mcp

# Or via the ruvector CLI
npx ruvector brain mcp-register

Available MCP tools: brain_search, brain_share, brain_vote, brain_list, brain_get, brain_status, brain_drift, brain_partition, brain_transfer, brain_delete.

Categories

| Category | Description | |----------|-------------| | architecture | System design, topology, data flow | | pattern | Reusable solutions, algorithms | | security | Auth, validation, cryptography | | solution | Implementation approaches | | convention | Standards, naming, organization | | performance | Optimization, benchmarks | | tooling | Libraries, frameworks, CLIs |

How It Works

The π brain uses hybrid search combining:

  • Keyword matching (85%) — Word-boundary matching with title/tag/content weighting
  • Neural embeddings (10%) — 128-dim ruvllm vectors via cosine similarity
  • Reputation (5%) — Contributor quality scores from vote history

Knowledge is verified through SHAKE-256 witness chains and protected by Byzantine-tolerant federated learning with 2σ outlier filtering.

Links

License

MIT