{"_id":"@anandt/deja","_rev":"7-976ceb0939a868dd594d67e1954912b4","name":"@anandt/deja","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@anandt/deja","version":"0.1.0","keywords":["claude","claude-code","memory","plugin","persistent-memory","mcp","ai"],"license":"MIT","_id":"@anandt/deja@0.1.0","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"homepage":"https://github.com/anandmt/deja#readme","bugs":{"url":"https://github.com/anandmt/deja/issues"},"bin":{"deja":"bin/deja.cjs"},"dist":{"shasum":"d4a839164a77372b62d221f0e73480ac1d058781","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.1.0.tgz","fileCount":13,"integrity":"sha512-wk6kuADWZxEu3yI1fXNVzIz+jc+Mv5aks2JAgf4GXeP5S2mEhmyTxxM/pcxI0FbYFtVdwD7Chn2pHOX3sB11zg==","signatures":[{"sig":"MEUCIQDd1emD8CqKgkX+JShpwsLPq4+1auDx9JmaW0P/dxtqiAIgbQTZV6U9rjwT2HpJN7Y0i7DGWLaLwOaL9wecPbSwrT0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1168846},"main":"dist/worker/main.js","type":"module","engines":{"bun":">=1.3.6","node":">=18.0.0"},"gitHead":"60256358e991007c0552dabd7e026df209cc046c","scripts":{"test":"bun test","build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html","typecheck":"bun x tsc --noEmit","test:watch":"bun test --watch","prepublishOnly":"bun run build"},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"repository":{"url":"git+https://github.com/anandmt/deja.git","type":"git"},"_npmVersion":"11.6.1","description":"Zero-config persistent memory for Claude Code","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/deja_0.1.0_1779799544340_0.6050946157998447","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anandt/deja","version":"0.1.1","keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"license":"MIT","_id":"@anandt/deja@0.1.1","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"homepage":"https://github.com/anandmt/deja#readme","bugs":{"url":"https://github.com/anandmt/deja/issues"},"bin":{"deja":"bin/deja.cjs"},"dist":{"shasum":"9f47d3259301c0872e8635a95d8879b795cf542c","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.1.1.tgz","fileCount":13,"integrity":"sha512-iI8fhqLCC0OMvYUQiKNv54GzZMd7dUAS81Z7KenU9Tjj3xk2zxLaDc75214R+DDLo/g6uQRo+iKdnbfb3ANYKQ==","signatures":[{"sig":"MEUCIQCDw1UaKR6fnd4h6ucgaPdiW3lj26yGs1a2Iv27LHaN4QIgLVudu1WMHTp03YuGlFP0FjsEl5qiISvqiTxYdbrUpvQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1170733},"main":"dist/worker/main.js","type":"module","engines":{"bun":">=1.3.6","node":">=18.0.0"},"gitHead":"002adb29572448fafea27a6a483aacac391026e0","scripts":{"test":"bun test","build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html","typecheck":"bun x tsc --noEmit","test:watch":"bun test --watch","prepublishOnly":"bun run build"},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"repository":{"url":"git+https://github.com/anandmt/deja.git","type":"git"},"_npmVersion":"11.6.1","description":"Claude Code forgets everything between sessions. deja fixes that.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/deja_0.1.1_1779801133666_0.4859101419718339","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@anandt/deja","version":"0.1.2","keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"license":"MIT","_id":"@anandt/deja@0.1.2","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"homepage":"https://github.com/anandmt/deja#readme","bugs":{"url":"https://github.com/anandmt/deja/issues"},"bin":{"deja":"bin/deja.cjs"},"dist":{"shasum":"46cc65b8570163d084e00705cd013e66623851c3","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.1.2.tgz","fileCount":15,"integrity":"sha512-eBcI5/ugo1QAq1TgLr59EurCsPm8nyaUPzwRFkSdxQKmEUv+JsSX6AMjoL+jaXzDQ+qaY2AytQP+SmmwLRuJww==","signatures":[{"sig":"MEYCIQDVUx5eTfqQCxLHPqbL5YBZ4yNxrs5m+3o8MBEtw4HjnQIhAKMfIlTV8r4+esm2yZ6BFc9N/UK02f49LLdCSJM7KhO8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1215839},"main":"dist/worker/main.js","type":"module","engines":{"bun":">=1.3.6","node":">=18.0.0"},"gitHead":"6408266b1f344dc15287bd0392454e7d2c2d8080","scripts":{"test":"bun test","build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html && cp src/dashboard/logo.png dist/dashboard/logo.png && cp src/dashboard/favicon.png dist/dashboard/favicon.png","typecheck":"bun x tsc --noEmit","test:watch":"bun test --watch","prepublishOnly":"bun run build"},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"repository":{"url":"git+https://github.com/anandmt/deja.git","type":"git"},"_npmVersion":"11.6.1","description":"Claude Code forgets everything between sessions. deja fixes that.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/deja_0.1.2_1779863377150_0.44014355443453224","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@anandt/deja","version":"0.1.3","keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"license":"MIT","_id":"@anandt/deja@0.1.3","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"homepage":"https://github.com/anandmt/deja#readme","bugs":{"url":"https://github.com/anandmt/deja/issues"},"bin":{"deja":"bin/deja.cjs"},"dist":{"shasum":"d78640adac3499ddbf94556c0b7ac2660966c2d4","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.1.3.tgz","fileCount":15,"integrity":"sha512-RzHYXp9xXSaLGX8pzCt8jGDNkwWPwpXCIiu3OxStFmtx0oep70FTsYJb4NNalqfKzPqvxO0CGU8CS9PgwbPLDw==","signatures":[{"sig":"MEUCIQCRrO8QUO3o28tVQA8Oboqv8BmmBuROEduipD0Xr4gE3gIgV2zEXibnXWSJhxTtO+5sRHSzbT1Ys9uDtANEYyHFJzI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1216352},"main":"dist/worker/main.js","type":"module","engines":{"bun":">=1.3.6","node":">=18.0.0"},"gitHead":"90657ba0d02bf7da0e8c67f12a867cc6bbead959","scripts":{"test":"bun test","build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html && cp src/dashboard/logo.png dist/dashboard/logo.png && cp src/dashboard/favicon.png dist/dashboard/favicon.png","typecheck":"bun x tsc --noEmit","test:watch":"bun test --watch","prepublishOnly":"bun run build"},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"repository":{"url":"git+https://github.com/anandmt/deja.git","type":"git"},"_npmVersion":"11.6.1","description":"Claude Code forgets everything between sessions. deja fixes that.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/deja_0.1.3_1779959156098_0.6401061640688461","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anandt/deja","version":"0.2.0","keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"license":"MIT","_id":"@anandt/deja@0.2.0","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"homepage":"https://github.com/anandmt/deja#readme","bugs":{"url":"https://github.com/anandmt/deja/issues"},"bin":{"deja":"bin/deja.cjs"},"dist":{"shasum":"42e4c8c646761c8257eee51e0278657f5a74c348","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.2.0.tgz","fileCount":15,"integrity":"sha512-MC7ZIEjEICAHH5ns+4xypw5aohS1TPIc6RI1tPnaJdPPdz/mJesSbRLzRfVWi2vkyX+KBGReCzG4aoTf3ubOAg==","signatures":[{"sig":"MEUCIQC/Zdwkdg5jYREYHr/EqlGjEcagv9EbNcxyqGNMhEWY6QIgWh9QzXv/YS53NQRo3ErBMqmts8baHqjQjEpUWkgQWYE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1382982},"main":"dist/worker/main.js","type":"module","engines":{"bun":">=1.3.6","node":">=18.0.0"},"gitHead":"5f884f49620bd3a28da26988a13ec8ec28714eba","scripts":{"test":"bun test","build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html && cp src/dashboard/logo.png dist/dashboard/logo.png && cp src/dashboard/favicon.png dist/dashboard/favicon.png","typecheck":"bun x tsc --noEmit","test:watch":"bun test --watch","prepublishOnly":"bun run build"},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"repository":{"url":"git+https://github.com/anandmt/deja.git","type":"git"},"_npmVersion":"11.6.1","description":"Claude Code forgets everything between sessions. deja fixes that.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"web-tree-sitter":"^0.25","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/deja_0.2.0_1780030333995_0.8250593581591252","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@anandt/deja","version":"0.2.1","keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"license":"MIT","_id":"@anandt/deja@0.2.1","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"homepage":"https://github.com/anandmt/deja#readme","bugs":{"url":"https://github.com/anandmt/deja/issues"},"bin":{"deja":"bin/deja.cjs"},"dist":{"shasum":"2da645e2a800726ad9cc8b8ca858f511d84f8ca8","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.2.1.tgz","fileCount":15,"integrity":"sha512-azK1TkGW6jPLSx1jpjEXSGu38RL5M6bHL7zlQlu0T6F9wxFYW8zeFCNjsRcTt5TdGqT33SdOt23v9S5r1HBuWQ==","signatures":[{"sig":"MEQCIFQc5anKS64iREpliy6VBN1oa4FrEBzX5VICE+39N+kCAiA6bvxqcHqGtXBRrWMHDGdUpDNKvGj1OINCKaGy5bz4+w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1385319},"main":"dist/worker/main.js","type":"module","engines":{"bun":">=1.3.6","node":">=18.0.0"},"gitHead":"c7e4ae3d3dd70bde87b7b2613c0b89bc8525dd58","scripts":{"test":"bun test","build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html && cp src/dashboard/logo.png dist/dashboard/logo.png && cp src/dashboard/favicon.png dist/dashboard/favicon.png","typecheck":"bun x tsc --noEmit","test:watch":"bun test --watch","prepublishOnly":"bun run build"},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"repository":{"url":"git+https://github.com/anandmt/deja.git","type":"git"},"_npmVersion":"11.6.1","description":"Claude Code forgets everything between sessions. deja fixes that.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"web-tree-sitter":"^0.25","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/deja_0.2.1_1780033618619_0.9469682491153673","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@anandt/deja","version":"0.2.2","description":"Claude Code forgets everything between sessions. deja fixes that.","type":"module","main":"dist/worker/main.js","bin":{"deja":"bin/deja.cjs"},"scripts":{"build":"bun build src/worker/main.ts --outdir dist/worker --target bun && bun build src/cli/main.ts --outdir dist/cli --target bun && bun build src/hooks/session-start.ts src/hooks/session-stop.ts src/hooks/post-tool-use.ts src/hooks/prompt-submit.ts --outdir dist/hooks --target bun && bun build src/mcp/server.ts --outdir dist/mcp --target bun && bun build src/dashboard/serve.ts --outdir dist/dashboard --target bun && cp src/dashboard/index.html dist/dashboard/index.html && cp src/dashboard/logo.png dist/dashboard/logo.png && cp src/dashboard/favicon.png dist/dashboard/favicon.png","prepublishOnly":"bun run build","test":"bun test","test:watch":"bun test --watch","typecheck":"bun x tsc --noEmit"},"keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"repository":{"type":"git","url":"git+https://github.com/anandmt/deja.git"},"homepage":"https://github.com/anandmt/deja#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0","web-tree-sitter":"^0.25"},"devDependencies":{"@types/bun":"latest","typescript":"^5.8.0"},"engines":{"node":">=18.0.0","bun":">=1.3.6"},"license":"MIT","gitHead":"850dd5a9555a26de14a1c062dad8d9def453ddf0","_id":"@anandt/deja@0.2.2","bugs":{"url":"https://github.com/anandmt/deja/issues"},"_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-qUetBDoWdEk5beHB+OX1zJ2Fp9a1/k2WwVRDk/bpasNCB9JgPgXQlPIrrYFeDIVpkiPzM9PFKBRP/Ld6rV44UA==","shasum":"89b7a482948510f50b699b276a7f1448b32b32e5","tarball":"https://registry.npmjs.org/@anandt/deja/-/deja-0.2.2.tgz","fileCount":15,"unpackedSize":1385643,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEXINQoYVkoNwL52G7GJ0BTcVP3D2Zx8BfkJC8MYifzCAiEA9zHlDYcnKPg9Y0MYNs0+HwzZ83PdGrpIRZTB+kzv9QI="}]},"_npmUser":{"name":"anandt","email":"anandtiwari@live.com"},"directories":{},"maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/deja_0.2.2_1780041847573_0.17926035276449914"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-26T12:45:44.245Z","modified":"2026-05-29T08:04:07.872Z","0.1.0":"2026-05-26T12:45:44.515Z","0.1.1":"2026-05-26T13:12:13.860Z","0.1.2":"2026-05-27T06:29:37.333Z","0.1.3":"2026-05-28T09:05:56.282Z","0.2.0":"2026-05-29T04:52:14.153Z","0.2.1":"2026-05-29T05:46:58.846Z","0.2.2":"2026-05-29T08:04:07.775Z"},"bugs":{"url":"https://github.com/anandmt/deja/issues"},"license":"MIT","homepage":"https://github.com/anandmt/deja#readme","keywords":["claude","claude-code","memory","persistent-memory","mcp","ai","context","hooks","sqlite","local","privacy","offline","session","agent-memory"],"repository":{"type":"git","url":"git+https://github.com/anandmt/deja.git"},"description":"Claude Code forgets everything between sessions. deja fixes that.","maintainers":[{"name":"anandt","email":"anandtiwari@live.com"}],"readme":"<p align=\"center\">\n  <img src=\"src/dashboard/logo.png\" alt=\"deja\" width=\"120\">\n</p>\n<p align=\"center\">\n  <strong>Claude Code forgets everything between sessions. deja fixes that.</strong>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/firstcontributions/open-source-badges\"><img src=\"https://firstcontributions.github.io/open-source-badges/badges/open-source-v1/open-source.svg\" alt=\"Open Source Love\"/></a>\n  <a href=\"https://www.npmjs.com/package/@anandt/deja\"><img src=\"https://img.shields.io/npm/v/@anandt/deja.svg\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/@anandt/deja\"><img src=\"https://img.shields.io/npm/dm/@anandt/deja.svg\" alt=\"monthly downloads\"></a>\n  <a href=\"https://github.com/anandmt/deja/blob/main/LICENSE\"><img src=\"https://img.shields.io/npm/l/@anandt/deja.svg\" alt=\"license\"></a>\n</p>\n\n<p align=\"center\">\n  Zero config. 100% local. No API keys.<br>\n  Automatic persistent memory for Claude Code.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://youtu.be/TyEcIwfRqOo\">\n    <img src=\"https://img.youtube.com/vi/TyEcIwfRqOo/maxresdefault.jpg\" alt=\"deja demo video\" width=\"600\">\n  </a>\n</p>\n<p align=\"center\">\n  <a href=\"https://youtu.be/TyEcIwfRqOo\">Watch the demo</a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#install\">Install</a> &middot;\n  <a href=\"https://youtu.be/TyEcIwfRqOo\">Demo</a> &middot;\n  <a href=\"#what-gets-captured\">Captured Events</a> &middot;\n  <a href=\"#progressive-enhancement\">Tiers</a> &middot;\n  <a href=\"#architecture\">Architecture</a> &middot;\n  <a href=\"#in-session-recall-mcp-tools\">MCP Tools</a> &middot;\n  <a href=\"#cli\">CLI</a> &middot;\n  <a href=\"#configuration\">Config</a> &middot;\n  <a href=\"#dashboard\">Dashboard</a>\n</p>\n\n---\n\n## The problem\n\nEvery time you start a new Claude Code session, it starts from scratch:\n\n> **You:** \"We decided last week to use Postgres for the queue.\"\n> **Claude:** \"I don't have context from previous sessions.\"\n\n**deja gives Claude a memory.** It silently observes your sessions — files touched, commands run, decisions made — and feeds the most relevant context back at the start of every new session.\n\n## Install\n\n```bash\nnpm install -g @anandt/deja\ndeja install\n```\n\nThat's it. Bun is auto-installed if missing. Start a new Claude Code session and you'll see:\n\n```\n+- d e j a ----------------------------------+\n|                                            |\n|  > 142 memories :: 12 sessions :: 3h ago   |\n|  > Dashboard :: http://localhost:19533     |\n|                                            |\n+--------------------------------------------+\n```\n\nBehind that banner, Claude receives a context block like this before you type a word:\n\n```xml\n<system-reminder>\n# deja — project memory for /Users/you/myapp\n142 observations across 12 sessions | Dashboard: http://localhost:19533\n\n## Last session\nWorked on: auth middleware refactor, migrated session storage to Redis.\nTests passing (47 specs). Deployed to staging.\n\n## Key observations\n- [critical] Decision: \"Use Postgres for job queue instead of Redis\"\n- [high] Edit auth.ts — validateToken, refreshSession, AuthService\n- [high] Created migration-003-queue-tables.ts\n- [critical] Decision: \"Rate limiting at API gateway, not app layer\"\n\nUse deja_search/deja_timeline/deja_observe MCP tools for deeper memory access.\n</system-reminder>\n```\n\nNo manual tagging. No \"save this.\" No commands to run. It just works.\n\n---\n\n## What gets captured\n\ndeja classifies every event and skips the noise. About 30-40% of events are filtered out automatically.\n\n| Event | Example | Stored as |\n|-------|---------|-----------|\n| Source file edit | `Edit auth.ts — validateToken, AuthService` | `file_edit` / high |\n| New source file | `Created migration-001.ts` | `file_write` / critical |\n| Build/test command | `npm run build → Compiled successfully` | `bash_cmd` / medium |\n| Failed test run | `bun test → 3 failed` | `bash_cmd` / high |\n| Architectural decision | *\"Let's use Postgres for the queue\"* | `decision` / critical |\n| Navigation (`ls`, `pwd`) | — | **skipped** |\n| Lock file read | `package-lock.json` | **skipped** |\n| `node_modules/` read | `node_modules/express/index.js` | **skipped** |\n\nSignificance levels: `critical` > `high` > `medium` > `low` > `skip`\n\n---\n\n## Progressive enhancement\n\ndeja uses a tiered system. Each tier is additive — **Tier 0 is the full product, not a degraded mode.**\n\n| Tier | What it adds | Cost | How to enable |\n|------|-------------|------|---------------|\n| **0** (default) | Heuristic extraction + FTS5 full-text search | Free, zero deps | `deja install` |\n| **1: AST** | tree-sitter structural parsing — 25+ languages, accurate symbol names in titles and facts | Free, WASM grammars auto-downloaded on demand | `\"tiers\": { \"ast\": true }` in [settings](docs/CONFIGURATION.md) |\n| **2: Vectors** | sqlite-vec + ONNX local embeddings for semantic search | Free, local model | *Planned* |\n| **3: LLM** | Rich narrative summaries via API calls for high-significance events | API costs | *Planned* |\n\n### Tier 1 in action\n\nWith AST enabled, observation titles go from generic to precise:\n\n```\nBefore (Tier 0):  Edit src/auth.ts — modified 3 lines\nAfter  (Tier 1):  Edit auth.ts — validateToken, refreshSession, AuthService\n```\n\nSupported languages include TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, PHP, Swift, Kotlin, Scala, and [20+ more](src/pipelines/extract/grammar.ts).\n\n---\n\n## Architecture\n\n### Data flow\n\n```mermaid\ngraph LR\n    A[Claude Code] -->|hooks| B[Worker]\n    B --> C{Classify}\n    C -->|skip ~35%| D[/Dropped/]\n    C -->|store| E[Normalize]\n    E --> F[Extract]\n    F --> G[(SQLite + FTS5)]\n    G -->|next session| H[Context Inject]\n    H -->|system-reminder| A\n```\n\n### Process model\n\nThree separate processes access `memory.db`, coordinated through SQLite WAL mode:\n\n```mermaid\ngraph TB\n    CC[Claude Code] -->|Unix socket| W[\"Worker (long-running)\"]\n    CC -->|stdio| MCP[MCP Server]\n    CC -->|direct read| SS[SessionStart Hook]\n    W -->|read-write| DB[(memory.db)]\n    MCP -->|read-only| DB\n    SS -->|read-write| DB\n    W -.->|failover| WAL[pending.wal]\n```\n\n**Design principles:**\n\n- **Pipeline stages are pure functions** — input in, output out, no side effects, independently testable\n- **WAL failover** — if the worker is down, events buffer to `~/.deja/pending.wal` with zero data loss; the worker drains the WAL on next startup\n- **Lazy worker** — starts on first hook fire, shuts down after 30 minutes idle\n- **Multi-session safe** — multiple Claude Code sessions share one worker, events tagged by `session_id`\n\n---\n\n## In-session recall (MCP tools)\n\nClaude can search its own memory mid-session through three MCP tools. They follow a 3-layer protocol to prevent over-fetching:\n\n### `deja_search` — Find observations\n\nReturns a lightweight index. **Always start here.**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | string | yes | Search query (FTS5 syntax supported) |\n| `project` | string | no | Filter by project path |\n| `significance` | enum | no | `low` \\| `medium` \\| `high` \\| `critical` |\n| `kind` | enum | no | `file_read` \\| `file_edit` \\| `file_write` \\| `bash_cmd` \\| `decision` \\| `prompt` |\n| `limit` | number | no | Max results (default 20, max 50) |\n\n### `deja_timeline` — Get surrounding context\n\nShows what happened before and after an observation within the same session.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `anchor` | number | yes | Observation ID to center around |\n| `depth_before` | number | no | Items before anchor (default 5, max 20) |\n| `depth_after` | number | no | Items after anchor (default 5, max 20) |\n\n### `deja_observe` — Full details\n\nFetches complete observation records. **Hard cap: 10 IDs per request.**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `ids` | number[] | yes | Observation IDs to fetch (1-10) |\n\n### Example flow\n\n> **You:** \"What was that caching approach we discussed last week?\"\n>\n> Claude calls `deja_search({ query: \"caching\" })`, finds observation #847, calls `deja_timeline({ anchor: 847 })` for context, then `deja_observe({ ids: [845, 847, 849] })` for full details.\n\n---\n\n## CLI\n\n```\ndeja install               Install hooks + MCP server (~/.claude/settings.json)\ndeja uninstall             Remove hooks, stop worker (keeps data)\ndeja uninstall --purge     Full removal including all data (~/.deja)\n\ndeja search <query>        Search observations by keyword\n  --project <path>           Filter by project (default: cwd)\n  --significance <level>     Filter: low | medium | high | critical\n  --kind <type>              Filter: file_read | file_edit | file_write |\n                             bash_cmd | decision | prompt\n  --limit <n>                Max results (default 20, max 50)\n\ndeja stats                 Show project statistics\n  --project <path>           Project path (default: cwd)\n\ndeja dashboard             Open web dashboard in browser\n  --port <n>                 Port (default: 19533)\n```\n\n---\n\n## Dashboard\n\n```bash\ndeja dashboard\n```\n\nA local web interface at `http://localhost:19533` for browsing your memory:\n\n- Observation timeline with search, significance filter, and date range\n- Session history with auto-generated summaries\n- Project-level statistics\n- Dark mode (default) and light mode\n- Sortable columns, live refresh\n\n---\n\n## Configuration\n\ndeja works with zero configuration. Optionally override defaults in `~/.deja/settings.json`:\n\n```json\n{\n  \"context_budget\": 8000,\n  \"tiers\": { \"ast\": true },\n  \"cross_project\": false,\n  \"debounce_ms\": 100,\n  \"worker_idle_timeout_minutes\": 30,\n  \"log_level\": \"warn\"\n}\n```\n\nOnly specify the values you want to change — everything else keeps its default.\n\nSee **[docs/CONFIGURATION.md](docs/CONFIGURATION.md)** for the full settings reference, environment variables, and data directory layout.\n\n---\n\n## Context injection\n\nAt session start, deja reads the database directly (not through the worker) and injects context in under 200ms.\n\n**Budget:** 8000 characters by default (~2000 tokens), split across:\n\n| Allocation | Share | Content |\n|------------|-------|---------|\n| Last session summary | 40% | What happened, decisions made, files touched |\n| Top observations | 50% | Highest-significance events across recent sessions |\n| Cross-project insights | 10% | Patterns from other projects (opt-in) |\n\nThe budget is dynamic — unused allocation from one section flows to the next.\n\n---\n\n## Privacy & storage\n\n**Everything stays on your machine.** No cloud services, no telemetry, no analytics, no network calls (except optional WASM grammar downloads for Tier 1).\n\n- Single SQLite file: `~/.deja/memory.db`\n- WAL journal mode for safe concurrent access\n- ~250 MB per year at heavy daily use\n- No auto-pruning by default (opt-in via `retention` setting)\n\n---\n\n## Platform support\n\n| Platform | IPC | Status |\n|----------|-----|--------|\n| macOS | Unix domain socket | Fully supported |\n| Linux | Unix domain socket | Fully supported |\n| Windows | TCP localhost:19532 | Supported (requires manual Bun install) |\n\n---\n\n## Requirements\n\n- **Bun >= 1.3.6** (auto-installed on macOS/Linux if missing)\n- **Claude Code**\n\n## Contributing\n\n```bash\ngit clone https://github.com/anandmt/deja.git\ncd deja && bun install\nbun test            # 300+ tests\nbun run build       # build to dist/\n```\n\nPipeline stages are pure functions — easy to extend. See [CLAUDE.md](CLAUDE.md) for architecture details.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}