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

@4meta5/engram

v0.2.2

Published

Cognitive repository for developer memory. Indexes code AND context.

Readme

engram

Memory layer for AI coding agents. Stores context, extracts patterns, generates skills.

npm version License: MIT

# Generate a skill from your Claude Code sessions
npx @4meta5/engram generate-skill --workspace . --output ./skills

What It Does

  • Remembers context: Stores decisions, patterns, and gotchas from coding sessions
  • Extracts patterns: Finds which files change together, common commands, error fixes
  • Generates skills: Creates markdown skills from session history for Claude Code
  • Searches semantically: Hybrid BM25 + vector search with RRF fusion

Packages

| Package | Path | npm | |---------|------|-----| | @4meta5/engram | . | npm | | @4meta5/semantic-memory | packages/semantic-memory | npm | | @4meta5/skill-generator | packages/skill-generator | npm |

Architecture

graph TD
    CLI["@4meta5/engram CLI"] --> SM["@4meta5/semantic-memory"]
    CLI --> SG["@4meta5/skill-generator"]
    SG --> Parsers["Session Parsers"]
    SG --> Extractors["Pattern Extractors"]
    SG --> Generators["Skill Generators"]
    SM --> SQLite["SQLite + FTS5"]
    Parsers --> CC["Claude Code"]
    Parsers --> OC["OpenClaw"]

Quick Start

CLI

# Install globally
npm install -g @4meta5/engram

# Generate a skill from Claude Code history
engram generate-skill --workspace /path/to/project --output ./skills

# Search memories
engram search "authentication flow"

# Add a memory manually
engram add "Use JWT for API auth, refresh tokens stored in httpOnly cookies"

# List recent sessions
engram sessions --days 7

Library

import { createMemoryStore, generateProjectSkill } from '@4meta5/engram';

// Memory storage
const store = createMemoryStore({ dbPath: './memory.db' });
await store.add('JWT tokens for auth', { topics: ['auth'] });
const results = store.searchBM25('authentication');

// Skill generation
const result = await generateProjectSkill('.', './skills', { days: 30 });
console.log(`Generated: ${result.skillPath}`);

CLI Reference

Core Commands (Stable)

| Command | Description | |---------|-------------| | search | Search memories | | add | Add a memory | | stats | Show memory statistics | | ingest-git | Ingest recent git log summaries into memory | | ingest-claude | Import Claude Code sessions | | sessions | List session history (Claude Code by default) | | generate-skill | Generate skill from session history |

Experimental Commands

| Command | Description | |---------|-------------| | summarize | Extract learnings with LLM (requires Claude Code OAuth) | | evaluate-skill | Check if sessions warrant skill generation | | mcp | Start MCP server over stdio | | ingest-openclaw | Import OpenClaw sessions |

Authentication (summarize only)

Both CLI and MCP use Claude Code OAuth credentials:

  • macOS Keychain (Claude Code-credentials service)
  • ~/.claude/.credentials.json (fallback)

If credentials are expired, they are refreshed automatically. If no credentials are found, open Claude Code and sign in.

OpenClaw Support

OpenClaw sessions are off by default. Use --openclaw flag to include:

engram generate-skill --workspace . --openclaw
engram summarize --workspace . --openclaw
engram sessions --source all  # or --source openclaw

Run engram <command> --help for options.

Memory Maintenance

Keep memory current with lightweight, decoupled workflows.

Ingest recent git activity

# Ingest recent commits from the current repo
engram ingest-git --days 30

Ingest multiple repos (helper script)

# From this repo
./scripts/ingest-git-all.sh /path/to/repo1 /path/to/repo2

Daily/Weekly Routine (Low Friction)

Drop this into your project README or team docs to make Engram stick:

### Engram Routine

**Daily (end of session):**
- `engram ingest-git --days 7`
- `engram add "one non-obvious learning" -t gotcha,decision,pattern`

**Before starting a task:**
- `engram search "your keywords"`

**Monthly (per project):**
- `engram generate-skill --workspace . --days 30 --output ./generated-skills`

For automation, use a scheduler (e.g. Heartbeat) to run ingest-git across repos weekly.

MCP Server (Experimental)

Expose Engram as a minimal MCP server over stdio.

engram mcp --workspace .

Available tools:

  • engram.search — BM25 memory search
  • engram.add — add a memory
  • engram.stats — memory stats
  • engram.ingestGit — ingest recent git log summary
  • engram.summarize — summarize recent sessions (requires Claude Code OAuth)

engram.summarize inputs:

  • days (number, default 30)
  • minConfidence (number, default 0.5)
  • includeOpenClaw (boolean, default false)
  • openclawAgent (string, optional)

Optional error wrapper (for clients that prefer tool errors in result):

engram mcp --workspace . --wrap-errors

Without --wrap-errors, tool failures return { error, message } in the tool result.

Smoke test:

node ./scripts/mcp-smoke.js

Example MCP client config (stdio):

{
  "command": "node",
  "args": ["/absolute/path/to/engram/dist/cli.js", "mcp", "--workspace", "/path/to/project"]
}

Plan + rationale: docs/MCP_PLAN.md

Features

Semantic Memory (@4meta5/semantic-memory)

  • BM25 full-text search with SQLite FTS5
  • Optional vector search with embedding providers
  • RRF fusion for hybrid ranking
  • Pluggable storage backends

Skill Generator (@4meta5/skill-generator)

  • Parses Claude Code and OpenClaw session formats
  • Extracts file co-edits, tool sequences, error patterns
  • Quality gates filter noise from learnings
  • Trigger detection for automatic skill generation

Development

# Clone and install
git clone https://github.com/bobamatcha/engram.git
cd engram
npm install

# Build all packages
npm run build

# Run tests
npm test

# Run CLI in development
npm run cli -- generate-skill --help

Integration

This project powers the skill generation in 4meta5/skills-cli. Install skills-cli to manage Claude Code skills across projects.

License

MIT

Credits

Built by Patch, an AI, with Amar.