Self-curating coding preference memory for Claude Code
Project description
Engram
Self-curating coding preference memory for Claude Code.
Engram learns your coding preferences passively during Claude Code sessions, stores them with semantic deduplication, and automatically injects relevant preferences into future sessions — scoped to the language, framework, and repository you're working in.
Quick Start
# Install dependencies
just setup
# Start development server
just dev
# Open the web UI
open http://localhost:3777
How It Works
- During coding sessions — when you give feedback like "don't mock the database" or "use frozen dataclasses", Claude Code stores it via the engram MCP server
- Between sessions — engram deduplicates, resolves conflicts, and organizes preferences using semantic search and LLM-driven analysis
- At session start — a Claude Code hook injects relevant preferences into your CLAUDE.md, scoped to the project's languages and repo
Setup
Prerequisites
Installation
git clone https://github.com/DannyMor/engram.git
cd engram
just setup
# Install as background service + Claude Code hook
just install
Claude Code MCP Configuration
Add to your Claude Code settings:
{
"mcpServers": {
"engram": {
"url": "http://localhost:3777/mcp"
}
}
}
Commands
| Command | Purpose |
|---|---|
just dev |
Run in foreground with auto-reload |
just start / just stop |
Manage background service |
just status |
Check if service is running |
just logs |
Tail service logs |
just install / just uninstall |
Install/remove service + hook |
just check |
Run lint + typecheck + tests |
Configuration
Configuration lives at ~/.engram/config.yaml. Editable via the web UI settings page or directly.
llm:
provider: anthropic
model: claude-sonnet-4-6
api_key_env: ANTHROPIC_API_KEY
embedder:
provider: fastembed
model: BAAI/bge-small-en-v1.5
storage:
path: ~/.engram/data
Web UI
Open http://localhost:3777 to:
- Browse preferences with search, scope filtering, and tag filtering
- Chat with the curation agent for bulk cleanup, conflict review, and proactive suggestions
- Configure LLM provider and model settings
Architecture
Single Python process serving:
- MCP endpoint at
/mcp(HTTP transport for Claude Code) - REST API at
/api/*(backend for web UI and injection hook) - Static web UI at
/(Alpine.js + Tailwind CSS)
Memory backend: Mem0 with embedded Qdrant (local vector storage) and fastembed (local embeddings).
Development
just dev # Start dev server with auto-reload
just test # Run tests
just lint # Run ruff
just typecheck # Run pyright
just check # All three
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 engramd-0.1.1.tar.gz.
File metadata
- Download URL: engramd-0.1.1.tar.gz
- Upload date:
- Size: 180.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c943340bc1148b3266aa2b8664240d4e5dab3e06a2c759f481bbf002c6e85529
|
|
| MD5 |
82a70c0e2579ca128f706ccb6e6b0abe
|
|
| BLAKE2b-256 |
a0e0692bf201bd670b92c8f885cecb1b6898b24c5e8be6011f541ef03fdf5bb5
|
File details
Details for the file engramd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: engramd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccc7a8f3136f51d9a59c5847cf00c2649c80f68356090bcf8959f9491ab61b97
|
|
| MD5 |
6bb82b79114ce2be77f487fdaf8b00c0
|
|
| BLAKE2b-256 |
6a35cbcae0fdd0430c1b86be719ae77efdcd0a3f74ed7fcdb12bf5312e57f33a
|