Local git intelligence daemon for AI agents. Pre-indexes blame, commit history, co-change patterns, and authorship data, then serves them as millisecond-latency queries over MCP.
Replaces the 3–5 git log/blame/show commands an AI agent runs every time it needs to understand code history — one query instead of a chain.
go install github.com/jeffdhooton/lore/cmd/lore@latestOr build from source:
git clone https://github.com/jeffdhooton/lore.git
cd lore
go build ./cmd/lore# Index the current repo (blame every file + last 500 commits)
lore init
# Who wrote lines 40–60 of server.go?
lore blame server.go --start-line 40 --end-line 60
# What changed in this file recently?
lore history server.go
# What files usually change alongside auth.go?
lore cochange auth.go
# What are the most-churned files?
lore hotspots
# Who are the main authors?
lore contributors
# Why does line 45 exist?
lore intent server.go --line 45
# Register with Claude Code
lore setuplore init shells out to git blame --porcelain and git log --numstat to build a structured index in BadgerDB. A background daemon (lored) keeps the index resident in memory and serves queries over a Unix socket using JSON-RPC 2.0.
On first query, the daemon auto-spawns — no manual lore start required.
After indexing, the daemon watches .git/refs/heads/ for new commits and re-indexes automatically.
| Command | Description |
|---|---|
lore init [path] |
Index a git repository |
lore blame <file> |
Structured blame data per line |
lore history [file] |
Recent commits with context |
lore cochange <file> |
Files that change alongside target |
lore hotspots |
Most-churned files by commit count |
lore contributors [file] |
Main authors ranked by contribution |
lore intent <file> --line N |
Commit message + context for a line |
lore status |
Show indexed repos and daemon state |
lore setup |
Register with Claude Code (MCP + skill) |
lore doctor |
Health checks |
lore start/stop |
Manual daemon lifecycle |
lore mcp |
MCP stdio server (launched by Claude Code) |
All commands output JSON by default. Add --pretty for human-readable formatting.
lore setupThis registers lore as an MCP server and installs a routing skill so Claude Code automatically uses lore queries instead of raw git commands. After setup, restart Claude Code.
| Tool | Use case |
|---|---|
lore_blame |
"Who wrote this code?" |
lore_history |
"What changed recently?" |
lore_cochange |
"What else should I update?" |
lore_hotspots |
"Where is the risk?" |
lore_contributors |
"Who should review this?" |
lore_intent |
"Why does this code exist?" |
lore_status |
"Which repos are indexed?" |
┌────────────┐ Unix socket ┌──────────┐ BadgerDB
│ lore CLI │ ──── JSON-RPC 2.0 ──→│ lored │ ──→ per-repo index
│ lore mcp │ │ (daemon) │ ~/.lore/repos/<hash>/
└────────────┘ └──────────┘
│
fsnotify on
.git/refs/
- One binary, two modes: CLI client + daemon (same binary, auto-spawned)
- BadgerDB with Snappy compression for the per-repo index
- fsnotify watches
.git/refs/heads/and.git/HEADfor automatic re-indexing - No CGO — single static binary, cross-compiles freely
git blame --porcelainon every tracked file at HEAD (parallel, capped at NumCPU workers)git log --numstatfor the last 500 commits (configurable via--depth)- Co-change pairs derived from commits (skipping bulk commits touching 50+ files)
- Churn stats and per-file contributor aggregation
A typical repo indexes in under a second. Queries return in under 10ms.
--repo <path> Override the repo root (defaults to cwd)
--pretty Pretty-print JSON output
--depth <n> Commits to index (default 500, 0 = all)
--start-line <n> Filter blame from this line
--end-line <n> Filter blame to this line
--limit <n> Max results for history/hotspots/cochange
--line <n> Line number for intent queries
A collection of local-first, single-binary dev tools built for AI coding agents. All share the same architecture: Go, no CGO, BadgerDB, daemon over Unix socket, MCP stdio, millisecond-latency queries. Free, local-only, no cloud.
| Tool | What it does | Status |
|---|---|---|
| scry | Code intelligence — symbols, refs, call graphs, impls, test coverage | Shipped |
| flume | Runtime visibility — HTTP requests, SQL queries, exceptions from dev servers | P0 shipped |
| tome | Schema awareness — DB schemas, API shapes, ORM models, enums | P0 shipped |
| lore | Git intelligence — blame, history, co-change patterns, hotspots | P0 shipped |
- Go 1.23+
giton PATH
MIT