deja-vu

Your agents already solved this. deja finds it.

vshulcz.github.io/deja-vu

vshulcz.github.io/deja-vu

CI

Release

npm

OpenSSF Scorecard

MIT License

deja demo

Claude Code, Codex and opencode 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:

One binary. No models to download, no services to run, nothing leaves your machine. (opencode indexing shells out to the sqlite3 CLI, preinstalled on macOS and most Linux distros.)

Install

or:

Wire it into the agents you use (edits config, keeps a .bak):

That's it. Next session, ask your agent:

have we dealt with jwt refresh rotation before? check your memory

— or with --auto, don't ask: the agent starts each session already knowing what you solved in that project.

CLI

Context piping without MCP:

Sync between machines

Point both machines at one shared folder (Syncthing, iCloud, a git repo — anything that moves files):

Or skip the shared folder when the other machine is a ssh hop away:

ssh mode uses your system ssh/scp and the deja binary on the remote (looked up on PATH, falling back to ~/.local/bin/deja).

Batches 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:<project> in search, recall, and session-start auto-recall.

Teach your agent to remember

deja install --all wires up MCP recall and the session-start hook. To make

the agent reach for memory on its own, add this to your CLAUDE.md /

AGENTS.md:

MCP tools

With --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.

Security

Credentials are redacted at index time: AWS keys, generic api_key=/token= assignments, bearer tokens and raw JWTs, PEM private key blocks, provider tokens (ghp_, sk-, npm_, xox., AIza), and scheme://user:pass@host URLs. The value is replaced with [redacted:<kind>]; 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.

Supported harnesses

#6

#7

Custom locations via DEJA_CLAUDE_ROOT, DEJA_CODEX_ROOT, DEJA_OPENCODE_DB, DEJA_INDEX_DIR.

Performance

Measured on a real corpus — 1,250+ sessions, ~3.3GB across three harnesses:

The index is incremental: when a session file grows, only that file is re-read.

How it works

Local inverted index in ~/.cache/deja: parse JSONL/SQLite 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/ARCHITECTURE.md.

docs/ARCHITECTURE.md

Privacy: no network path exists in the indexing or search code. Local files in, local cache out.

FAQ

Does anything leave my machine? No. There is no network code in the tool. sync writes files to a directory you choose; moving them is up to you.

How is this different from cass?

cass 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, three harnesses, zero setup — plus the memory-layer pieces around it: auto-recall, redaction, share, sync.

cass

And from MemPalace / Mem0 / Letta?

Those 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.

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.

What about Windows? Builds exist, CI runs the suite on Windows; macOS/Linux are the battle-tested paths. Field reports welcome: #9.

#9

Can I exclude a project? Not yet — planned as --exclude (#8). Today you can point DEJA_*_ROOT at a filtered copy.

#8

How do I wipe everything?

Contributing

make build test lint — see CONTRIBUTING.md. Adding a harness is one parser file: docs/ARCHITECTURE.md. Good first issues are labeled.

CONTRIBUTING.md

docs/ARCHITECTURE.md

License

MIT © Vladislav Shulcz

Vladislav Shulcz