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 🙏

© 2025 – Pkg Stats / Ryan Hefner

memowiki

v1.0.7

Published

A persistent memory layer for your codebase + AI agent

Readme

MemoWiki

A persistent memory layer for your codebase - Automated documentation generation with LLM-powered insights, semantic search, and agent-driven summaries.

TypeScript License

Overview

MemoWiki transforms your code into searchable, up-to-date documentation automatically. It leverages Large Language Models (LLMs) to generate comprehensive docs, diagrams, and summaries while intelligently caching results to minimize API usage.

Key Features

  • Automated Documentation - Generate docs from code with LLM analysis
  • Visual Diagrams - Mermaid class and architecture diagrams
  • Semantic Search - Natural language code search with vector embeddings
  • Agent Summaries - Track AI agent implementation progress
  • Smart Caching - Avoid redundant API calls
  • Git Integration - Auto-detect changes and track history
  • Multi-LLM Support - OpenAI, Anthropic, Gemini, OpenRouter, Ollama
  • REST API - Expose functionality for IDE/CI integrations
  • Web Dashboard - Visual interface for monitoring and management

Quick Start

Installation

npm install -g memowiki

Configuration

Create a .env file:

LLM_PROVIDER=openai
OPENAI_API_KEY=your-api-key-here
OPENAI_MODEL=gpt-4-turbo-preview

See Configuration Guide for all providers.

Basic Usage

# Generate documentation for your codebase
memowiki update

# Record an agent implementation summary
memowiki record --type feature --output my-feature

# Query summaries
memowiki summaries --recent 5

# Search code semantically
memowiki search "authentication logic"

# Analyze repository
memowiki analyze

# Start API server (with integrated dashboard)
memowiki serve

# Build dashboard and backend
npm run build:all

Web Dashboard

MemoWiki now includes a web dashboard for visualizing and managing your codebase documentation.

Features

  • Overview - Stats cards showing documented files, cache hit rate, and pending TODOs
  • Documentation Browser - Browse and filter documentation status by file
  • Summaries Timeline - View agent implementation summaries with filtering
  • Settings - Manage LLM provider configuration
  • Activity Feed - Track recent documentation updates

Quick Start

# Build both backend and dashboard
npm run build:all

# Start the server (serves both API and dashboard)
memowiki serve

# Access dashboard at http://localhost:3000

Development Mode

# Terminal 1: Start backend API
memowiki serve

# Terminal 2: Start dashboard with hot-reload
cd dashboard
ng serve
# Access at http://localhost:4200

Build Scripts

| Script | Description | |--------|-------------| | npm run build | Build backend only | | npm run build:dashboard | Build dashboard only | | npm run build:all | Build both backend and dashboard |

Commands

Core Commands

| Command | Description | Documentation | |---------|-------------|---------------| | update | Generate documentation for codebase | Guide | | record | Create agent implementation summaries | Guide | | summaries | Query agent summaries | Guide | | search | Semantic code search | Guide | | analyze | Git repository insights | Guide | | serve | Start REST API server + dashboard | Guide | | intent | Analyze code change intent | Guide |

Command Details

Update - Generate Documentation

memowiki update [--full] [--verbose]
  • Auto-detects changed files from git
  • Generates markdown documentation
  • Creates class and architecture diagrams
  • Intelligently caches results

📖 Full Documentation

Record - Agent Summaries

memowiki record [-f files...] [-o name] [-t type] [--append]
  • Track AI agent implementation progress
  • Identify TODOs, stubs, and completed work
  • Create structured summaries with LLM analysis
  • Support incremental documentation

📖 Full Documentation

Summaries - Query Agent Work

memowiki summaries [-f file] [-t type] [-r recent]
  • Efficient index-based filtering
  • Query by file, type, or recency
  • No need to parse all summary files

📖 Full Documentation

Search - Semantic Code Search

memowiki search <query> [-n limit]
  • Natural language queries
  • Vector embedding similarity search
  • Returns ranked results with snippets

📖 Full Documentation

Analyze - Repository Insights

memowiki analyze
  • View git repository status
  • See recent commits and branch info
  • Detect merge conflicts

📖 Full Documentation

Serve - API Server

memowiki serve [-p port]
  • REST API for external integrations
  • IDE plugins and CI/CD pipelines
  • Programmatic access to all features

📖 Full Documentation

Intent - Change Classification

memowiki intent
  • Analyze code change intent
  • Classify as bug fix, feature, refactor, etc.
  • Provide actionable suggestions

📖 Full Documentation

Documentation

Guides

Supported LLM Providers

| Provider | Setup | Best For | |----------|-------|----------| | OpenAI | Requires API key | Production quality | | Anthropic | Requires API key | Long context | | Gemini | Requires API key | Cost-effective | | OpenRouter | Requires API key | Model flexibility | | Ollama | Local install | Privacy, no limits | | Mock | No setup | Testing |

See Configuration Guide for detailed setup.

Output Structure

.codewiki/
├── memory/           # Individual file documentation
├── diagrams/         # Class diagrams
├── flows/            # Architecture diagrams
├── summaries/        # Project and agent summaries
│   ├── index.json   # Summary metadata index
│   └── *.md         # Summary files
└── cache.json        # Documentation cache

Use Cases

For Developers

  • Onboarding - New team members understand codebase quickly
  • Documentation - Automated, always up-to-date
  • Code Review - Context for pull requests
  • Architecture - Visual system diagrams

For AI Agents

  • Memory - Persistent knowledge of codebase
  • Context - Understand system architecture
  • Progress Tracking - Document implementation work
  • TODO Management - Track incomplete work

For Teams

  • Knowledge Sharing - Centralized code knowledge
  • Change Tracking - Git-integrated documentation
  • Search - Find code by natural language
  • API Access - Integrate with existing tools

Programmatic Usage

import {
  LLMService,
  WikiManager,
  SummaryGenerator,
  SearchService,
  GitService
} from 'memowiki';

// Generate documentation
const llmService = new LLMService(config);
const doc = await llmService.generateDocumentation(codeStructure, gitState);

// Create agent summary
const generator = new SummaryGenerator(llmService, config);
const summary = await generator.generateImplementationSummary(
  ['src/auth/login.ts'],
  'feature'
);

// Search codebase
const searchService = new SearchService();
await searchService.initialize();
const results = await searchService.search('authentication', 10);

// Analyze git
const gitService = new GitService();
const gitState = await gitService.getGitState();

Integration Examples

VS Code Extension

// Generate docs on save
vscode.workspace.onDidSaveTextDocument(async (document) => {
  const response = await fetch('http://localhost:3000/api/v1/documentation', {
    method: 'POST',
    body: JSON.stringify({ file: document.fileName })
  });
});

GitHub Actions

- name: Generate Documentation
  run: |
    memowiki update
    git add .codewiki
    git commit -m "docs: update documentation"
    git push

Git Hook

#!/bin/bash
# .git/hooks/post-commit
memowiki update
memowiki record --type feature

Performance

  • Caching - Avoids redundant API calls (10-100x faster on unchanged files)
  • Incremental Updates - Only processes changed files
  • Parallel Processing - Concurrent LLM requests
  • Smart Filtering - Respects .gitignore and .memowikiignore

Requirements

  • Node.js 16+
  • Git repository (optional but recommended)
  • LLM provider API key (or Ollama for local)
  • ChromaDB (optional, for semantic search)

Troubleshooting

# Clear cache
rm -rf .codewiki/cache.json

# Regenerate all docs
memowiki update --full

# Enable verbose logging
memowiki update --verbose

# Test configuration
memowiki analyze

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Support


Built with ❤️ for developers and AI agents