{"id":42536303,"url":"https://github.com/git-ai-project/git-ai","last_synced_at":"2026-04-11T19:09:47.401Z","repository":{"id":302488533,"uuid":"1012625755","full_name":"git-ai-project/git-ai","owner":"git-ai-project","description":"A Git extension for tracking the AI-generated code in your repos","archived":false,"fork":false,"pushed_at":"2026-02-07T07:39:12.000Z","size":42817,"stargazers_count":969,"open_issues_count":81,"forks_count":67,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-07T13:57:55.418Z","etag":null,"topics":["ai","ai-blame","coding-agents"],"latest_commit_sha":null,"homepage":"https://usegitai.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-ai-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-02T16:09:26.000Z","updated_at":"2026-02-07T11:39:50.000Z","dependencies_parsed_at":"2025-07-02T17:30:20.594Z","dependency_job_id":"edd31e42-f708-4b4c-a515-d378865e9e98","html_url":"https://github.com/git-ai-project/git-ai","commit_stats":null,"previous_names":["acunniffe/git-ai","git-ai-project/git-ai"],"tags_count":87,"template":false,"template_full_name":null,"purl":"pkg:github/git-ai-project/git-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ai-project%2Fgit-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ai-project%2Fgit-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ai-project%2Fgit-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ai-project%2Fgit-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-ai-project","download_url":"https://codeload.github.com/git-ai-project/git-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-ai-project%2Fgit-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29271861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T13:47:44.167Z","status":"ssl_error","status_checked_at":"2026-02-09T13:47:43.721Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-blame","coding-agents"],"created_at":"2026-01-28T17:03:57.832Z","updated_at":"2026-03-17T05:04:13.107Z","avatar_url":"https://github.com/git-ai-project.png","language":"Rust","readme":"# git-ai   \u003ca href=\"https://discord.gg/XJStYvkb5U\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/badge/discord-join-5865F2?logo=discord\u0026logoColor=white\" /\u003e\u003c/a\u003e        \n\n\u003cimg src=\"https://github.com/git-ai-project/git-ai/raw/main/assets/docs/git-ai.png\" align=\"right\"\n     alt=\"Git AI Logo\" width=\"200\" height=\"200\"\u003e\n\nGit AI is an open source git extension that tracks AI-generated code in your repositories.\n\nOnce 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.\n\n**AI attribution on every commit:**\n\n`git commit`\n```\n[hooks-doctor 0afe44b2] wsl compat check\n 2 files changed, 81 insertions(+), 3 deletions(-)\nyou  ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ai\n     6%             mixed   2%             92%\n```\n\n**AI Blame shows the model, agent, and session behind every line:**\n\n`git-ai blame /src/log_fmt/authorship_log.rs`\n```bash\n\ncb832b7 (Aidan Cunniffe      2025-12-13 08:16:29 -0500  133) pub fn execute_diff(\ncb832b7 (Aidan Cunniffe      2025-12-13 08:16:29 -0500  134)     repo: \u0026Repository,\ncb832b7 (Aidan Cunniffe      2025-12-13 08:16:29 -0500  135)     spec: DiffSpec,\ncb832b7 (Aidan Cunniffe      2025-12-13 08:16:29 -0500  136)     format: DiffFormat,\ncb832b7 (Aidan Cunniffe      2025-12-13 08:16:29 -0500  137) ) -\u003e Result\u003cString, GitAiError\u003e {\nfe2c4c8 (claude [session_id] 2025-12-02 19:25:13 -0500  138)     // Resolve commits to get from/to SHAs\nfe2c4c8 (claude [session_id] 2025-12-02 19:25:13 -0500  139)     let (from_commit, to_commit) = match spec {\nfe2c4c8 (claude [session_id] 2025-12-02 19:25:13 -0500  140)         DiffSpec::TwoCommit(start, end) =\u003e {\nfe2c4c8 (claude [session_id] 2025-12-02 19:25:13 -0500  141)             // Resolve both commits\nfe2c4c8 (claude [session_id] 2025-12-02 19:25:13 -0500  142)             let from = resolve_commit(repo, \u0026start)?;...\n```\n\n\n### Supported Agents\n\n\u003cimg src=\"assets/docs/badges/claude_code.svg\" alt=\"Claude Code\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/codex-black.svg\" alt=\"Codex\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/cursor.svg\" alt=\"Cursor\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/opencode.svg\" alt=\"OpenCode\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/windsurf.svg\" alt=\"Windsurf\" height=\"30\" /\u003e \u003cimg src=\"assets/docs/badges/amp.svg\" alt=\"Amp\" height=\"30\" /\u003e   \u003cimg src=\"assets/docs/badges/gemini.svg\" alt=\"Gemini\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/copilot.svg\" alt=\"GitHub Copilot\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/continue.svg\" alt=\"Continue\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/droid.svg\" alt=\"Droid\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/junie_white.svg\" alt=\"Junie\" height=\"30\" /\u003e  \u003cimg src=\"assets/docs/badges/rovodev.svg\" alt=\"Rovo Dev\" height=\"30\" /\u003e\n\n\u003e [+ Add support for another agent](https://usegitai.com/docs/cli/add-your-agent)\n\n\n## Install\n\nMac, Linux, Windows (WSL)\n\n```bash\ncurl -sSL https://usegitai.com/install.sh | bash\n```\n\nWindows (non-WSL)\n\n```powershell\npowershell -NoProfile -ExecutionPolicy Bypass -Command \"irm https://usegitai.com/install.ps1 | iex\"\n```\n\nThat's it — **no per-repo setup required.** Prompt and commit as normal. Git AI tracks attribution automatically.\n\n\n## Our Choices\n- **No workflow changes** — Just prompt and commit. Git AI tracks AI code accurately without cluttering your git history.\n- **\"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.\n- **Local-first** — Works 100% offline, no login required.\n- **Git native and open standard** — Git AI uses an [open standard](https://github.com/git-ai-project/git-ai/blob/main/specs/git_ai_standard_v3.0.0.md) for tracking AI-generated code with Git Notes.\n- **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.\n\n\n\u003ctable style=\"table-layout:fixed; width:100%\"\u003e\n\u003ctr\u003e\n\u003cth align=\"center\" width=\"50%\"\u003eSolo\u003c/th\u003e\n\u003cth align=\"center\" width=\"50%\"\u003eFor Teams\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\u003cimg 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\"\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003cimg 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\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\"\u003e\n\n- AI Authorship stored in Git Notes, with pointers to transcripts stored in local SQLite\n- Transcripts only stored locally, on computer\n- Restart any transcript\n- Measure AI authorship across commits with `git-ai stats`\n\n\u003c/td\u003e\n\u003ctd valign=\"top\"\u003e\n\n- 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\n- Agents and engineers can read transcripts and summaries for any block of AI-generated code\n- Restart any transcript, by any contributor\n- Advanced cross-agent dashboards to measure AI adoption, code durability, and compare agents across your team \n\n**[Click here to get early access](https://calendly.com/d/cxjh-z79-ktm/meeting-with-git-ai-authors)**\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Understand Why with the `/ask` Skill\n\nSee 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.\n\nGit 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`:\n\n```\n/ask Why didn't we use the SDK here?\n```\n\nAgents 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:\n\n| Reading Code + Transcript (`/ask`) | Only Reading Code (not using Git AI) |\n|---|---|\n| 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. |\n\n\n# Make Your Agents Smarter\nAgents 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:\n\n`Claude|AGENTS.md`\n```markdown\n- In plan mode, always use the /ask skill to read the code and the original transcript that generated it. Understanding intent will help you write a better plan.\n```\n\n\n\n# AI Blame\n\nGit AI blame is a drop-in replacement for `git blame` that shows AI attribution for each line. It supports [all standard `git blame` flags](https://git-scm.com/docs/git-blame).\n\n```bash\ngit-ai blame /src/log_fmt/authorship_log.rs\n```\n\n```bash\ncb832b7 (Aidan Cunniffe 2025-12-13 08:16:29 -0500  133) pub fn execute_diff(\ncb832b7 (Aidan Cunniffe 2025-12-13 08:16:29 -0500  134)     repo: \u0026Repository,\ncb832b7 (Aidan Cunniffe 2025-12-13 08:16:29 -0500  135)     spec: DiffSpec,\ncb832b7 (Aidan Cunniffe 2025-12-13 08:16:29 -0500  136)     format: DiffFormat,\ncb832b7 (Aidan Cunniffe 2025-12-13 08:16:29 -0500  137) ) -\u003e Result\u003cString, GitAiError\u003e {\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  138)     // Resolve commits to get from/to SHAs\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  139)     let (from_commit, to_commit) = match spec {\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  140)         DiffSpec::TwoCommit(start, end) =\u003e {\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  141)             // Resolve both commits\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  142)             let from = resolve_commit(repo, \u0026start)?;\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  143)             let to = resolve_commit(repo, \u0026end)?;\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  144)             (from, to)\nfe2c4c8 (claude         2025-12-02 19:25:13 -0500  145)         }\n```\n\n### IDE Plugins\n\nAI blame decorations in the gutter, color-coded by agent session. Hover over a line to see the raw prompt or summary.\n\n\u003ctable style=\"table-layout:fixed; width:100%\"\u003e\n\u003ctr\u003e\n\u003cth width=\"35%\"\u003eSupported Editors\u003c/th\u003e\n\u003cth width=\"65%\"\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\"\u003e\n\n- [VS Code](https://marketplace.visualstudio.com/items?itemName=git-ai.git-ai-vscode)\n- [Cursor](https://marketplace.visualstudio.com/items?itemName=git-ai.git-ai-vscode)\n- [Windsurf](https://marketplace.visualstudio.com/items?itemName=git-ai.git-ai-vscode)\n- [Antigravity](https://marketplace.visualstudio.com/items?itemName=git-ai.git-ai-vscode)\n- [Emacs magit](https://github.com/jwiegley/magit-ai)\n- *Built support for another editor? [Open a PR](https://github.com/git-ai-project/git-ai/pulls)*\n\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg 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\" /\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Cross Agent Observability\n\nGit AI collects cross-agent telemetry from prompt to production. Track how much AI code gets accepted, committed, through code review, and into production — so you can identify which tools and practices work best for your team.\n\n```bash\ngit-ai stats --json\n```\n\nLearn more: [Stats command reference docs](https://usegitai.com/docs/cli/reference#stats)\n\n```json\n{\n  \"human_additions\": 28,\n  \"mixed_additions\": 5,\n  \"ai_additions\": 76,\n  \"ai_accepted\": 47,\n  \"total_ai_additions\": 120,\n  \"total_ai_deletions\": 34,\n  \"time_waiting_for_ai\": 240,\n  \"tool_model_breakdown\": {\n    \"claude_code/claude-sonnet-4-5-20250929\": {\n      \"ai_additions\": 76,\n      \"mixed_additions\": 5,\n      \"ai_accepted\": 47,\n      \"total_ai_additions\": 120,\n      \"total_ai_deletions\": 34,\n      \"time_waiting_for_ai\": 240\n    }\n  }\n}\n```\n\nFor team-wide visibility, [Git AI Enterprise](https://usegitai.com/enterprise) aggregates data at the PR, repository, and organization level:\n\n- **AI code composition** — Track what percentage of code is AI-generated across your org.\n- **Full lifecycle tracking** — See how much AI code is accepted, committed, rewritten during code review, and deployed to production. Measure how durable that code is once it ships and whether it causes alerts or incidents.\n- **Team workflows** — Identify who uses background agents effectively, who runs agents in parallel, and what teams getting the most lift from AI do differently.\n- **Agent readiness** — Measure the effectiveness of agents in your repos. Track the impact of skills, rules, MCPs, and `AGENTS.md` changes across repos and task types.\n- **Agent and model comparison** — Compare acceptance rates and output quality by agent and model.\n\n**[Get early access](https://calendly.com/d/cxjh-z79-ktm/meeting-with-git-ai-authors)**\n\n![Git AI Enterprise dashboard showing AI code metrics across repositories](https://github.com/git-ai-project/git-ai/raw/main/assets/docs/dashboard.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eHow does Git AI work?\u003c/summary\u003e\n\n\n- Agents report what code they wrote via pre/post edit hooks.\n- Git AI stores each edit as a checkpoint — a small diff in `.git/ai/` that records whether the change is AI-generated or human-authored. Checkpoints accumulate as you work.\n- On commit, Git AI processes all checkpoints into an Authorship Log that links line ranges to agent sessions, then attaches the log to the commit via a Git Note.\n- Git AI preserves attribution across rebases, merges, squashes, stash/pops, cherry-picks, and amends by transparently rewriting Authorship Logs whenever history changes.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003eGit Note\u003c/b\u003e \u003ccode\u003erefs/notes/ai #\u0026lt;commitsha\u0026gt;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cb\u003e`hooks/post_clone_hook.rs`\u003c/b\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```\nhooks/post_clone_hook.rs\n  a1b2c3d4e5f6a7b8 6-8\n  c9d0e1f2a3b4c5d6 16,21,25\n---\n{\n  \"schema_version\": \"authorship/3.0.0\",\n  \"git_ai_version\": \"0.1.4\",\n  \"base_commit_sha\": \"f4a8b2c...\",\n  \"prompts\": {\n    \"a1b2c3d4e5f6a7b8\": {\n      \"agent_id\": {\n        \"tool\": \"copilot\",\n        \"model\": \"codex-5.2\"\n      },\n      \"human_author\": \"Alice Person \u003calice@example.com\u003e\",\n      \"messages\": [],\n      \"total_additions\": 8,\n      \"total_deletions\": 0,\n      \"accepted_lines\": 3,\n      \"overriden_lines\": 0,\n      \"messages_url\": \"https://your-prompt-store.dev/cas/a1b2c3d4...\"\n    },\n    \"c9d0e1f2a3b4c5d6\": {\n      \"agent_id\": {\n        \"tool\": \"cursor\",\n        \"model\": \"sonnet-4.5\"\n      },\n      \"human_author\": \"Jeff Coder \u003cjeff@example.com\u003e\",\n      \"messages\": [],\n      \"total_additions\": 5,\n      \"total_deletions\": 2,\n      \"accepted_lines\": 3,\n      \"overriden_lines\": 0,\n      \"messages_url\": \"https://your-prompt-store.dev/cas/c9d0e1f2...\"\n    }\n  }\n}\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```rust\n 1  pub fn post_clone_hook(\n 2      parsed_args: \u0026ParsedGitInvocation,\n 3      exit_status: std::process::ExitStatus,\n 4  ) -\u003e Option\u003c()\u003e {\n 5\n 6      if !exit_status.success() {\n 7          return None;\n 8      }\n 9\n10      let target_dir =\n11          extract_clone_target_directory(\u0026parsed_args.command_args)?;\n12\n13      let repository =\n14          find_repository_in_path(\u0026target_dir).ok()?;\n15\n16      print!(\"Fetching authorship notes from origin\");\n17\n18      match fetch_authorship_notes(\u0026repository, \"origin\") {\n19          Ok(()) =\u003e {\n20              debug_log(\"successfully fetched\");\n21              print!(\", done.\\n\");\n22          }\n23          Err(e) =\u003e {\n24              debug_log(\u0026format!(\"fetch failed: {}\", e));\n25              print!(\", failed.\\n\");\n26          }\n27      }\n28\n29      Some(())\n30  }\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nThe note format is defined in the [Git AI Standard v3.0.0](https://github.com/git-ai-project/git-ai/blob/main/specs/git_ai_standard_v3.0.0.md).\n\n\u003c/details\u003e\n\n# License\nApache 2.0\n","funding_links":[],"categories":["Applications","ai","Rust"],"sub_categories":["System tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-ai-project%2Fgit-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-ai-project%2Fgit-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-ai-project%2Fgit-ai/lists"}