# agentdiff

A git-native tool that records which AI coding agent wrote which line of a commit, signs each attribution record with ed25519, and stores it in the repository's own git history.

agentdiff hooks into major AI coding agents, including Claude Code, Cursor, Codex, Copilot, Windsurf, OpenCode and Gemini, and writes a permanent, commit-scoped attribution record into the repository for each commit. Each record captures the agent name, model, a prompt excerpt and the exact line ranges it touched, cryptographically signed with ed25519, and all of it is queryable from a command-line interface without a server.

The project positions itself as a source-line authorship layer distinct from adjacent categories: unlike AI content-detection tools that guess whether code looks AI-generated after the fact, agentdiff records authorship at the time it happens; unlike supply-chain provenance frameworks such as SLSA or SBOM, which describe how a build artifact was assembled, agentdiff signs the authorship attestation of the source lines themselves. It is meant to be used alongside, not instead of, code quality and security scanners.

Installation requires Python 3.7 or newer, Git 2.20 or newer, and Rust 1.85 or newer, the last of which the installer can set up automatically. It is written in Rust and released under the Apache-2.0 license.

Website: https://getagentdiff.com
