Dual-layer ChromaDB + Mem0 Git commit index for Claude Code
Project description
claudememory
Dual-layer semantic index over Git commit history for Claude Code.
| Layer | Purpose |
|---|---|
| ChromaDB | 1 document/commit, cosine similarity, metadata filters — fast, authoritative facts |
| Mem0 | LLM-extracted context, cross-session learned interpretation — the why layer |
Install
pip install claudememory
No external services required — works out of the box with three embedding options:
| Mode | Setup | Cost |
|---|---|---|
| Ollama (default) | ollama pull nomic-embed-text |
Free, fully local |
| sentence-transformers | pip install "claudememory[sentence-transformers]" |
Free, fully local, no Ollama |
| OpenAI | pip install "claudememory[openai]" + OPENAI_API_KEY |
~$0.0001/commit |
Quick start
# 1. Index your repository
claude-memory index --repo-path /path/to/repo --user-id my-repo
# 2. Install Claude Code skills + MCP config
claude-memory install --repo-path /path/to/repo --user-id my-repo
# 3. Restart Claude Code — then use /claude-memory-search, /claude-memory-debug etc.
MCP tools
| Tool | Description |
|---|---|
search_git_history(query) |
Semantic search over commit history |
latest_commits(limit) |
N most-recent indexed commits |
commits_touching_file(filename) |
All commits that modified a file |
bug_fix_history(component) |
Bug/security fixes for a component |
architecture_decisions(topic) |
Refactors, migrations, design decisions |
CLI
claude-memory index --repo-path . --user-id myapp # bulk index
claude-memory serve # start MCP server (stdio)
claude-memory status --repo-path . # show coverage
claude-memory install --repo-path . --user-id myapp # install plugin
claude-memory store HEAD # store single commit (hook)
Configuration
All settings via environment variables:
| Variable | Default | Description |
|---|---|---|
CLAUDE_MEMORY_REPO_PATH |
. |
Repository to index |
CLAUDE_MEMORY_USER_ID |
claude_memory_system |
Mem0 namespace (use per-repo names) |
CLAUDE_MEMORY_CHROMA_DIR |
~/.cache/claude_memory/chroma_commits |
ChromaDB storage path |
CLAUDE_MEMORY_EMBED_PROVIDER |
ollama |
Embedding backend: ollama, openai, sentence-transformers |
CLAUDE_MEMORY_EMBED_MODEL |
(provider default) | Override embedding model name |
CLAUDE_MEMORY_LLM_MODEL |
(provider default) | Override LLM model name (Mem0 layer) |
OPENAI_API_KEY |
(empty) | Enables OpenAI embeddings + LLM automatically |
MEM0_API_KEY |
(empty) | Use Mem0 cloud instead of local inference |
OLLAMA_URL |
http://localhost:11434 |
Ollama endpoint |
Works great alongside GitNexus
- GitNexus answers what calls what (structural, live code)
- claudememory answers why it was written that way (historical, commit-level)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
claudememory-0.1.2.tar.gz
(17.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claudememory-0.1.2.tar.gz.
File metadata
- Download URL: claudememory-0.1.2.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22aa83b0393edf1bd9807f06457f1bdc7d2fab22bbc109c60875185fe1c96dc
|
|
| MD5 |
74b633b496bc49628095310a4760b363
|
|
| BLAKE2b-256 |
051bc0a710dadc1411192bd47d1c071f7dd97448b5af1e0cdc5a65368bf78c5b
|
File details
Details for the file claudememory-0.1.2-py3-none-any.whl.
File metadata
- Download URL: claudememory-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f6c4145d03bcfce7bc1d6dc9b7b5807ebea61dd3be5b121213f8e5133c40d8a
|
|
| MD5 |
35b8cf1c48340e44e1e5f9f21c6a9fc2
|
|
| BLAKE2b-256 |
61da63111f7f7ba4ffad0693a7c156ce68594758801f13acaf5aee88cb7e250c
|