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

@kiroku/cli

v1.3.1

Published

AI-powered memory system for Claude Code — MCP Server & Proxy

Readme

Kiroku V15

Compliant AI memory gateway for Claude Code. Side-records conversations, extracts knowledge via LLM, and serves it back through MCP tools.

Claude Code ──req──▶ Proxy ──passthrough──▶ api.anthropic.com
                       │ (SSE side-recording)
                       └──▶ .jsonl queue ──▶ Worker ──▶ SQLite + vec0
                                                           ▲
Claude Code ◀── MCP stdio ◀── MCP Gateway ────────────────┘

Features

  • Zero-latency proxy — Transparent passthrough with SSE side-recording, no added latency
  • Automatic knowledge extraction — Background LLM extraction of entities and facts from every conversation
  • Local vector search — bge-m3 embeddings (1024 dims, q8) stored in sqlite-vec for semantic retrieval
  • 5 MCP toolsmemory_search, memory_save, memory_forget, sql_readonly, health_status
  • DLP redaction — Strips AWS keys, API tokens, GitHub PATs before storage
  • Multi-project isolation — Facts and entities scoped by project ID
  • One-command launchkiroku start spawns proxy + worker + MCP + Claude Code

Quick Start

# Install globally
npm install -g @kiroku/cli

# Configure extraction API key
export OPENROUTER_API_KEY=sk-or-v1-your-key-here

# Launch (auto-initializes on first run)
cd your-project-directory
kiroku start

First run auto-creates ~/.kiroku/ and downloads the embedding model (~600MB). Subsequent starts take <3 seconds.

See docs/quickstart.md for the full setup guide.

Architecture

Three independent Node.js ESM modules:

| Module | Path | Role | |--------|------|------| | kiroku-aegis-proxy | src/proxy/ | HTTP passthrough, DLP redaction, SSE side-recording → .jsonl queue | | kiroku-memory-worker | src/worker/ | Queue polling, LLM extraction (OpenRouter/Ollama), bge-m3 embedding, SQLite write | | kiroku-mcp-gateway | src/mcp/ | MCP stdio server with 4 tools + 1 resource |

Source Files (29)

bin/kiroku.js              CLI: init/start/stop/status/doctor/export/reindex/transcript/activate/deactivate/license
build.mjs                  esbuild: src/ → dist/ (4 CJS bundles: proxy, worker, mcp, cli)
src/shared/   (10 files)   config, db, logger, paths, ids, redact, session-resolver, constants, health, audit
src/proxy/    (5 files)    server, classifier, sse-recorder, queue-writer, md-logger
src/worker/   (6 files)    worker, extractor, embedder, store, prompt-loader, prompt-crypto
src/mcp/      (5 files)    server, memory-search, memory-write, sql-sandbox, health-status
src/cli/      (1 file)     transcript-converter
src/license/  (3 files)    Ed25519 verify, machine-id, license-state (LS validate + offline grace)
server/       (CF Worker)  prompt API, LS webhook, prompt admin

CLI

kiroku init                # Create ~/.kiroku/ directory tree, config, and database
kiroku start               # Start proxy + worker + MCP, launch Claude Code
kiroku stop                # Stop all background daemons
kiroku status              # Report component states, DB stats, queue counts
kiroku doctor              # Health check: config, DB, sqlite-vec, model, API keys, license
kiroku export              # Export memory data to markdown
kiroku reindex             # Rebuild missing embeddings
kiroku transcript --list   # List available Claude Code sessions
kiroku transcript <id>     # Convert session to readable markdown
kiroku activate <key>      # Activate a Kiroku Pro license
kiroku deactivate          # Deactivate current license
kiroku license             # Show license status

All claude CLI flags pass through: kiroku start -c, kiroku start --resume, etc.

MCP Tools

| Tool | Description | |------|-------------| | memory_search | Semantic vector search (KNN) with text search fallback | | memory_save | Save a fact with immediate embedding generation | | memory_forget | Archive facts by ID or subject+predicate | | sql_readonly | Sandboxed read-only SQL against the memory database | | health_status | System health: DB stats, queue depth, embedding coverage, license tier |

Storage

All runtime data lives in ~/.kiroku/:

~/.kiroku/
├── config.json              # User configuration (Zod-validated)
├── data/
│   ├── memory.sqlite        # SQLite + WAL + sqlite-vec
│   └── queue/{incoming,processing,done,dead-letter}/
├── logs/{proxy,worker,mcp}.log
└── run/{proxy,worker}.state.json

Database schema: 7 tables (projects, conversations, turns, entities, facts, extraction_jobs, audit_logs) + fact_embeddings vec0 virtual table.

Security

Five red lines enforced:

| # | Rule | |---|------| | R1 | No keepalive in session mode (Pro/Max subscription protection) | | R2 | No dynamic CLAUDE.md modification (one-time init append only) | | R3 | No fake MCP tool results | | R4 | No request interception or mock SSE | | R5 | Private keys never in repository |

DLP redaction applied before queue storage. SQL sandbox blocks all write operations. Thinking blocks excluded by default.

Requirements

  • Node.js >= 20.0.0
  • macOS or Linux
  • Claude Code CLI
  • OpenRouter API key (or local Ollama)

Dependencies

| Package | Purpose | |---------|---------| | better-sqlite3 | SQLite driver with WAL | | sqlite-vec | Vector search (vec0 virtual table) | | @huggingface/transformers | Local bge-m3 embedding | | @modelcontextprotocol/sdk | MCP server + stdio transport | | eventsource-parser | SSE stream parser | | zod | Config + schema validation | | pino | Structured JSON logging | | nanoid | Short ID generation |

Documentation

License

Dual tier: Free (500 facts, text search only) / Pro (unlimited, vector search, premium extraction prompt). Lemon Squeezy license validation with 7-day offline grace period.