Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>AI Code TrackerNew to Visual Studio Code? Get it now.
AI Code Tracker

AI Code Tracker

Automated AI Code Tracker

|
1 install
| (0) | Free
Automatically tracks GitHub Copilot usage per file and injects AI-assisted metadata into git commits via automated hooks.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Code Tracker

Automatically tracks GitHub Copilot usage per file and injects AI-assisted metadata into your git commits — zero manual effort.

Features

  • Automatic Copilot Detection — detects GitHub Copilot inline completions, chat insertions, and agent-mode edits
  • Per-File Tracking — tracks AI vs manual edits and lines per file with language detection
  • AI Model Detection — identifies the active model (GPT-4o, Claude, etc.) via VS Code's Language Model API
  • Git Hook Integration — bundled prepare-commit-msg hook auto-appends standardized AI trailers to every commit
  • Per-Staging Snapshots — each commit reflects only the delta since git add, not the entire session
  • Pre-Push Validation — optional pre-push hook warns when commits are missing AI-Assisted trailers
  • Status Bar — live indicator showing Copilot status and AI-assisted file count

Commit Trailers

Every commit automatically gets trailers like:

feat: add user dashboard

AI-Assisted: partial
AI-Tool: copilot+copilot-chat
AI-Model: claude-opus-4.6
AI-Language: typescript, css
AI-Percentage: 65
AI-Lines-Percentage: 72
AI-Edits: 12
AI-Manual-Edits: 7
AI-Lines: 48
Manual-Lines: 19

Getting Started

Install from Marketplace

  1. Search for AI Code Tracker in the VS Code Extensions panel
  2. Click Install
  3. Reload VS Code

Install from .vsix

code --install-extension ai-code-tracker-0.1.0.vsix

Install Git Hooks

On first activation in a git repository, the extension prompts to install hooks. You can also install manually:

  1. Open Command Palette (Ctrl+Shift+P)
  2. Run AI Tracker: Install Git Hooks

This copies the bundled hooks to .githooks/ and sets git config core.hooksPath .githooks.

Commands

Command Description
AI Tracker: Show Session Status Show current AI/manual edit counts
AI Tracker: Reset Session Reset all tracking data
AI Tracker: Snapshot Staged Files Manually snapshot staged file data
AI Tracker: Show Model Info Show detected AI model details
AI Tracker: Install Git Hooks Install prepare-commit-msg and pre-push hooks
AI Tracker: Uninstall Git Hooks Remove hooks and restore default git hook path

Settings

Setting Default Description
aiCodeTracker.enabled true Enable/disable AI usage tracking
aiCodeTracker.trackerFileName .ai-tracker.json Name of the tracker file in repo root
aiCodeTracker.selectedModel "" Override detected model name (leave empty for auto)
aiCodeTracker.autoInstallHooks true Prompt to install hooks on activation

How It Works

  1. Extension monitors onDidChangeTextDocument events and correlates with Copilot activity
  2. Writes .ai-tracker.json to the workspace root (debounced every 2s)
  3. When you git add files, the extension snapshots their current AI/manual counts
  4. The prepare-commit-msg hook reads the tracker and appends trailers to the commit message
  5. The tracker resets after each commit so counts don't accumulate

Pipeline Integration

The repo includes pipeline scripts for CI/CD integration:

  • parse-signals.js — extract and aggregate AI trailers from git log (JSON, CSV, summary formats)
  • post-pr-comment.js — post AI usage summary as an Azure DevOps PR comment

Building from Source

cd run/aicodetracker/automation/vscode-extension
npm install
npm run package    # produces ai-code-tracker-0.1.0.vsix

Publishing

# Create a Personal Access Token at https://dev.azure.com
# Or use the VS Code Marketplace publisher at https://marketplace.visualstudio.com/manage
vsce login FTEngPlatform
npm run publish

Note: Update the publisher field in package.json to match your VS Code Marketplace publisher ID before publishing.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft