Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Token-Track — Copilot Usage TrackerNew to Visual Studio Code? Get it now.
Token-Track — Copilot Usage Tracker

Token-Track — Copilot Usage Tracker

Thoybur rohman

|
3 installs
| (0) | Free
Track your GitHub Copilot token usage and estimated costs by parsing local debug logs. No API keys needed.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🪙 Token-Track

Track your GitHub Copilot token usage and costs — directly from local logs.

Token-Track is a set of IDE extensions for VS Code and Visual Studio that parse your local Copilot debug logs to give you real-time visibility into token consumption and estimated costs. No API access, no billing permissions, no data sent anywhere — everything stays on your machine.


✨ Features

  • 📊 Real-time Dashboard — Beautiful charts showing daily costs, model usage breakdown, and token analytics
  • 🪙 Status Bar — Live cost estimate in your IDE status bar (click to open dashboard)
  • 💰 Cost Calculator — Accurate estimates based on GitHub AI Credits pricing ($0.01/credit)
  • 📈 Historical Trends — Track your usage over days, weeks, and months
  • 🚨 Budget Alerts — Set a monthly budget and get warned when approaching limits
  • 📤 Export Data — Download your usage data as CSV or JSON
  • 🔒 100% Local — No data leaves your machine. Everything is parsed and stored locally
  • ⚡ Auto-Setup — Logging is automatically enabled when you install the extension

📦 Installation

VS Code

  1. Open Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  2. Search for "Token-Track"
  3. Click Install
  4. That's it! The extension auto-enables Copilot debug logging on first activation

Visual Studio

  1. Go to Extensions > Manage Extensions
  2. Search for "Token-Track"
  3. Click Download and restart Visual Studio
  4. The extension auto-enables Copilot trace logging on first load

🚀 Quick Start

  1. Install the extension
  2. Use Copilot as you normally would (Chat, Agent Mode, completions, etc.)
  3. Click the 🪙 icon in the status bar to see your estimated cost
  4. Open the Dashboard via the Command Palette: Token-Track: Open Dashboard

📊 Dashboard

The dashboard provides:

Feature Description
Summary Cards Today / This Week / This Month costs and token counts
Cost Timeline Line chart showing daily spend over time
Model Breakdown Donut chart of usage per AI model
Token Split Stacked bar chart of Input vs Output vs Cached tokens
Request History Searchable, sortable table of all Copilot requests
Budget Tracker Progress bar showing spend vs your monthly budget

⚙️ Configuration

VS Code Settings

{
  // Auto-scan logs on interval (default: true)
  "token-track.autoScan": true,

  // Scan frequency in seconds (default: 60)
  "token-track.scanIntervalSeconds": 60,

  // Monthly budget in USD (default: 10.00 for Pro plan)
  "token-track.monthlyBudget": 10.00,

  // Display currency (default: "USD")
  "token-track.currency": "USD",

  // Override default model pricing (per 1M tokens)
  "token-track.customPricing": {},

  // How long to keep usage history in days (default: 90)
  "token-track.retentionDays": 90
}

💰 Pricing Reference

Token-Track uses GitHub's official AI Credits pricing (1 Credit = $0.01 USD):

Model Input (per 1M) Cached (per 1M) Output (per 1M)
GPT-5 mini $0.25 $0.025 $2.00
GPT-5.3 Codex $1.75 $0.175 $14.00
GPT-5.4 $2.50 $0.25 $15.00
GPT-5.4 (Long Context) $5.00 $0.50 $22.50
GPT-5.4 mini $0.75 $0.075 $4.50
GPT-5.4 nano $0.20 $0.02 $1.25

Note: Prices can be customized in extension settings. Code completions and Next Edit suggestions are free and not tracked.


⚠️ Important Disclaimers

  • Estimates Only — Token counts come from Copilot debug logs, which may differ slightly from actual GitHub billing. All costs are labeled as "estimated."
  • Internal Log Format — The extension relies on Copilot's internal debug log format, which may change between updates. We handle schema changes gracefully with fallbacks.
  • Privacy — No data is ever sent outside your machine. All processing is 100% local.

🔧 How It Works

VS Code

  1. On activation, the extension enables github.copilot.chat.agentDebugLog.fileLogging.enabled
  2. It uses github.copilot.chat.debug.exportAllPromptLogsAsJson to read session logs
  3. It also watches the JSONL log directory for real-time updates
  4. Token counts are extracted from metadata.usage in the log entries
  5. Costs are calculated using the bundled pricing table

Visual Studio

  1. On load, the extension enables Copilot Trace logging via settings
  2. It watches %TEMP%\VSGitHubCopilotLogs\ for new .log files
  3. Log files are parsed line-by-line, extracting JSON blocks with usage data
  4. Token counts and costs are calculated identically to the VS Code version

🛠️ Development

VS Code Extension

cd packages/vscode-extension
npm install
npm run build        # Build extension
npm run watch        # Build in watch mode
npm test             # Run unit tests
npm run package      # Create .vsix package

Visual Studio Extension

cd packages/vs-extension
dotnet restore
dotnet build         # Build VSIX
dotnet test          # Run unit tests

📝 License

MIT — see LICENSE


🤝 Contributing

Contributions welcome! Please open an issue or PR.

  1. Fork the repo
  2. Create a feature branch
  3. Make your changes
  4. Run tests
  5. Submit a PR
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft