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

@aakashpawar/repo-memory

v1.0.3

Published

🧠 Create a persistent brain for any code repository β€” instant context for AI agents

Readme

🧠 repo-memory

npm version license node

Create a persistent brain for any code repository β€” instant context for AI agents.

One command. Zero LLM dependency. Works offline.

npx @aakashpawar/repo-memory init

repo-memory scans your codebase, parses every function/class/module, maps dependencies, detects conventions, and generates a structured MEMORY.md that any AI agent can instantly consume β€” like giving it the institutional knowledge of a super-senior developer.

Why?

Every time an AI agent starts a new session, it:

  • πŸ”„ Wastes tokens re-scanning the repo structure
  • πŸ” Doesn't know where key logic lives (file + line numbers)
  • 🧩 Loses context about patterns, conventions, and relationships
  • πŸ’Έ Increases overhead by rebuilding context from scratch

repo-memory solves this with a single MEMORY.md file that persists between sessions.

Installation

# Install globally
npm install -g @aakashpawar/repo-memory

# Or run directly with npx (no install needed)
npx @aakashpawar/repo-memory init

Quick Start

# Initialize & index your project
cd your-project
repo-memory init

# Update after changes (fast β€” only re-indexes modified files)
repo-memory update

# Search for symbols
repo-memory query "payment processing"

# Get details about a specific symbol
repo-memory show PaymentService

# Health check
repo-memory doctor

What It Generates

MEMORY.md β€” Your Codebase Brain

# 🧠 Repository Memory

> my-app | 247 files | 1,832 symbols | Primary: TypeScript

## πŸ“‹ Project Overview

- Type: Next.js application
- Package Manager: pnpm
- Build: `pnpm build` | Test: `pnpm test`

## πŸ—οΈ Architecture Map

src/ (203 files)
β”œβ”€β”€ app/ (15 files)
β”œβ”€β”€ components/ (42 files)
β”‚ β”œβ”€β”€ ui/
β”‚ └── features/
β”œβ”€β”€ lib/ (8 files)
β”œβ”€β”€ server/ (31 files)
β”‚ β”œβ”€β”€ routes/
β”‚ β”œβ”€β”€ middleware/
β”‚ └── services/
└── types/ (5 files)

## πŸ—‚οΈ Key Files & Symbols

### `src/server/services/payment.service.ts` (L1-L187) β€” 12 dependents

- πŸ›οΈ **PaymentService** (L12-L187) `exported`
  - `class PaymentService`
- πŸ”§ **PaymentService.processPayment** (L34-L89)
  - `processPayment(order: Order): Promise<PaymentResult>`
- πŸ”§ **PaymentService.refund** (L91-L132)
  - `refund(paymentId: string, reason: string): Promise<void>`

## πŸ”— Dependency Graph

| File                 | Dependents | Impact      |
| -------------------- | ---------- | ----------- |
| `src/lib/api.ts`     | 28         | πŸ”΄ Critical |
| `src/types/index.ts` | 45         | πŸ”΄ Critical |

## πŸ“ Conventions & Patterns

- File Naming: kebab-case
- Function Naming: camelCase
- Testing: Vitest, Colocated (\*.test.ts files)

## 🚨 Critical Paths

1. **`src/lib/api.ts`** β€” 28 dependents (exports: `createApiClient`, `handleApiError`)

.repo-memory/index.db β€” Queryable SQLite Index

A fast, local SQLite database with full-text search for programmatic access:

# Search symbols
repo-memory query "authentication" --json

# Get structured results for AI agents
repo-memory query "error handling" --json --limit 10

Supported Languages

| Language | Parsing | Imports | Symbols | | --------------------- | -------- | ------- | ------------------------------------------------------------------- | | TypeScript/JavaScript | βœ… Full | βœ… Full | βœ… Functions, classes, methods, interfaces, types, enums, constants | | Python | βœ… Full | βœ… Full | βœ… Functions, classes, methods, decorators, constants | | Go | βœ… Full | βœ… Full | βœ… Functions, methods, structs, interfaces | | Rust | βœ… Full | βœ… Full | βœ… Functions, structs, enums, traits, impls | | Java/Kotlin | βœ… Full | βœ… Full | βœ… Classes, methods, interfaces | | Other | βœ… Basic | ❌ | βœ… Functions, classes (generic regex) |

Configuration

Create .repo-memory.json in your project root:

{
  "ignore": ["generated/", "*.auto.ts"],
  "maxTokens": 32000,
  "includeLineNumbers": true,
  "includeSignatures": true,
  "includeDependencies": true,
  "includeConventions": true,
  "maxKeySymbols": 100,
  "maxTreeDepth": 4
}

How It Works

repo-memory init
     β”‚
     β–Ό
 β”Œβ”€ Scan ─────────┐   Walks repo, respects .gitignore,
 β”‚  fast-glob      β”‚   computes file hashes, detects languages
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β–Ό
 β”Œβ”€ Parse ─────────┐   Regex-based AST extraction for
 β”‚  Multi-language  β”‚   functions, classes, methods, imports
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β–Ό
 β”Œβ”€ Resolve ───────┐   Maps imports β†’ files, computes
 β”‚  Dependencies   β”‚   fan-in/fan-out, detects cycles
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β–Ό
 β”Œβ”€ Detect ────────┐   Project type, test framework,
 β”‚  Conventions    β”‚   naming patterns, build system
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β–Ό
 β”Œβ”€ Store ─────────┐   SQLite + FTS5 full-text search
 β”‚  .repo-memory/  β”‚   for fast queries
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β–Ό
 β”Œβ”€ Generate ──────┐   Token-aware MEMORY.md with
 β”‚  MEMORY.md      β”‚   ranked symbols, architecture map
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Performance

| Repo Size | Files | Time | | ------------------- | ----------- | ---- | | Small (repo-memory) | 13 files | 0.1s | | Medium | ~200 files | ~1s | | Large | ~1000 files | ~5s |

Incremental updates (repo-memory update) only re-index changed files, making them near-instant.

Changelog

See CHANGELOG.md for a list of all releases and changes.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

MIT Β© Aakash Pawar