Thanks to visit codestin.com
Credit goes to github.com

Skip to content
forked from acunniffe/git-ai

Track the AI-generated code in your repo

License

hsethiya/git-ai

 
 

Repository files navigation

Git AI by acunniffe/git-ai

git-ai

Track the AI Code in your repositories

Quick Start

Mac, Linux, Windows (WSL)

curl -sSL https://raw.githubusercontent.com/acunniffe/git-ai/main/install.sh | bash

Windows (non-WSL)

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/acunniffe/git-ai/main/install.ps1 | iex"

🎊 That's it! No per-repo setup. Once installed Git AI will work OOTB with any of these Supported Agents:

Next step: Just code and commit!

Once installed, Cursor, Claude Code and GitHub Copilot will automatically call the CLI to mark the code they generate as AI-authored.

When you create a new commit, git-ai adds a git note that tracks which lines were AI-authored and prints the code authorship:

If you're curious about the AI authorship of any file git-ai blame will show you which lines are AI generated:

alt

Installing the PR Bot (currently in-development)

A PR Bot aggregates git-ai data at the PR, Repository and Organization levels:

  • AI authorship breakdown for every Pull Request
  • Measure % of code that is AI generated (and the trend)
  • AI Cost per-PR and accepted AI rate (measures how often AI code is accepted on first generation)

Get early access by chatting with the maintainers

alt

Goals of git-ai project

🤖 Track AI code in a Multi-Agent world. Because developers get to choose their tools, engineering teams need a vendor agnostic way to track AI impact in their repos.

🎯 Accurate attribution from Laptop → Pull Request → Merged. Claude Code, Cursor and Copilot cannot track code after generation—Git AI follows it through the entire workflow.

🔄 Support real-world git workflows by making sure AI-Authorship annotations survive a merge --squash, rebase, reset, cherry-pick etc.

🔗 Maintain link between prompts and code - there is valuable context and requirements in team prompts—preserve them alongside code.

🚀 Git-native + Fast - git-ai is built on git plumbing commands. Negligible impact even in large repos (<100ms). Tested in Chromium.

Documentation

Agent Support

git-ai automatically sets up all supported agent hooks using the git-ai install-hooks command

Agent/IDE Authorship Prompts
Cursor >1.7
Claude Code
GitHub Copilot in VSCode via Extension
OpenAI Codex (waiting on openai/codex #2904)
Sourcegraph Cody + Amp
Windsurf
RovoDev CLI
your agent here

Building a Coding Agent? Add support for Git AI by following this guide

About

Track the AI-generated code in your repo

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 94.7%
  • Python 2.1%
  • TypeScript 1.4%
  • Other 1.8%