Observed since 21 Oct, 10:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Track which lines in your codebase were written by AI
Track which lines in your codebase were written by AI.
aidiff is git blame for AI-generated code. It tracks, scores, and visualizes how much of your codebase was written by AI assistants like Copilot, Claude, ChatGPT, and Cursor.
AI-generated code is becoming a significant portion of modern codebases. Studies show that AI-assisted developers accept ~30% of suggestions, and that number is growing fast.
But nobody tracks it. This creates invisible technical debt:
aidiff answers these questions.
pip install aidiff
cd your-repo
aidiff scan # Scan and show AI ratio
aidiff status # Full statistics
aidiff report # Generate HTML report
That's it. Three commands to understand your AI code footprint.
aidiff uses a hybrid detection approach:
# ai-generated, Co-authored-by: Claude, [AI] in commitsuser_authentication_token_validation)# Initialize the result dictionary)# TODO: Add error handling)| Command | Description |
|---|---|
aidiff scan | Scan repo and calculate AI ratio |
aidiff status | Show full statistics with tables |
aidiff track <file> | Show AI-scored lines in a file |
aidiff report | Generate HTML report with charts |
aidiff install | Install pre-commit git hook |
aidiff check --ci | CI-friendly output for pipelines |
aidiff init-action | Generate GitHub Action workflow |
aidiff report generates a beautiful, self-contained HTML report with:
aidiff init-action # Generates .github/workflows/aigate.yml
This creates a GitHub Action that automatically comments on PRs with the AI code ratio, warning when it exceeds 70%.
aidiff install # Installs pre-commit hook
Automatically runs aidiff scan before each commit, keeping .aidiff/data.json up to date.
aidiff stores data in .aidiff/data.json in your repo root. This file is meant to be committed and shared with your team.
Early supporters get priority features and direct input on the roadmap.
Become a Sponsor to unlock:
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 4 Apr 2026 | 5 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b9d79e14895ad1132037543241a4e766e1430860bb86609542415e49dc0bec71