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”Line 42 of src/main.rs Content: pub fn initialize_database() -> Result<Database> { Commit: a1b2c3d (2025-01-05) Author: Jane Developer Message: feat: add database initialization
Linked Sessions: Session 7f3a2b1 (claude-code, 23 messages)
Relevant Excerpts: [User] Can you help me write a function to initialize the database? [Assistant] I'll create an initialize_database function that sets up the connection pool and runs migrations...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