Git AI
Get Started

Track Usage

See how much of your code is AI-generated once Git AI is installed — per line, per commit, and per agent. Local-first tracking of your AI-usage.

Think of Git AI as an odometer for the agents you drive. It runs entirely on your machine and counts up as it goes — every coding session, commit, edit, and token gets tallied the moment Git AI sees the event. There's nothing to start or stop, no project to wire up, and nothing leaves your machine. As you and your agents write code, the numbers climb.

To read the odometer, run:

git ai usage
git ai usage$ git ai usage Repositories github.com/next-element-inc/marketing-site 2,418 lines 73 commits 64 sessions ~$94 github.com/git-ai-project/git-ai 5,902 lines 141 commits 112 sessions ~$119 github.com/git-ai-project/self-hosted 612 lines 19 commits 21 sessions ~$18 AI Sessions 197 (148 shipped · 49 abandoned · 75% yield) Commits 233 Lines committed 7,140 Edits 4,318 Acceptance rate 81% Human Lines committed 1,792 Edits 538 Tokens (estimated cost) Input 1,284,500 Output 486,200 Cache read 18,402,900 Cache write 921,400 Est. cost ~$231 This week ~$132 · Last week ~$98 ↑ 35% vs last week claude-opus-4-8 19,600,000 tokens ~$214 cache 98% hit Activity over time May 18 – May 24 ██████░░░░░░░░░░░░░░ May 25 – May 31 ██████████░░░░░░░░░░ Jun 01 – Jun 07 █████████░░░░░░░░░░░ Jun 08 – Jun 14 ███████████████░░░░░ Jun 15 – Jun 21 ████████████░░░░░░░░ Jun 22 – Jun 28 ████████████████████

Git AI increments local counters as you use tokens, generate AI-code, and commit it.

Filtering by repository

By default the odometer aggregates across every repository Git AI has tracked. To scope it to one:

git ai usage --repo git-ai

Drill deeper

The git ai usage command gives you aggregate stats across all your repos and sessions. To dig into a specific commit, or the authorship of a specific file, use:

  • git ai blame — a drop-in replacement for git blame that adds AI authorship to every line, color-coded by agent session with the model and prompts on hover.
  • git ai stats — AI vs. human line counts, accepted-vs-edited breakdowns, and per-model stats for a single commit or a range.

Going further

To roll attribution up across an entire organization — per-PR percentages, model cost tracking, prompt effectiveness, and dashboards — see Git AI for Teams.

To understand what gets recorded and how it travels with your code, read How Git AI Works.

Want to measure how much AI-code makes it all the way to production and see usage across your team? See Git AI for Teams.