内容摘录
git-ai
<img src="https://github.com/git-ai-project/git-ai/raw/main/assets/docs/git-ai.png" align="right"
alt="Git AI Logo" width="200" height="200">
Git AI is an open source git extension that tracks AI-generated code in your repositories.
Once installed, it automatically links every AI-written line to the agent, model, and transcripts that generated it — so you never lose the intent, requirements, and architecture decisions behind your code.
**AI attribution on every commit:**
git commit
**AI Blame shows the model, agent, and session behind every line:**
git-ai blame /src/log_fmt/authorship_log.rs
Supported Agents
<img src="assets/docs/badges/claude_code.svg" alt="Claude Code" height="30" /> <img src="assets/docs/badges/codex-black.svg" alt="Codex" height="30" /> <img src="assets/docs/badges/cursor.svg" alt="Cursor" height="30" /> <img src="assets/docs/badges/opencode.svg" alt="OpenCode" height="30" /> <img src="assets/docs/badges/gemini.svg" alt="Gemini" height="30" /> <img src="assets/docs/badges/copilot.svg" alt="GitHub Copilot" height="30" /> <img src="assets/docs/badges/continue.svg" alt="Continue" height="30" /> <img src="assets/docs/badges/droid.svg" alt="Droid" height="30" /> <img src="assets/docs/badges/junie_white.svg" alt="Junie" height="30" /> <img src="assets/docs/badges/rovodev.svg" alt="Rovo Dev" height="30" />
Add support for another agent
Install
Mac, Linux, Windows (WSL)
Windows (non-WSL)
That's it — **no per-repo setup required.** Prompt and commit as normal. Git AI tracks attribution automatically.
Our Choices
**No workflow changes** — Just prompt and commit. Git AI tracks AI code accurately without cluttering your git history.
**"Detecting" AI code is an anti-pattern** — Git AI does not guess whether a hunk is AI-generated. Supported agents report exactly which lines they wrote, giving you the most accurate attribution possible.
**Local-first** — Works 100% offline, no login required.
**Git native and open standard** — Git AI uses an open standard for tracking AI-generated code with Git Notes.
**Transcripts stay out of Git** — Git Notes link to transcripts stored locally, in the Git AI Cloud, or in a self-hosted prompt store -- keeping your repos lean, free of sensitive information, and giving you control over your data.
<table style="table-layout:fixed; width:100%">
<tr>
<th align="center" width="50%">Solo</th>
<th align="center" width="50%">For Teams</th>
</tr>
<tr>
<td align="center"><img src="https://github.com/git-ai-project/git-ai/raw/new-readme/assets/docs/solo-player.svg" alt="Solo — everything stays on your machine" width="400"></td>
<td align="center"><img src="https://github.com/git-ai-project/git-ai/raw/new-readme/assets/docs/for-teams.svg" alt="For teams — shared context across your team" width="400"></td>
</tr>
<tr>
<td valign="top">
AI Authorship stored in Git Notes, with pointers to transcripts stored in local SQLite
Transcripts only stored locally, on computer
Restart any transcript
Measure AI authorship across commits with git-ai stats
</td>
<td valign="top">
AI Authorship stored in Git Notes, with pointers to cloud or self-hosted transcript store with built-in access control, secret redaction, and PII filtering
Agents and engineers can read transcripts and summaries for any block of AI-generated code
Restart any transcript, by any contributor
Advanced cross-agent dashboards to measure AI adoption, code durability, and compare agents across your team
**Click here to get early access**
</td>
</tr>
</table>
Understand Why with the /ask Skill
See something you don't understand? The /ask skill lets you talk to the agent that wrote the code about its instructions, decisions, and the intent of the engineer who assigned the task.
Git AI adds the /ask skill to ~/.agents/skills/ and ~/.claude/skills/ at install time, so you can invoke it from Cursor, Claude Code, Copilot, Codex, and others just by typing /ask:
Agents with access to the original intent and source code understand the "why." Agents that can only read the code can tell you what it does, but not why:
| Reading Code + Transcript (/ask) | Only Reading Code (not using Git AI) |
|---|---|
| When Aidan was building telemetry, he instructed the agent not to block the exit of our CLI flushing telemetry. Instead of using the Sentry SDK directly, we came up with a pattern that writes events locally first via append_envelope(), then flushes them in the background via a detached subprocess. This keeps the hot path fast and ships telemetry async after the fact. | src/commands/flush_logs.rs is a 5-line wrapper that delegates to src/observability/flush.rs (~700 lines). The commands/ layer handles CLI dispatch; observability/ handles Sentry, PostHog, metrics upload, and log processing. Parallel modules like flush_cas, flush_logs, flush_metrics_db follow the same thin-dispatch pattern. |
Make Your Agents Smarter
Agents make fewer mistakes and produce more maintainable code when they understand the requirements and decisions behind the code they build on. The best way to provide this context is to give agents the same /ask tool you use yourself. Tell your agents to use /ask in plan mode:
Claude|AGENTS.md
AI Blame
Git AI blame is a drop-in replacement for git blame that shows AI attribution for each line. It supports all standard git blame flags.
IDE Plugins
AI blame decorations in the gutter, color-coded by agent session. Hover over a line to see the raw prompt or summary.
<table style="table-layout:fixed; width:100%">
<tr>
<th width="35%">Supported Editors</th>
<th width="65%"></th>
</tr>
<tr>
<td valign="top">
VS Code
Cursor
Windsurf
Antigravity
Emacs magit
*Built support for another editor? Open a PR*
</td>
<td>
<img width="100%" alt="Git AI VS Code extension showing color-coded AI blame in the gutter" src="https://github.com/user-attachments/assets/94e332e7-5d96-4e5c-8757-63ac0e2f88e0" />
</td>
</tr>
</table>
Cross Agent Observability
Git AI collects cross-agent telemetry from p…