{"_id":"cavemem","_rev":"5-a0d4d887c804f81508d0c593c162d165","name":"cavemem","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"cavemem","version":"0.1.0","keywords":["memory","mcp","agent","claude-code","gemini-cli","codex","cursor","ai","compression","llm"],"author":{"name":"Julius Brussee"},"license":"MIT","_id":"cavemem@0.1.0","maintainers":[{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"}],"homepage":"https://github.com/JuliusBrussee/cavemem","bugs":{"url":"https://github.com/JuliusBrussee/cavemem/issues"},"bin":{"cavemem":"dist/index.js"},"dist":{"shasum":"bb36f9262c8bdc7d70ee354546ed855a1c0064f0","tarball":"https://registry.npmjs.org/cavemem/-/cavemem-0.1.0.tgz","fileCount":12,"integrity":"sha512-PLJdMUMGGR5PlPa621Y3R3VWmpeiwM8uY74LTN2e2hsUwnnMvyj7Cl+z1tpFZdqatUf7sEa8/xqrGfptMHwFmg==","signatures":[{"sig":"MEUCIQCUiPQAOdsZDsVDTSVRnV+dchLme4WgCoIdhyQUrPJ8nAIgDMp9dBMbd0TF50HH9cr5nrz2ZBI7M/vU/2APlRk2qCQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186583},"main":"dist/index.js","type":"module","engines":{"node":">=20.0.0"},"gitHead":"d69850c82f7f7cd22379d37c07e960f55a78c64e","_npmUser":{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"},"repository":{"url":"git+https://github.com/JuliusBrussee/cavemem.git","type":"git"},"_npmVersion":"11.11.0","description":"Cross-agent persistent memory with compressed storage. Plug-and-play memory for Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.","directories":{},"_nodeVersion":"25.8.0","dependencies":{"hono":"^4.6.10","kleur":"^4.1.5","commander":"^12.1.0","better-sqlite3":"^11.5.0","@hono/node-server":"^1.13.7","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cavemem_0.1.0_1776473172022_0.4842363095311166","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"cavemem","version":"0.1.1","keywords":["memory","mcp","agent","claude-code","gemini-cli","codex","cursor","ai","compression","llm"],"author":{"name":"Julius Brussee"},"license":"MIT","_id":"cavemem@0.1.1","maintainers":[{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"}],"homepage":"https://github.com/JuliusBrussee/cavemem","bugs":{"url":"https://github.com/JuliusBrussee/cavemem/issues"},"bin":{"cavemem":"dist/index.js"},"dist":{"shasum":"6a4aecd2550349076d916aad56027d870bf594fc","tarball":"https://registry.npmjs.org/cavemem/-/cavemem-0.1.1.tgz","fileCount":12,"integrity":"sha512-m/sTq+05N68SViX9duQyFlNFMrKBRKsfDYi5xXC7wo8VQehHzuZo3Kfk2vHTPPHKn/ibLr+bsBi36YF7cyOILw==","signatures":[{"sig":"MEQCIDEcIVvfPSZvL3m+DlE2KR1EQPb+AkZMnlx48bfvTje7AiAJxjUqfnHtI3LLUCAWliU1k3/bq1lYZGy4UnaPsTRAWA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186253},"main":"dist/index.js","type":"module","engines":{"node":">=20.0.0"},"gitHead":"dc2a895ec6c34aaf3fdf328a826a46281ffa90ca","_npmUser":{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"},"repository":{"url":"git+https://github.com/JuliusBrussee/cavemem.git","type":"git"},"_npmVersion":"11.11.0","description":"Cross-agent persistent memory with compressed storage. Plug-and-play memory for Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.","directories":{},"_nodeVersion":"25.8.0","dependencies":{"hono":"^4.6.10","kleur":"^4.1.5","commander":"^12.1.0","better-sqlite3":"^11.5.0","@hono/node-server":"^1.13.7","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cavemem_0.1.1_1776475429086_0.46566258605341715","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"cavemem","version":"0.1.2","keywords":["memory","mcp","agent","claude-code","gemini-cli","codex","cursor","ai","compression","llm"],"author":{"name":"Julius Brussee"},"license":"MIT","_id":"cavemem@0.1.2","maintainers":[{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"}],"homepage":"https://github.com/JuliusBrussee/cavemem","bugs":{"url":"https://github.com/JuliusBrussee/cavemem/issues"},"bin":{"cavemem":"dist/index.js"},"dist":{"shasum":"2150b0b44062e51e9305f263e03d682a3a9a42be","tarball":"https://registry.npmjs.org/cavemem/-/cavemem-0.1.2.tgz","fileCount":12,"integrity":"sha512-Co14Ljja1WMqo7BrmCJkLVvnCFxoz7qoDXhG7m+IrCja450RID/36H8sik24aQruNP8svey8u5UsxWE1DnhNUw==","signatures":[{"sig":"MEUCIQDXd1hc6OoC3dF80FNW7xUKyzD23SnXY4ydcZyHPkwveAIgXTJ/sQngZBJkAFoglGI5vcDudW/N0ksUK4ILLMdHByE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":189022},"main":"dist/index.js","type":"module","engines":{"node":">=20.0.0"},"gitHead":"7e5379e42643d69a0fdb01def9828195250c31fe","_npmUser":{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"},"repository":{"url":"git+https://github.com/JuliusBrussee/cavemem.git","type":"git"},"_npmVersion":"11.11.0","description":"Cross-agent persistent memory with compressed storage. Plug-and-play memory for Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.","directories":{},"_nodeVersion":"25.8.0","dependencies":{"hono":"^4.6.10","kleur":"^4.1.5","commander":"^12.1.0","better-sqlite3":"^11.5.0","@hono/node-server":"^1.13.7","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cavemem_0.1.2_1776477666885_0.810119819190074","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"cavemem","version":"0.1.3","keywords":["memory","mcp","agent","claude-code","gemini-cli","codex","cursor","ai","compression","llm"],"author":{"name":"Julius Brussee"},"license":"MIT","_id":"cavemem@0.1.3","maintainers":[{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"}],"homepage":"https://github.com/JuliusBrussee/cavemem","bugs":{"url":"https://github.com/JuliusBrussee/cavemem/issues"},"bin":{"cavemem":"dist/index.js"},"dist":{"shasum":"795807d412d5b5117b3004d3914ede5174d890f3","tarball":"https://registry.npmjs.org/cavemem/-/cavemem-0.1.3.tgz","fileCount":12,"integrity":"sha512-ewwTQPCT9+kmyrpevxrcTZE0SqCW1Tq84upzhPtUntCwgO74rTi8dTphXZMx4Ba4LU7MOJOFt5CBW3SKM77dWQ==","signatures":[{"sig":"MEQCIGbtzRpIvWC5grkiDOa4yjjK5oS4kDtnVZgS1JL4WZCyAiB7p7fkOIyUhH3BWckvJJeuC2womUsI+jnnlKRMnRJ5jQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":224262},"main":"./dist/index.js","type":"module","engines":{"node":">=20.0.0"},"gitHead":"f825f0222916dffbf2f7d2b0284f136d204208bd","scripts":{"dev":"tsup --watch --onSuccess \"node dist/index.js\"","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","pack:release":"pnpm build && node scripts/pack-release.mjs","stage-publish":"node scripts/prepack.mjs","prepublishOnly":"node scripts/prepack.mjs","publish:release":"pnpm pack:release && npm publish ./release --access public"},"_npmUser":{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"},"repository":{"url":"git+https://github.com/JuliusBrussee/cavemem.git","type":"git"},"_npmVersion":"11.11.0","description":"Cross-agent persistent memory with compressed storage. Plug-and-play memory for Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.","directories":{},"_nodeVersion":"25.8.0","dependencies":{"hono":"^4.6.10","kleur":"^4.1.5","commander":"^12.1.0","better-sqlite3":"^11.5.0","@hono/node-server":"^1.13.7","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.5","typescript":"^5.6.3","@cavemem/core":"workspace:*","@cavemem/hooks":"workspace:*","@cavemem/config":"workspace:*","@cavemem/worker":"workspace:*","@cavemem/storage":"workspace:*","@cavemem/compress":"workspace:*","@cavemem/embedding":"workspace:*","@cavemem/installers":"workspace:*","@cavemem/mcp-server":"workspace:*"},"optionalDependencies":{"@xenova/transformers":"^2.17.2"},"_npmOperationalInternal":{"tmp":"tmp/cavemem_0.1.3_1776513227548_0.20951460058731564","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"cavemem","version":"0.2.1","description":"Cross-agent persistent memory with compressed storage. Plug-and-play memory for Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.","keywords":["memory","mcp","agent","claude-code","gemini-cli","codex","cursor","ai","compression","llm"],"license":"MIT","author":{"name":"Julius Brussee"},"homepage":"https://github.com/JuliusBrussee/cavemem","repository":{"type":"git","url":"git+https://github.com/JuliusBrussee/cavemem.git"},"bugs":{"url":"https://github.com/JuliusBrussee/cavemem/issues"},"engines":{"node":">=20.0.0"},"type":"module","bin":{"cavemem":"dist/index.js"},"main":"dist/index.js","dependencies":{"commander":"^12.1.0","kleur":"^4.1.5","better-sqlite3":"^11.5.0","hono":"^4.6.10","@hono/node-server":"^1.13.7","@modelcontextprotocol/sdk":"^1.0.0"},"_id":"cavemem@0.2.1","gitHead":"e934e436e0dcb68422475d85385f7f8eb5e449b1","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-sujtPDxbgyFTNT8d3yREFDYLTbkCTTvcBIN0VIvVER/4qtx2cH64b9oEDmL1m0usfpNAo4Il8H058shoGZTFFA==","shasum":"021af8e7f24d0f69ad7dbce38ff229739878ea3e","tarball":"https://registry.npmjs.org/cavemem/-/cavemem-0.2.1.tgz","fileCount":12,"unpackedSize":223868,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBJoL25jcS1WZqk7R3vcqxkJFCPq2oiYqTNNZoU80EQgAiEAnLzCNBFTvm1fia5iPiCdxa4liT/kkvoiRec5SMEpD7o="}]},"_npmUser":{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"},"directories":{},"maintainers":[{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cavemem_0.2.1_1778069785267_0.38880808701650404"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-18T00:46:11.874Z","modified":"2026-05-06T12:16:25.503Z","0.1.0":"2026-04-18T00:46:12.169Z","0.1.1":"2026-04-18T01:23:49.235Z","0.1.2":"2026-04-18T02:01:07.028Z","0.1.3":"2026-04-18T11:53:47.694Z","0.2.1":"2026-05-06T12:16:25.400Z"},"bugs":{"url":"https://github.com/JuliusBrussee/cavemem/issues"},"author":{"name":"Julius Brussee"},"license":"MIT","homepage":"https://github.com/JuliusBrussee/cavemem","keywords":["memory","mcp","agent","claude-code","gemini-cli","codex","cursor","ai","compression","llm"],"repository":{"type":"git","url":"git+https://github.com/JuliusBrussee/cavemem.git"},"description":"Cross-agent persistent memory with compressed storage. Plug-and-play memory for Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.","maintainers":[{"name":"juliusbrussee","email":"juliusbrussee@getlockedin.nl"}],"readme":"<div align=\"center\">\n\n![](https://em-content.zobj.net/source/apple/391/rock_1faa8.png)\n\n# cavemem\n\n**why agent forget when agent can remember**\n\n[![npm](https://img.shields.io/npm/v/cavemem?style=flat&color=yellow)](https://www.npmjs.com/package/cavemem) [![Stars](https://img.shields.io/github/stars/JuliusBrussee/cavemem?style=flat&color=yellow)](https://github.com/JuliusBrussee/cavemem/stargazers) [![Last Commit](https://img.shields.io/github/last-commit/JuliusBrussee/cavemem?style=flat)](https://github.com/JuliusBrussee/cavemem/commits/main) [![License](https://img.shields.io/github/license/JuliusBrussee/cavemem?style=flat)](LICENSE)\n\n[Install](#install) • [How it works](#how-it-works) • [CLI](#cli) • [MCP](#mcp) • [Settings](#settings)\n\n</div>\n\n<p align=\"center\">\n  <strong>🪨 Caveman Ecosystem</strong> &nbsp;·&nbsp;\n  <a href=\"https://github.com/JuliusBrussee/caveman\">caveman</a> <em>talk less</em> &nbsp;·&nbsp;\n  <strong>cavemem</strong> <em>remember more</em> <sub>(you are here)</sub> &nbsp;·&nbsp;\n  <a href=\"https://github.com/JuliusBrussee/cavekit\">cavekit</a> <em>build better</em>\n</p>\n\n\n---\n\nCross-agent persistent memory for coding assistants. Hooks fire at session boundaries, compress observations with the caveman grammar (~75% fewer prose tokens, code and paths preserved byte-for-byte), and write to local SQLite. Agents query their own history through three MCP tools. No network. No cloud.\n\n**Supports:** Claude Code · Cursor · Gemini CLI · OpenCode · Codex\n\n- **Persistent memory across sessions.** Hooks capture what happened; the store keeps it.\n- **Compressed at rest.** Deterministic caveman grammar, round-trip-guaranteed expansion for humans.\n- **Progressive MCP retrieval.** `search`, `timeline`, `get_observations` — agents filter before fetching.\n- **Hybrid search.** SQLite FTS5 keyword + local vector index, combined with a tunable ranker.\n- **Local by default.** No network calls. Optional remote embedding providers via config.\n- **Web viewer.** Read-only UI at `http://localhost:37777` for browsing sessions in human-readable form.\n- **Cross-IDE installers.** Claude Code, Gemini CLI, OpenCode, Codex, Cursor — one command each.\n- **Privacy-aware.** `<private>...</private>` stripped at write boundary. Path globs exclude whole directories.\n\n---\n\n## Install\n\n```sh\nnpm install -g cavemem\ncavemem install                    # Claude Code\ncavemem install --ide cursor       # cursor | gemini-cli | opencode | codex\ncavemem status                     # see wiring + embedding backfill\ncavemem viewer                     # open http://127.0.0.1:37777\n```\n\nNo daemon to start. Hooks write synchronously. A local worker auto-spawns in the background on the first hook to build embeddings; it self-exits when idle. Disable with `cavemem config set embedding.autoStart false`.\n\n---\n\n## How it works\n\n```\nsession event  →  redact <private>  →  compress  →  SQLite + FTS5\n                                                           ↑\n                                                MCP queries on demand\n```\n\nWhat compression looks like in practice:\n\n```\nInput:  \"The auth middleware throws a 401 when the session token expires; we should add a refresh path.\"\nStored: \"auth mw throws 401 @ session token expires. add refresh path.\"\nViewed: \"The auth middleware throws a 401 when session token expires. Add refresh path.\"\n```\n\nCode blocks, URLs, paths, identifiers, and version numbers are never touched. Hook handlers complete in under 150ms. Full bodies fetched on demand via `get_observations`.\n\n---\n\n## CLI\n\n| Command | |\n|---------|--|\n| `cavemem install [--ide <name>]` | Register hooks + MCP for an IDE |\n| `cavemem uninstall [--ide <name>]` | Remove hooks + MCP |\n| `cavemem status` | Single dashboard: wiring, DB counts, embedding backfill, worker pid |\n| `cavemem config show\\|get\\|set\\|open` | View/edit settings — schema is self-documenting |\n| `cavemem start\\|stop\\|restart` | Control the worker daemon (usually unnecessary — auto-starts) |\n| `cavemem viewer` | Open the memory viewer in your browser |\n| `cavemem doctor` | Verify installation |\n| `cavemem search <query> [--limit N] [--no-semantic]` | Search memory (BM25 + cosine re-rank) |\n| `cavemem compress <file>` | Compress a file with caveman grammar |\n| `cavemem reindex` | Rebuild FTS5 + vector index |\n| `cavemem export <out.jsonl>` | Dump observations to JSONL |\n| `cavemem mcp` | Start MCP server (stdio) |\n\n---\n\n## MCP\n\nProgressive disclosure: `search` and `timeline` return compact results; `get_observations` fetches full bodies.\n\n| Tool | Returns |\n|------|---------|\n| `search(query, limit?)` | `[{id, score, snippet, session_id, ts}]` — BM25 + optional cosine re-rank |\n| `timeline(session_id, around_id?, limit?)` | `[{id, kind, ts}]` |\n| `get_observations(ids[], expand?)` | Full bodies, expanded by default |\n| `list_sessions(limit?)` | `[{id, ide, cwd, started_at, ended_at}]` |\n\n---\n\n## Settings\n\n`~/.cavemem/settings.json`\n\n| Key | Default | |\n|-----|---------|--|\n| `dataDir` | `\"~/.cavemem\"` | SQLite location |\n| `compression.intensity` | `\"full\"` | `lite` / `full` / `ultra` |\n| `compression.expandForModel` | `false` | Return expanded text to model |\n| `embedding.provider` | `\"local\"` | `local` / `ollama` / `openai` |\n| `workerPort` | `37777` | Local viewer port |\n| `search.alpha` | `0.5` | BM25 / vector blend |\n| `search.defaultLimit` | `10` | Default result count |\n| `privacy.excludePatterns` | `[]` | Paths never captured |\n\nContent inside `<private>...</private>` is stripped before write. Paths matching `excludePatterns` are never read. The worker binds to `127.0.0.1` only.\n\n---\n\n## 🪨 The Caveman Ecosystem\n\nThree tools. One philosophy: **agent do more with less**.\n\n| Repo | What | One-liner |\n|------|------|-----------|\n| [**caveman**](https://github.com/JuliusBrussee/caveman) | Output compression skill | *why use many token when few do trick* — ~75% fewer output tokens across Claude Code, Cursor, Gemini, Codex |\n| [**cavemem**](https://github.com/JuliusBrussee/cavemem) *(you are here)* | Cross-agent persistent memory | *why agent forget when agent can remember* — compressed SQLite + MCP, local by default |\n| [**cavekit**](https://github.com/JuliusBrussee/cavekit) | Spec-driven autonomous build loop | *why agent guess when agent can know* — natural language → kits → parallel build → verified |\n\nThey compose: **cavekit** orchestrates the build, **caveman** compresses what the agent *says*, **cavemem** compresses what the agent *remembers*. Install one, some, or all — each stands alone.\n\n## Also by Julius Brussee\n\n- [**Revu**](https://github.com/JuliusBrussee/revu-swift) — local-first macOS study app with FSRS spaced repetition. [revu.cards](https://revu.cards)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}