SuperAPI AI Directory

deja-vu

Local memory over session histories from Claude Code, Codex CLI and opencode: lexical search, session-start auto-recall, secret redaction and SSH sync.

Open website Compare
PricingOpen sourceGitHub 开源项目 · 1,725 Stars
GitHub stars1,725GitHub

Sources: GitHub

About this tool

deja-vu is a local tool that provides memory capabilities for coding agents. It uses the session histories that 42 agents such as Claude Code, Codex, and Cursor have already saved to disk, builds an index, and keeps agents from repeatedly debugging problems that have already been fixed.

Purpose

Coding agents save their history to disk in every session. deja-vu indexes all of this history (going back months) and hands the relevant parts to the current agent while it works. This way, a fix discovered in Codex can be reused in Claude Code, Cursor, or opencode, and all 42 agents read the same index.

Main capabilities

  • Local search: Run deja in the terminal to open the search interface, where you can search the history of all agents. Supports filtering by agent (e.g. codex:), time (today、yesterday、week、month), and project (in:<project>).
  • Automatic recall at session start: Automatically provides recall at the start of a session, before editing files, before running commands, and after a command fails, with no need to ask manually.
  • Indexes work content: Indexes not only conversations, but also the files opened in each turn, commands with exit statuses, and the exact ranges of edit replacements.
  • Status markers:deja promote <id> --state rejected can mark decisions that were reverted, and later hits will explain that the decision was tried and why it was abandoned;--state accepted can undo the marker.
  • Local and private: No model, no embeddings, no server. When the index is built, secrets and tokens are stripped and replaced with [redacted:<kind>], while the surrounding text remains searchable.
  • Cross-machine sync:deja sync ssh laptop can sync between machines without a cloud service;deja handoff --to codex can switch to another agent to continue.
  • Single Go binary: Supports macOS, Linux, and Windows, and can be installed via Homebrew, Scoop, winget, npm, or go install.
  • Optional semantic recall: Point DEJA_EMBED_URL at a local Ollama, LM Studio, or OpenAI-compatible endpoint, and rewritten queries can also hit. When it is not set, lexical search and MCP recall work as usual.

Usage

On macOS and Linux, the install script places the binary in ~/.local/bin. If that directory is not in PATH, you need to run the next line of command printed by the script or open a new shell. After installation, run the second command to connect MCP recall to all detected agents, enable session-start recall on supported agents, and build the first index.

Start a new agent session and ask about work done months ago, for example: have we dealt with jwt refresh rotation before? check your memory

You can also run deja directly to search on your own. Other installation methods include:

  • brew install deja-vu
  • go install github.com/vshulcz/deja-vu/cmd/deja@latest
  • npx @vshulcz/deja-vu "query"(try it without installing)

On Windows, the install script exits because it is not supported; you can use Scoop or winget, or download deja-vu_<version>_windows_amd64.zip from the latest release and put deja.exe into PATH.

Searching can be done with the binary alone: indexing, searching,show、ctx、blame、--json , and redaction do not require any other components.deja install is used to connect MCP to agents and enable session-start recall, and is optional.deja warmup will leave a skill file in ~/.agents/skills/deja-search/SKILL.md to teach agents to use the CLI contract.

Use cases

  • A coding agent needs to recall problems already solved in past sessions.
  • Share fixes and decisions across multiple agents.
  • Need local, private session history search without relying on a cloud service.
  • Need to sync session memory across different machines.

Limitations

  • Indexing and searching are local operations; the network is only used for deja update、deja sync ssh、deja doctor version checks in ,deja embed as well as the once-daily latest version check in interactive commands.DEJA_OFFLINE=1 or DEJA_NO_UPDATE_NOTICE=1 can be disabled.
  • Redaction cannot capture all sensitive information; the source transcript still retains the original content;deja secrets can list sessions containing secrets without printing the values,deja secrets --scrub can rewrite the parts that can be handled.
  • Semantic recall requires an accessible embedding endpoint; if no runtime is available, it falls back to lexical search.
  • TRAE IDE's chat history is in an encrypted database and can only be accessed via MCP and skills; hooks need to be manually enabled in settings.
  • Some agents do not support user-level instruction files or session-start recall mechanisms.
  • Specific fees, prices, and platform support details are not yet provided.