Git AI

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 includes the AI authorship attribution for each line.

git-ai blame <file>

Arguments:

  • <file> - Path to the file to blame (required)

Options: API Compatible with git blame supports same options as git blame.

Output Format: The output is the same as git blame, but with the AI Authorship attribution for each line:

Git AI Blame

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 prompts (color coded). The extension also tells you which model generated the code and (if prompt storage is enabled) the prompt that generated the code.

Git AI Blame VSCode

If you have prompt storage enabled you can hover over the decoration to see the prompt that generated the code:

Git AI Blame VSCode

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 decorations
  • Line: Only show decorations for the current line and other lines generated by the same prompt (default)
  • All: Show decorations for all AI-authored lines, all the time.

JetBrains suite

Not supported yet. Open a PR or set up a call if you want to help!

Neovim

Not supported yet. Open a PR or set up a call if you want to help!

Emacs

Not supported yet. Open a PR or set up a call if you want to help!

Eclipse

Not supported yet. Open a PR or set up a call if you want to help!

Zed

Not supported yet. Open a PR or set up a call if you want to help!


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 + prompt 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"
      ]
    },
    ...
  }