PeterHollens/dejavu
Find code you forgot, by describing what it did.
Find code you forgot, by describing what it did.
Dejavu is a semantic code search tool that lets you find code across your projects using natural language descriptions. Instead of remembering filenames, function names, or exact keywords, just describe what the code did:
dejavu "that drag and drop kanban board"
dejavu "CSV parser that grouped by date" --lang python
dejavu "animated sidebar component" --when "last summer"Everything runs locally. Your code never leaves your machine.
pip install dejavu-codePull the embedding model:
ollama pull nomic-embed-codeFor large codebases, install the sqlite-vec extension for hardware-accelerated KNN search:
pip install "dejavu-code[vec]"Without it, Dejavu falls back to numpy-based cosine similarity (works fine for most codebases).
# 1. Initialize config
dejavu init
# 2. Edit ~/.dejavu/config.toml to set your code directories
# (defaults: ~/code, ~/projects, ~/dev, ~/src, ~/repos, ~/work)
# 3. Index your code
dejavu index
# 4. Search!
dejavu "that function that parsed CSV files and grouped them by date"dejavu index ~/projects/my-appdejavu "auth middleware" --lang python
dejavu "React component with tabs" --when "last summer"
dejavu "deployment script" --path workdejavu "auLoading reviews...