[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93344":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":38,"discoverSource":39},93344,"deja-vu","vshulcz\u002Fdeja-vu","vshulcz","Memory layer for coding agents: search, MCP recall, auto-context, secret redaction, stats, share and sync over the session logs Claude Code, Codex and opencode already write. One zero-dep binary.","https:\u002F\u002Fvshulcz.github.io\u002Fdeja-vu\u002F",null,"Go",399,20,2,10,0,116,42,73.97,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,33,34],"ai-agents","claude-code","cli","codex","developer-tools","go","mcp","memory","opencode","search","2026-07-22 04:02:08","\u003Cp align=\"center\">\u003Cimg src=\"assets\u002Flogo.svg\" width=\"340\" alt=\"deja-vu\">\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Cstrong>Your agents already solved this. deja finds it.\u003C\u002Fstrong>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Ca href=\"https:\u002F\u002Fvshulcz.github.io\u002Fdeja-vu\u002F\">vshulcz.github.io\u002Fdeja-vu\u003C\u002Fa>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fvshulcz\u002Fdeja-vu\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fvshulcz\u002Fdeja-vu\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"CI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fvshulcz\u002Fdeja-vu\u002Freleases\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fvshulcz\u002Fdeja-vu\" alt=\"Release\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@vshulcz\u002Fdeja-vu\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F%40vshulcz%2Fdeja-vu?label=npm\" alt=\"npm\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fscorecard.dev\u002Fviewer\u002F?uri=github.com\u002Fvshulcz\u002Fdeja-vu\">\u003Cimg src=\"https:\u002F\u002Fapi.scorecard.dev\u002Fprojects\u002Fgithub.com\u002Fvshulcz\u002Fdeja-vu\u002Fbadge\" alt=\"OpenSSF Scorecard\">\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\" alt=\"MIT License\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Cimg src=\"assets\u002Fdemo.gif\" alt=\"deja demo\">\u003C\u002Fp>\n\nClaude Code, Codex, opencode, aider, Gemini CLI, Cursor, Antigravity and Grok Build write every conversation to local files — gigabytes of debugged problems and design decisions you can't search. deja is a zero-dependency binary that turns those histories into a memory layer:\n\n| | |\n| --- | --- |\n| **Search** | `deja \"connection pool exhausted\"` — ~12 ms over gigabytes, retroactive: months of logs from before you installed it |\n| **Agent recall** | MCP `recall` tool — the agent answers *\"we fixed this three weeks ago\"* instead of re-debugging, across harnesses |\n| **Auto-recall** | `install --auto` adds a SessionStart hook: relevant memory lands in context before you ask |\n| **Redaction** | API keys, JWTs, private keys are stripped at index time — the cache is safe to keep |\n| **Stats** | `deja stats` — your agent work, wrapped: harnesses, top projects, activity sparkline |\n| **Share** | `deja share \u003Cid>` — hand a colleague a sanitized digest of a session, secrets already scrubbed |\n| **Sync** | `deja sync export\u002Fimport` — move memory between machines, append-only, idempotent |\n\nOne binary. No models to download, no services to run, nothing leaves your machine unless you sync or share it. (opencode and Cursor IDE indexing shell out to the `sqlite3` CLI, preinstalled on macOS and most Linux distros; Cursor CLI transcripts do not need it.)\n\n## Install\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fvshulcz\u002Fdeja-vu\u002Fmain\u002Finstall.sh | sh\n```\n\nor:\n\n```sh\ngo install github.com\u002Fvshulcz\u002Fdeja-vu\u002Fcmd\u002Fdeja@latest   # Go\nnpx @vshulcz\u002Fdeja-vu \"query\"                            # npm, no install\nbrew install vshulcz\u002Ftap\u002Fdeja-vu                        # Homebrew\n```\n\nWire it into the agents you use (edits config, keeps a `.bak`):\n\n```sh\ndeja install --all     # MCP recall for every agent it finds on this machine\ndeja install --auto    # same, plus session-start auto-recall where supported\n```\n\nOn a terminal, install reports whether it found local history and points to `deja index` when the first index still needs to be built.\n\nThat's it. Next session, ask your agent:\n\n> have we dealt with jwt refresh rotation before? check your memory\n\n— or with `--auto`, don't ask: the agent starts each session already knowing what you solved in that project.\n\n## CLI\n\n```text\n$ deja \"jwt refresh token\"\n[claude] api        · Jul 8 · 8f31c0a9 — 2 matches\n  login started failing after refresh token rotation; jwt kid mismatch in tests\n  fixed by reloading jwks cache after rotateKey and adding a clock-skew test\n[codex]  web        · Jul 1 · b77d91e2 — 1 match\n  refresh token cookie needed SameSite=Lax in local callback flow\n```\n\n| Command | What it does |\n| --- | --- |\n| `deja \u003Cquery>` | Search all histories. Multi-word = AND, substrings match (`code` finds `opencode`). `--re`, `--harness`, `--project`, `--since 30d`, `--role`, `--json`. |\n| `deja ctx \u003Cquery>` | Compact markdown digest of the best match — pipe it into a prompt. |\n| `deja share \u003Cid>` | Sanitized session digest for a colleague: secrets redacted, tool noise stripped. |\n| `deja stats` | Totals, per-harness split, top projects, monthly sparkline. `--json` too. |\n| `deja doctor [--json]` | Self-diagnosis: store parse state, sqlite3 presence, MCP wiring per agent, index health, version; `--json` emits the same checks for scripts. |\n| `deja sync export \u003Cdir> [--full]` \u002F `import \u003Cdir>` \u002F `ssh \u003Chost> [--pull]` | Move memory between machines — via a shared folder or one ssh command. Watermarked, append-only, idempotent. |\n| `deja show \u003Cid>` \u002F `deja last [n]` | Read one session \u002F list recent ones. |\n| `deja resume \u003Cid> [--exec]` | Reopen a found session in its native harness (`claude --resume`, `codex resume`, `opencode -s`, `grok --resume`). |\n| `deja sources` | Discovered stores, sizes, message and redaction counts. |\n| `deja mcp` | The stdio MCP server (what `deja install` wires in). |\n| `deja warmup` | Build\u002Frefresh the index without searching — handy in cron or shell startup. |\n| `deja index [--rebuild]` | Same as warmup; `--rebuild` forces a full rebuild. Cold builds narrate per-harness progress. |\n| `deja update` | Download the latest GitHub release, verify its checksum, and replace the current binary. |\n| `deja statusline` | One line for your status bar: recalls served to agents today. `deja install statusline` wires it into Claude Code (won't touch an existing statusline). |\n\n`deja update` is for standalone installs. Homebrew and npm installs update through the package manager.\n\n### Doctor JSON\n\n`deja doctor --json` reports an explicit state for every check and exits 0 even when it finds a problem. Store states are `ok`, `missing`, `empty`, `unreadable`, or `parsed-zero`; the last state means session files exist but the newest file produced no sessions.\n\n```json\n{\n  \"stores\": [{\"name\": \"claude\", \"state\": \"ok\", \"paths\": [\"\u002Fhome\u002Fme\u002F.claude\u002Fprojects\"], \"files\": 42}],\n  \"index\": {\"state\": \"stale\", \"path\": \"\u002Fhome\u002Fme\u002F.cache\u002Fdeja\u002Findex.db\"},\n  \"mcp\": [{\"name\": \"claude-code\", \"state\": \"wired\", \"path\": \"\u002Fhome\u002Fme\u002F.claude.json\"}],\n  \"sqlite3\": {\"state\": \"ok\"},\n  \"version\": {\"state\": \"ok\", \"current\": \"1.2.3\", \"latest\": \"1.2.3\"}\n}\n```\n\nIndex states are `ok`, `missing`, or `stale`; MCP states are `wired`, `not-wired`, or `config-missing`. The sqlite3 state is `ok` or `missing`. Version state is `ok`, `update-available`, `ahead`, `dev`, or `unknown`.\n\nContext piping without MCP:\n\n```sh\nclaude \"Prior context: $(deja ctx 'database migration')\"\n```\n\n## Sync between machines\n\nPoint both machines at one shared folder (Syncthing, iCloud, a git repo — anything that moves files):\n\n```sh\ndeja sync export ~\u002FSync\u002Fdeja   # machine A: appends new batches since last export\ndeja sync import ~\u002FSync\u002Fdeja   # machine B: picks up what it hasn't seen\n```\n\nOr skip the shared folder when the other machine is a ssh hop away:\n\n```sh\ndeja sync ssh mini          # push new records to mini and import them there\ndeja sync ssh mini --pull   # fetch mini's new records into this machine\n```\n\n`ssh` mode uses your system ssh\u002Fscp and the `deja` binary on the remote (looked up on PATH, falling back to `~\u002F.local\u002Fbin\u002Fdeja`).\n\nBatches are plain JSONL, redacted on the way out. Import is idempotent, so keep the folder as an append-only log and run both commands from cron if you like. Records never echo back to their origin. `--full` re-exports everything regardless of watermarks — useful when adding a machine after old batches are gone. Synced sessions show up under `imported:\u003Cproject>` in search, `recall`, and session-start auto-recall.\n\n## Teach your agent to remember\n\n`deja install --all` wires up MCP recall (Claude Code, Codex, opencode, Cursor, Gemini CLI, Antigravity, Grok Build — aider has no MCP client, pipe `deja ctx` instead); `deja install --auto` does the same and adds session-start auto-recall where the harness supports it (Claude Code hook, Codex hooks.json, an opencode plugin — Cursor, Gemini CLI, Antigravity and Grok Build have no hook that can inject context, so MCP is their full install). To make\nthe agent reach for memory on its own, add this to your `CLAUDE.md` \u002F\n`AGENTS.md`:\n\n```\nBefore debugging or re-implementing something, run `deja \"\u003Cquery>\"` (or the\nMCP recall tool) — past agent sessions across Claude Code, Codex, opencode, aider, Gemini CLI, Cursor, Antigravity and Grok Build\nare indexed locally. Cite what you reuse.\n```\n\n## MCP tools\n\n| Tool | Arguments | Returns |\n| --- | --- | --- |\n| `recall` | `query`, `harness?`, `limit?` | Dense matching snippets, ≤4KB — cheap on context. |\n| `recall_context` | `query`, `harness?` | Markdown digest of the best-matching session. |\n\nWith `--auto`, a SessionStart hook also feeds the current project's recent memory in automatically — read-only, capped at 2KB, and it never delays or breaks agent startup.\n\n## Security\n\nSubagent transcripts are skipped by default (they mostly duplicate the parent session); set `DEJA_INCLUDE_SUBAGENTS=1` to index them. Files caught mid-write are handled safely — the torn tail line is picked up on the next pass.\n\nCredentials are redacted at index time: AWS keys, generic `api_key=`\u002F`token=` assignments, bearer tokens and raw JWTs, PEM private key blocks, provider tokens (`ghp_`, `sk-`, `npm_`, `xox.`, `AIza`), and `scheme:\u002F\u002Fuser:pass@host` URLs. The value is replaced with `[redacted:\u003Ckind>]`; surrounding text stays searchable. `deja sources` shows per-store counts. Opt out with `DEJA_NO_REDACT=1` (unsafe). `deja share` and `deja sync export` re-apply redaction on the way out.\n\nThe [security model](docs\u002FSECURITY-MODEL.md) documents data flows, redaction\nlimits, trust assumptions, and release verification.\n\n## Supported harnesses\n\n| Harness | Store | Status |\n| --- | --- | --- |\n| Claude Code | `~\u002F.claude\u002Fprojects\u002F**\u002F*.jsonl` | ✅ |\n| Codex CLI | `~\u002F.codex\u002Fsessions\u002F**` + `history.jsonl` | ✅ |\n| opencode | `~\u002F.local\u002Fshare\u002Fopencode\u002Fopencode.db` | ✅ |\n| aider | `.aider.chat.history.md` | ✅ |\n| Gemini CLI | `~\u002F.gemini\u002Ftmp\u002F*\u002Fchats\u002F**` | ✅ |\n| Cursor | `state.vscdb` + `~\u002F.cursor\u002Fprojects\u002F**\u002Fagent-transcripts\u002F*.jsonl` | ✅ |\n| Antigravity | `~\u002F.gemini\u002Fantigravity*\u002Fbrain\u002F*\u002F.system_generated\u002Flogs\u002Ftranscript.jsonl` | ✅ |\n| Grok Build | `~\u002F.grok\u002Fsessions\u002F**\u002Fupdates.jsonl` | ✅ |\n\nCustom locations via `DEJA_CLAUDE_ROOT`, `DEJA_CODEX_ROOT`, `DEJA_OPENCODE_DB`, `DEJA_AIDER_ROOTS`, `DEJA_GEMINI_ROOT`, `DEJA_CURSOR_ROOT`, `DEJA_CURSOR_CLI_ROOT`, `DEJA_ANTIGRAVITY_ROOT`, `DEJA_GROK_ROOT`, `DEJA_INDEX_DIR`. Each agent's own relocation variable is honored too: `CLAUDE_CONFIG_DIR`, `CODEX_HOME`, `GEMINI_CLI_HOME`, `CURSOR_CONFIG_DIR`, `GROK_HOME`, `AIDER_CHAT_HISTORY_FILE`, and `XDG_DATA_HOME` for opencode on Linux.\n\n`DEJA_RECALL=safe` is the default: SessionStart recall stays in the current project, filters weak or duplicate results, prefers the last 90 days, and injects at most 2KB. `DEJA_RECALL=aggressive` searches across projects and raises the injection cap to 4KB. `DEJA_RECALL=off` disables SessionStart recall output.\n\n### Session format registry\n\nThe [session format registry](docs\u002Fregistry\u002FREADME.md) documents the observed store paths, record schemas, role mapping, timestamps, and compatibility notes for each supported harness. Synthetic fixtures keep those descriptions checked against the parsers.\n\n## Performance\n\nMeasured on a real corpus — 1,250+ sessions, ~3.3GB across three harnesses:\n\n| | |\n| --- | --- |\n| Warm search | **~12 ms** typical, ~25 ms worst-case |\n| Cold index (once) | ~10 s |\n| Index size | ~2.4% of corpus |\n\nThe index is incremental: when a session file grows, only that file is re-read.\n\n## How it works\n\nLocal inverted index in `~\u002F.cache\u002Fdeja`: parse JSONL\u002FSQLite stores → redact credentials → `records.bin` + token buckets → `manifest.json` tracks per-file state so repeat runs only ingest what changed. The MCP server, stats, share and sync all read the same index. Details: [docs\u002FARCHITECTURE.md](docs\u002FARCHITECTURE.md).\n\n**Privacy:** no network path exists in the indexing or search code. Local files in, local cache out.\n\n## FAQ\n\n**Does anything leave my machine?** Indexing and search are local. `deja update` downloads releases from GitHub, and user-invoked `deja sync ssh` transfers redacted batches through the system SSH client. Directory exports and shares go only to the destination you choose. See the [security model](docs\u002FSECURITY-MODEL.md#data-flows) for the full data flow.\n\n**How is this different from cass?**\n[cass](https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fcoding_agent_session_search) is the kitchen-sink take on session search: 22 providers, Rust, optional semantic embeddings, a TUI. deja is the opposite bet — one small Go binary, pure lexical, eight harnesses, zero setup — plus the memory-layer pieces around it: auto-recall, redaction, share, sync.\n\n**And from MemPalace \u002F Mem0 \u002F Letta?**\nThose are memory *platforms*: embeddings, vector stores, capture hooks or APIs that record going forward. deja has no capture step at all — it indexes what your agents already wrote to disk, including months of history from before you installed it. They can coexist.\n\n**What about secrets already in my logs?** They stay in the original harness files (that's your agent's data), but they don't enter deja's index, digests, shares or sync exports.\n\n**What about Windows?** Builds exist, CI runs the suite on Windows; macOS\u002FLinux are the battle-tested paths. Field reports welcome: [#9](https:\u002F\u002Fgithub.com\u002Fvshulcz\u002Fdeja-vu\u002Fissues\u002F9).\n\n**Can I exclude a project?** Not yet — planned as `--exclude` ([#8](https:\u002F\u002Fgithub.com\u002Fvshulcz\u002Fdeja-vu\u002Fissues\u002F8)). Today you can point `DEJA_*_ROOT` at a filtered copy.\n\n**How do I wipe everything?**\n\n```sh\ndeja uninstall --all\nrm -rf ~\u002F.cache\u002Fdeja\n```\n\n## Contributing\n\n`make build test lint` — see [CONTRIBUTING.md](CONTRIBUTING.md). Adding a harness starts in the [parser registry](docs\u002FARCHITECTURE.md#source-parsers). Current priorities and non-goals are in [ROADMAP.md](ROADMAP.md). Good first issues are labeled.\n\n## License\n\nMIT © [Vladislav Shulcz](https:\u002F\u002Fgithub.com\u002Fvshulcz)\n","deja-vu 是一个面向 AI 编程代理（如 Claude Code、Codex、opencode）的本地会话记忆层工具，提供轻量级、零依赖的 CLI 二进制程序。它支持毫秒级全文搜索、MCP 协议 recall 能力、自动上下文注入、敏感信息红acted（API 密钥等）、会话统计、安全分享与跨设备同步。所有处理在本地完成，无需运行服务或下载模型，兼容主流代理生成的日志文件格式。适用于开发者团队需复用历史调试经验、避免重复问题排查、提升 AI 编程效率的本地开发场景。","2026-07-17 02:30:03","CREATED_QUERY"]