lore blame
Connect git blame to your AI reasoning history. For any line of code, trace back to the conversation that produced it.
lore blame <FILE:LINE> [OPTIONS]Examples
Section titled “Examples”# Find the session that produced line 42 of main.rslore blame src/main.rs:42
# Output as JSON for scriptinglore blame src/lib.rs:100 --format json
# Output as markdownlore blame src/lib.rs:100 --format markdownSample Output
Section titled “Sample Output”$ lore blame src/auth.rs:42
Commit: a1b2c3d4 <username> 2025-12-15 14:30 feat: add rate limiting to login endpoint
Line content: if attempts > 5 { return Err(RateLimitExceeded) }
Linked sessions (1):
f8e7d6c5 claude-code (127 messages) Started: 2025-12-15 13:45 Relevant context: ...decided on 5 attempts as the threshold based on industry standards... Let me add rate limiting to prevent brute force attacks.How It Works
Section titled “How It Works”- Runs
git blameto find the commit that introduced the specified line - Looks up sessions linked to that commit in the Lore database
- Searches session messages for content mentioning the file or related code
- Displays relevant excerpts from the conversation
Options
Section titled “Options”| Option | Description |
|---|---|
-f, --format <FMT> | Output format: text, json, markdown |
JSON Output
Section titled “JSON Output”lore blame src/main.rs:42 --format json{ "file": "src/main.rs", "line": 42, "content": "pub fn initialize_database() -> Result<Database> {", "commit": { "sha": "a1b2c3d...", "author": "Jane Developer", "date": "2025-01-05T14:30:00Z", "message": "feat: add database initialization" }, "sessions": [ { "id": "7f3a2b1...", "tool": "claude-code", "message_count": 23 } ], "excerpts": [ { "role": "user", "content": "Can you help me write a function to initialize the database?" }, { "role": "assistant", "content": "I'll create an initialize_database function..." } ]}Requirements
Section titled “Requirements”- The file must be tracked by git
- The line must exist in the current version of the file
- For full context, the commit should have linked sessions
Without linked sessions, blame still shows commit information but cannot provide AI conversation context.
See Also
Section titled “See Also”- lore link - Link sessions to commits
- lore show - View full session
- Using Blame Guide - Detailed examples