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.
Metadata
Release files for devmemory 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| devmemory-0.3.2.tar.gz | 149.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| devmemory-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 232.2 kB
Release files / devmemory-0.3.2.tar.gz
| Download URL | devmemory-0.3.2.tar.gz |
|---|---|
| Size | 149.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9920bd8d7866509aa84d57120622324b0c32059f1d32f9d78f61565c499d1ee5
|
|
BLAKE2b-256 checksum How to use checksums |
d165d4b3b9ac5b77e1e2a3d88f573641060df366354b1ed75535914a812f7e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / devmemory-0.3.2-py3-none-any.whl
| Download URL | devmemory-0.3.2-py3-none-any.whl |
|---|---|
| Size | 82.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46b8967de475bbf41c575c4f3174bc8966f0160fbedf9ac9b0544f1897bbefa9
|
|
BLAKE2b-256 checksum How to use checksums |
c47f1dbc5905fbaff4f7729cc546c19d0aaa4b3a30102d0192d199a05cc6fffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|