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

llmemory-palace

v3.0.6

Published

LLMemory-Palace: Code genome system for LLM context transfer. Maps codebases into portable format for LLM understanding. Now with MCP server and reference-based minimal context (90%+ token savings).

Downloads

846

Readme

🏛️ LLMemory-Palace

npm version npm downloads License: MIT Bun Node

📦 npm | 💻 GitHub | 📖 Docs | 🗺️ Roadmap | 🐛 Issues


The Problem

You're working with Claude or ChatGPT. You paste your codebase files one by one. The context fills up. The AI forgets what it saw first. You explain again. Context overflows. You start over.

The Solution

LLMemory-Palace maps your code into a portable format. Not your actual code—a structural map. Patterns, flows, fingerprints. One string replaces dozens of file pastes.

Install

npm install llmemory-palace
# or
bun add llmemory-palace

Node.js 18+ | Bun 1.0+

Quick Start

npx palace init
npx palace scan
npx palace genome

Commands

| Command | Description | |---------|-------------| | init | Create .palace/ directory | | scan | Analyze codebase structure | | genome | Generate genome string | | export | Export to CXML/JSON/YAML/MessagePack | | rebuild | Reconstruct from genome | | pack | Create portable package | | merge | Merge package into project | | refresh | Incremental update with --ripple for dependents | | patterns | View detected patterns | | flows | View behavior graphs | | deps | Analyze dependencies | | status | Show current state | | query | Interactive LLM query | | validate | Security check genome |

Options

--output, -o      Output file/directory
--format, -f      cxml | json | yaml | msgpack | genome
--level, -l       Compression 1-4 (default: 3)
--ripple, -r      Update dependents (refresh command)
--dry-run, -d     Preview without changes
--metrics, -m     Show before/after metrics

Security

  • No eval()
  • Input validation
  • Path traversal protection
  • Injection protection
  • Safe genome parsing (JSON only)
  • 28 security tests passing

API

import { Palace } from 'llmemory-palace';

const palace = new Palace({ projectPath: './my-project' });
await palace.init();
await palace.scan();
const genome = await palace.generateGenome();
console.log(genome);

Documentation

Export Formats

  • CXML (default) - Compressed, token-efficient
  • JSON - Human-readable
  • YAML - Configuration-friendly
  • MessagePack - Binary serialization

Token Efficiency

Reference-based output saves 90%+ tokens:

  • palace:// URIs for on-demand resolution
  • Compressed genomes: ~20KB for large projects
  • Incremental scans with LRU caching

MCP Server

90%+ token savings with reference-based minimal context:

// ~/.claude.json
{
  "mcpServers": {
    "palace": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "llmemory-palace", "mcp"]
    }
  }
}

Tools:

  • mcp__palace__init - Initialize project
  • mcp__palace__scan - Scan with reference output (97% token savings)
  • mcp__palace__genome - Generate compressed genome (99% savings)
  • mcp__palace__resolve_ref - Resolve palace:// URIs at depth 1-3
  • mcp__palace__status - Check project status

Token Savings:

| Operation | Full | Reference | Savings | |-----------|-----|-----------|---------| | scan | 5000 | 150 | 97% | | genome | 20000 | 200 | 99% |

Performance

  • LRU cache for faster rescans
  • Worker threads for parallel scanning
  • Chunked processing for files >100MB

Plugin System

import { HookSystem } from 'llmemory-palace/plugins';
hooks.on('scan', async (result) => { /* ... */ }, { priority: 10 });

Large Files

import { LargeFileHandler } from 'llmemory-palace/streaming';
const handler = new LargeFileHandler({ chunkSize: 1024 * 1024 });
handler.exportChunked(data, 'output');

AI Integration

import { PromptTemplates } from 'llmemory-palace/ai/prompts';
const prompts = new PromptTemplates(palace);
prompts.formatForLLM('claude', query);

License

MIT