Catalog PyPI
PACKAGE EXPLORERView in registry

aidiff

PyPI

Track which lines in your codebase were written by AI

aiblamecode-qualitydeveloper-toolsgit
Versions collected1
Direct dependencies5From release 0.1.1
Last observed21 Oct, 10:31 UTC

README

Version 0.1.1 documentation

aidiff

Track which lines in your codebase were written by AI.

PyPI version PyPI downloads License: MIT

aidiff demo


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.

Why?

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:

  • Which files are mostly AI-generated?
  • Are AI-written functions getting proper review?
  • What's your team's actual AI code ratio over time?

aidiff answers these questions.

Quick Start

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.

How It Works

aidiff uses a hybrid detection approach:

  1. Explicit tags - # ai-generated, Co-authored-by: Claude, [AI] in commits
  2. Commit analysis - Patterns in commit messages indicating AI involvement
  3. Heuristic analysis - Detects AI coding patterns:
    • Overly verbose variable names (user_authentication_token_validation)
    • Redundant comments (# Initialize the result dictionary)
    • Placeholder TODOs (# TODO: Add error handling)
    • Docstrings longer than the function body
    • Universal type hints on every function

Commands

CommandDescription
aidiff scanScan repo and calculate AI ratio
aidiff statusShow full statistics with tables
aidiff track <file>Show AI-scored lines in a file
aidiff reportGenerate HTML report with charts
aidiff installInstall pre-commit git hook
aidiff check --ciCI-friendly output for pipelines
aidiff init-actionGenerate GitHub Action workflow

HTML Report

aidiff report generates a beautiful, self-contained HTML report with:

  • AI code ratio trends over time (Chart.js)
  • File-by-file AI score heatmap
  • Contributor AI usage breakdown
  • Recent commit AI classification

GitHub Action

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%.

Git Hook

aidiff install  # Installs pre-commit hook

Automatically runs aidiff scan before each commit, keeping .aidiff/data.json up to date.

Configuration

aidiff stores data in .aidiff/data.json in your repo root. This file is meant to be committed and shared with your team.

Insiders

Early supporters get priority features and direct input on the roadmap.

Become a Sponsor to unlock:

  • Custom detection rules
  • Team dashboard
  • Slack/Discord notifications
  • Priority support

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.14 Apr 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
techino35/aidiff

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b9d79e14895ad1132037543241a4e766e1430860bb86609542415e49dc0bec71