AI Blame
Git AI extends `git blame` with AI authorship attribution.
git ai blame path/to/file is a drop-in replacement for git blame that overlays AI -attribution for each line.
git ai blame <file>Arguments:
<file>- Path to the file to blame (required)- Other:
git ai blamesupports same options asgit blame.
Output Format:
The output is the same as git blame, but with the AI Authorship attribution for each line:
a731df7 Lois Tam 1) export async function login(email, password) {a731df7 Lois Tam 2) const user = await db.findByEmail(email)c0fe91a Claude Code 3) logger.info('login attempt', { email })a731df7 Lois Tam 4) if (!user) throw new AuthError('not found')b9c4e22 Cursor 5) const valid = await bcrypt.compare(b9c4e22 Cursor 6) password, user.passwordHashb9c4e22 Cursor 7) )b9c4e22 Cursor 8) if (!valid) throw new AuthError('bad creds')a731df7 Lois Tam 9) return issueSession(user)a731df7 Lois Tam 10) }
VSCode + Cursor + Windsurf + Antigravity Extension
In VSCode (and all forks of VS Code) you can see AI-blame decorations in the gutter, making it easy to spot AI-authored lines generated by different agent sessions (color coded). The extension also tells you which model generated the code and (if session saving is enabled) summaries of the prompts that generated the code.
If you have session saving enabled you can hover over the decoration to see summaries of the prompts that generated the code:
Installing the Extension
The extension should install automatically when you install Git AI, but if it doesn't you can install it manually from the Marketplace:
Official: https://marketplace.visualstudio.com/items?itemName=git-ai.git-ai-vscode
Open VSX (for VSCode Forks like Cursor): https://open-vsx.org/extension/git-ai/git-ai-vscode
Blame Modes
You can change how / when AI Blames show up in the Extension Settings OR by clicking the Git AI Status Bar Item.
Off: No decorationsLine: Only show decorations for the current line and other lines generated by the same agent session (default)All: Show decorations for all AI-authored lines, all the time.
Blame in Editor Support
| Editor | Status |
|---|---|
| VS Code | Install |
| Cursor | Install |
| Windsurf | Install |
| Antigravity | Install |
| Emacs (magit) | Install |
| JetBrains | - |
| Neovim | - |
| Eclipse | - |
| Zed | - |
Built support for another editor? Open a PR
Building an IDE plugin or Code Review Tool?
You can get access to the raw blame data as JSON using the --json flag. Just like git blame you can send dirty contents over stdin and it will be marked as Not Comitted Yet and offset the line numbers correctly so every line + agent session lines up correctly.
git ai blame <file> --json --contents [stdin]
{
"lines": {
"1": "66392557c1f4b03f",
"132": "66392557c1f4b03f",
"203": "66392557c1f4b03f",
"253-259": "66392557c1f4b03f",
"279-284": "0e120135345341dd",
},
"prompts": {
"66392557c1f4b03f": {
"agent_id": {
"tool": "cursor",
"id": "a48660d5-a9c6-43b6-856c-058424e5516a",
"model": "claude-4.5-opus-high-thinking"
},
"human_author": "Aidan Lastname <email@example.com>",
"messages": [
...
],
"total_additions": 375,
"total_deletions": 52,
"accepted_lines": 304,
"overriden_lines": 3,
"other_files": [
"src/commands/hooks/fetch_hooks.rs",
"src/git/repository.rs"
],
"commits": [
"64b9abd6b09156c9f89cb82ce40e33e51d52d1bb"
]
},
...
}