Dual-layer ChromaDB + Mem0 Git commit index for Claude Code
Project description
git-memory
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 git-memory
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 "git-memory[sentence-transformers]" |
Free, fully local, no Ollama |
| OpenAI | pip install "git-memory[openai]" + OPENAI_API_KEY |
~$0.0001/commit |
Quick start
# 1. Index your repository
git-memory index --repo-path /path/to/repo --user-id my-repo
# 2. Install Claude Code skills + MCP config
git-memory install --repo-path /path/to/repo --user-id my-repo
# 3. Restart Claude Code — then use /git-memory-search, /git-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
git-memory index --repo-path . --user-id myapp # bulk index
git-memory serve # start MCP server (stdio)
git-memory status --repo-path . # show coverage
git-memory install --repo-path . --user-id myapp # install plugin
git-memory store HEAD # store single commit (hook)
Configuration
All settings via environment variables:
| Variable | Default | Description |
|---|---|---|
GIT_MEMORY_REPO_PATH |
. |
Repository to index |
GIT_MEMORY_USER_ID |
git_memory_system |
Mem0 namespace (use per-repo names) |
GIT_MEMORY_CHROMA_DIR |
~/.cache/git_memory/chroma_commits |
ChromaDB storage path |
GIT_MEMORY_EMBED_PROVIDER |
ollama |
Embedding backend: ollama, openai, sentence-transformers |
GIT_MEMORY_EMBED_MODEL |
(provider default) | Override embedding model name |
GIT_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)
- git-memory 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.0.tar.gz
(16.2 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.0.tar.gz.
File metadata
- Download URL: claudememory-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
113b28f1d5d7daf2066c6e4ed02cdd2431d83a404371212d1fe3f9f9ea8debc6
|
|
| MD5 |
00fc83b08d2d088247b3d578214b59c7
|
|
| BLAKE2b-256 |
95226a4965203965b1f899e0ae71d6d5ed434437cec7ce6ddcff8579e23cf5f6
|
File details
Details for the file claudememory-0.1.0-py3-none-any.whl.
File metadata
- Download URL: claudememory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 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 |
0cf455002ea596a35bd91e9b982838f34084e6285530a21443df82c14bd255dc
|
|
| MD5 |
aad6f786f9bbc3133dedc0bed0dafde8
|
|
| BLAKE2b-256 |
a7875b558e3bd065b38f17b7bf964b965cd2890e4cc0da1a8b7f98250691f952
|