What it does
agentdiff installs hooks into the AI coding agents on your machine and, for each commit, writes an attribution record into the repository. A record holds the agent name, the model, an excerpt of the prompt and the exact line ranges, signed with ed25519. Records are queried from the command line with commands such as list, blame, diff, context and report, and can be pushed to per-branch refs on origin. Supported agents are Claude Code, Cursor, GitHub Copilot, Windsurf, OpenCode, Codex CLI and Gemini or Antigravity. Capture only runs in repositories where you have run agentdiff init. It can produce reports by file or model, post them as pull request comments, install CI workflows, verify signatures and enforce attribution policy rules. The README positions it as a source-authorship layer that sits beside supply-chain, code-quality and AI-detection tools rather than replacing them. Installation needs Python 3.7+, Git 2.20+ and Rust 1.85+, which is installed automatically if missing.
Capabilities
- Line-level attribution of code to the agent and model that wrote it
- ed25519-signed records kept in your own git refs, with no server
- Hooks for Claude Code, Cursor, Copilot, Windsurf, OpenCode, Codex and Gemini
- Blame-style view and reports by file or model, including as PR comments
- Signature verification and attribution policy checks
When to use it
- You need an auditable record of which AI agent wrote which part of a codebase
- Reviewers want to know which files were mostly written by an agent
- Your team uses several AI coding agents and wants one attribution trail