Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>TokenSpend AI — AI coding spend by project and commitNew to Visual Studio Code? Get it now.
TokenSpend AI — AI coding spend by project and commit

TokenSpend AI — AI coding spend by project and commit

Preview

Jonathan Davidar

|
2 installs
| (0) | Free
See what your AI coding costs, by project, task and commit. Reads the usage logs of GitHub Copilot, Claude Code, Codex, Qwen Code and Continue on your computer. No account, no telemetry.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TokenSpend AI: making AI tokenspend count

See what your AI coding costs, by project, task and commit, without sending anything anywhere.

TokenSpend AI reads the usage logs your AI coding tools already write on your computer, adds them up, and shows the result in VS Code: a status bar figure for the project in each window, and a full dashboard in an editor tab. There is no account, no telemetry and no TokenSpend AI server.

What it reads

Tool Where it reads Notes
GitHub Copilot (VS Code chat and agent mode) Copilot's debug logs and Agent Host usage files in VS Code's workspace storage Needs Copilot's usage logging switched on (the extension offers to do it)
GitHub Copilot CLI ~/.copilot/session-state Includes GitHub's own per-call charge, shown as the "GitHub meter"
Claude Code ~/.claude/projects Priced at Anthropic API list prices
Codex ~/.codex/sessions Compressed rollouts need Node 22.15 or newer
Qwen Code ~/.qwen/usage
Continue ~/.continue/dev_data Token counts are estimates, and the project is not recorded, so Continue usage appears under "project unknown"

Prompts, replies, file contents and tool output are never stored. Only the model, time, token counts, project and cost are kept. Some tools write prompts into the same logs; TokenSpend AI parses the usage lines and drops the rest.

What you get

  • Status bar, per window: the current project's spend and tokens, for example $1.24 · 310K. Hover for today, the last 7 days, this month and all time. Click to open the dashboard.
  • Cockpit: a few dials for what matters: burn against budget, month-end forecast, cache health, context pressure, savings available, cost per commit and output speed.
  • Projects, models and requests: spend by project, repository, tool and model, with a searchable request log.
  • Cost per commit: AI spend credited to the commits made while it was spent, for your own commits in the repositories it finds.
  • Time and tasks: a task timer that attributes AI spend to the work you were doing. If two intervals overlap, the requests stay unassigned instead of being guessed.
  • Reports: executive summary, management report and CSV/JSON exports.

How sure is each number?

Every figure carries one of three labels:

  • Estimate: token counts multiplied by published per-token rates.
  • GitHub meter: GitHub's own per-call charge, recorded in Copilot CLI logs, in AI credits at $0.01 each. It is a charge record, not an invoice.
  • Matched to bill: reconciled to GitHub's billing data, when your account can read it.

Estimates are not invoices. Plan discounts, included credits and subscription allocation are not applied.

Setup

  1. Install the extension. The collector starts when VS Code opens, using VS Code's own runtime, so Node.js is not needed. One collector serves every window and stops a few minutes after the last window closes.
  2. The first time, read the Terms of Use and choose I agree. The extension does nothing until you do. You can read them again with TokenSpend AI: Review Terms of Use, or at https://tokenspendai.com/license.
  3. If you use Copilot Chat, choose Turn On when asked to enable Copilot usage logging, then Reload Window. Copilot does not log requests made before logging was on. Claude Code, Codex, Qwen Code, Continue and Copilot CLI need no setup.

GitHub billing (optional)

Run TokenSpend AI: Connect GitHub Billing and paste a fine-grained token with the account permission Plan: Read-only. The token is kept in VS Code's secret storage. After the first sync, the dashboard compares what GitHub billed with what the logs show.

Personal billing is only readable for personal accounts. If an organisation pays for your Copilot, GitHub limits that billing data to its administrators, so figures stay estimates or GitHub meter values. Local logs cannot tell GitHub accounts apart, so billing connects one account at a time.

Commands (Command Palette, "TokenSpend AI")

Command What it does
Open Executive Summary Budget, cost per commit, context waste and model advice for this project
Open Dashboard Full dashboard in an editor tab, filtered to this project
Open Dashboard in Browser The same dashboard in your web browser
Show This Project's Spend Today, 7 days, month and all time; choose the status bar period
Refresh Re-reads the collector now
Diagnose Tracking Checks logging, finds the log files and counts recognised requests
Restart Collector Stops and restarts the background collector
Turn On Copilot Usage Logging Turns on the Copilot logging settings
Show Log The extension's and collector's output
Connect GitHub Billing / Disconnect GitHub Billing Adds or removes GitHub's billed amounts (read-only token)
Review Terms of Use Shows the terms you accepted, or asks you to accept them

Settings

tokenscope.statusBarPeriod (today, week, month, all), tokenscope.showStatusBar, tokenscope.autoStart, tokenscope.port (default 4789), tokenscope.dataDirectory, tokenscope.nodePath. Settings that choose a program, folder or port are read from your user settings only, never from a workspace's .vscode/settings.json.

Status bar states

Shows Meaning
$(graph) $0.42 · 120K Working; the current project's spend for the chosen period
$(warning) TokenSpend AI: logging off Copilot logging is off; click to turn it on
$(warning) $0.42 · 120K Working, but collection is behind or needs attention; hover for details
$(sync~spin) TokenSpend AI The collector is starting
$(error) TokenSpend AI The collector could not start; click for the log. A common cause is another program using port 4789
$(shield) TokenSpend AI: accept terms The Terms of Use have not been accepted yet; click to read and accept them

Privacy

  • Everything stays in ~/.tokenscope on your computer. The dashboard server listens on 127.0.0.1 only, and every request needs a key stored in that folder.
  • The extension makes no request to a TokenSpend AI server. Optional requests go to api.github.com (billing, only if you connect it) and to public price pages (a plain GET with no usage data).
  • Acceptance of the terms is remembered in VS Code's own storage on your computer, as the terms version and the time.
  • Remove everything by uninstalling the extension and deleting ~/.tokenscope.

Full notice: https://tokenspendai.com/privacy

Platforms and limits

  • Verified on Windows. macOS and Linux have not been checked on real machines yet.
  • Remote windows (SSH, WSL, containers) read the logs of the machine where VS Code's extension runs.
  • Inline code completions are not logged by Copilot, so they are not counted.
  • Each install reports for its own machine. There is no team-wide rollup yet.
  • The security hardening has not had an independent review.

Support

Questions, bug reports and security reports: https://tokenspendai.com/support or tokenspendai@gmail.com. Please do not send tokens or logs.

Terms and trademarks

TokenSpend AI is free proprietary software under the Terms of Use and Software License in LICENSE.txt. It is independent of, and not affiliated with or endorsed by, GitHub, Microsoft, Anthropic, OpenAI, Alibaba, Google or Continue. Product names belong to their owners.

Designed and Developed by Jonathan Davidar.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft