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
Requires Ollama running locally with nomic-embed-text pulled:
ollama pull nomic-embed-text
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 |
MEM0_API_KEY |
(empty) | Use Mem0 cloud instead of local Ollama |
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
git_memory-0.1.0.tar.gz
(16.7 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 git_memory-0.1.0.tar.gz.
File metadata
- Download URL: git_memory-0.1.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7730bafa6fc42e9840b637b976c16b61f5faf9b6c123005f0204a8d1b0d70043
|
|
| MD5 |
3545e7e47ea8df1288cdbecbd190f872
|
|
| BLAKE2b-256 |
595b149faa082e09ea487a53c66507fbf3ba2fc3ac87b394468c9e17e9262c7f
|
File details
Details for the file git_memory-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_memory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.0 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 |
fdd1d930b72900574ece9349784704a2844690dfb0ae0faebbdc16e9b33eca78
|
|
| MD5 |
fb18e6c39d4a3bc19bb7f9040185817b
|
|
| BLAKE2b-256 |
d9c67ac9e44c2e5778ee1a1dbdbf7140757b1d93a966707d1f69d20d32112c29
|