DevMemory is a long‑term memory for AI coding agents. Make AI knowledge searchable.
Project description
DevMemory 🧠🚀
Track which AI wrote which line of code.
DevMemory automatically captures AI code attribution and makes it queryable. Know which AI tool wrote what, see diffs, and integrate with Sentry for AI-attributed error tracking.
Quick Start
# One-line install
curl -sSL https://raw.githubusercontent.com/AI-Provenance/ai-dev-memory/main/scripts/install.sh | bash
Or install manually:
# 1. Install
pip install devmemory
# 2. Setup in your repo (one-time)
cd your-project
devmemory install --mode local
# 3. That's it! Make commits normally
git commit -m "feat: new login"
# ✓ AI attribution auto-synced to SQLite
# 4. Query attributions anytime
devmemory attribution lookup src/main.py 42
devmemory attribution lookup src/main.py 42 --diff # Show git diff
Everything is automatic — no manual sync needed. After installation, every commit automatically syncs AI attribution data to local SQLite.
What You Get
🔍 Line Attribution
See who wrote any line of code:
devmemory attribution lookup src/auth.py 15
# Output:
# File: src/auth.py
# Line: 15
# Commit: abc123
# ✓ AI-generated
# Tool: opencode
# Model: opencode/trinity-large
# Prompt ID: 7a66807c780f
📝 Git Diff Integration
See the actual changes when the line was added:
devmemory attribution lookup src/auth.py 15 --diff
# Shows:
# - Which commit modified the line
# - Full git diff with syntax highlighting
# - Target line marked with "<<< TARGET LINE"
📜 Attribution History
View all commits that touched a file:
devmemory attribution history src/auth.py
🚨 Sentry Integration
Errors in production show which AI wrote the buggy code:
import sentry_sdk
from devmemory.sentry import create_before_send
sentry_sdk.init(
dsn="YOUR_SENTRY_DSN",
before_send=create_before_send(),
)
Sentry events automatically include:
ai_tool— which AI wrote the codeai_model— which model was usedcommit_sha— which commit introduced itprompt_id— link back to the original prompt
Installation Details
Prerequisites
- Python 3.10+
- Git AI — auto-installs AI attribution tracking
Setup Steps
# Install DevMemory
pip install devmemory
# Initialize in your repo
devmemory install --mode local
# What this does:
# ✓ Installs git hooks (auto-sync on every commit)
# ✓ Creates .devmemory/attributions.db (SQLite)
# ✓ Configures git-ai for prompt capture
After Installation
Just work normally:
- Make changes with AI tools (Cursor, Claude, OpenCode etc.)
- Git AI captures attribution automatically
- DevMemory syncs to SQLite after each commit
- Query anytime with
devmemory attributioncommands
No manual sync needed — it's all automatic!
Commands
Attribution Commands
| Command | Description |
|---|---|
devmemory attribution lookup <file> <line> |
Who wrote this line? |
devmemory attribution lookup <file> <line> --diff |
Show git diff for this line |
devmemory attribution show <file> |
All attributions for a file |
devmemory attribution list |
List all tracked files |
devmemory attribution history <file> |
Commit history for a file |
Utility Commands
| Command | Description |
|---|---|
devmemory status |
Check system health |
devmemory sync --latest |
Manual sync (only if needed) |
How It Works
- Capture: Git AI tracks which AI tool wrote each line
- Store: DevMemory stores attributions in local SQLite (
.devmemory/attributions.db) - Auto-sync: Git hooks sync after every commit — zero manual work
- Query: CLI commands query SQLite instantly, offline
Data stays local — works offline, no cloud required.
Cloud Mode COMING SOON...
For teams wanting advanced features:
- Semantic search across codebase
- Team analytics dashboard
- AI agent context integration
- Shared attribution database
devmemory install --mode cloud --api-key YOUR_KEY
Get API key at aiprove.org
Requirements
- Python 3.10+
- Git AI — auto-installed during setup
- SQLite — included with Python
Stop wondering "who wrote this?" — DevMemory knows.
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
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 devmemory-0.3.2.tar.gz.
File metadata
- Download URL: devmemory-0.3.2.tar.gz
- Upload date:
- Size: 149.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9920bd8d7866509aa84d57120622324b0c32059f1d32f9d78f61565c499d1ee5
|
|
| MD5 |
49f7c9985bfa6f1ce2ddba1640bb5bc3
|
|
| BLAKE2b-256 |
d165d4b3b9ac5b77e1e2a3d88f573641060df366354b1ed75535914a812f7e83
|
File details
Details for the file devmemory-0.3.2-py3-none-any.whl.
File metadata
- Download URL: devmemory-0.3.2-py3-none-any.whl
- Upload date:
- Size: 82.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46b8967de475bbf41c575c4f3174bc8966f0160fbedf9ac9b0544f1897bbefa9
|
|
| MD5 |
1bd874f6d5264a92d3c9b7cc167f7495
|
|
| BLAKE2b-256 |
c47f1dbc5905fbaff4f7729cc546c19d0aaa4b3a30102d0192d199a05cc6fffd
|