Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>TokenTorch Cost TrackerNew to Visual Studio Code? Get it now.
TokenTorch Cost Tracker

TokenTorch Cost Tracker

northLo

|
1 install
| (0) | Free
Track AI coding usage in USD across tools and plans
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TokenTorch

TokenTorch translates AI coding usage into dollars you can actually reason about.

The point of the extension is to fix the gap between vendor UI and billing reality. If VS Code, Copilot, or Cursor tells you that you have used 88% of your credits, that still does not tell you whether you have effectively consumed $17.60 of a $20 plan, or whether the next burst of usage is about to become overage. This extension normalizes that into a current-cycle USD view.

What it does

  • Shows current AI spend in the status bar.
  • Opens a dashboard with per-tool and per-plan breakdowns.
  • Converts credit percentages into an effective dollar cost using your configured monthly plan price.
  • Tracks direct token-billed usage for API-based models with exact published rates.
  • Separates exact, effective, estimated, and included cost labels so the UI does not imply false precision.

Current MVP scope

This version supports two ways of tracking spend:

  1. Direct-billed usage. Log token usage for a direct API profile such as OpenAI or Anthropic. The extension computes exact cost from per-million token pricing.
  2. Credit and subscription usage. Create a profile for a product such as GitHub Copilot Pro or Cursor Pro, then update the current credit percentage from the vendor UI. The extension converts that percentage into an effective cost for the current billing cycle.

Native per-request telemetry from proprietary tools is not yet available through public VS Code APIs, so Copilot and Cursor are estimation-first in this MVP.

Commands

  • TokenTorch: Open Dashboard
  • TokenTorch: Set Up Billing Profile
  • TokenTorch: Update Credit Usage Snapshot
  • TokenTorch: Import Credit Usage From Text
  • TokenTorch: Quick Paste Copilot Usage
  • TokenTorch: Quick Paste Cursor Usage
  • TokenTorch: Log Token Usage
  • TokenTorch: Load Demo Data
  • TokenTorch: Connect GitHub Billing Account
  • TokenTorch: Connect Provider Account
  • TokenTorch: Sync GitHub Billing Usage
  • TokenTorch: Sync All Provider Accounts
  • TokenTorch: Configure Cloud Sync Backend
  • TokenTorch: Manage Provider Connections
  • TokenTorch: Open Connections Panel
  • TokenTorch: Sign In To Cloud Sync
  • TokenTorch: Sign Out Of Cloud Sync
  • TokenTorch: Restore Connections From Cloud
  • TokenTorch: Reset Stored Data

Example workflow

You can now get started without opening Command Palette:

  1. Click the startup prompt action Set Up Now, or click the AI Spend: Set Up status bar item.
  2. Complete the guided setup inputs.
  3. Use the dashboard action buttons for ongoing updates.

Command Palette commands still exist, but they are optional.

  1. Run TokenTorch: Set Up Billing Profile.
  2. Choose GitHub Copilot Pro.
  3. Enter your monthly fee, for example $20.
  4. Run TokenTorch: Update Credit Usage Snapshot.
  5. Enter the percentage shown by Copilot, for example 88.
  6. Open the dashboard or watch the status bar.

That profile will now show an effective current-cycle cost of about $17.60.

Fast import workflow for credit UIs

When a tool only shows a percentage in its UI:

  1. Copy the text that includes usage percent (for example: You used 88% of monthly credits).
  2. Run TokenTorch: Quick Paste Copilot Usage or TokenTorch: Quick Paste Cursor Usage.
  3. The extension parses the percentage from clipboard text and stores a new snapshot.
  4. Your status bar and dashboard update immediately to the latest effective dollar figure.

Extension settings

This extension contributes the following settings:

  • tokentorch.currencyCode: Display currency code. Default is USD.
  • tokentorch.staleSnapshotHours: Mark credit snapshots as stale after this many hours. Default is 72.
  • tokentorch.cloudSyncEnabled: Use an external cloud backend for provider sync. Default is false.
  • tokentorch.cloudSyncEndpoint: Base URL for cloud sync backend, for example an Azure Function App.
  • tokentorch.anthropicUsageEndpoint: Optional direct endpoint for Anthropic usage sync when cloud mode is off.
  • tokentorch.cursorUsageEndpoint: Optional direct endpoint for Cursor usage sync when cloud mode is off.

Cross-device accounts

TokenTorch now supports cloud user sessions and connection persistence:

  1. Configure cloud sync backend endpoint.
  2. Sign in with either your Microsoft account or cloud email + passcode.
  3. Connect provider accounts.
  4. On a new machine, sign in and run Restore Connections From Cloud.

Provider tokens are stored in cloud backend storage and restored to local VS Code secret storage.

Cloud backend and Azure deployment

The repository includes a containerized backend and deployment script:

  • Backend service: cloud/backend
  • Azure deployment script: cloud/azure/deploy-containerapp.ps1
  • Key Vault helper: cloud/azure/configure-keyvault.ps1
  • Secret rotation helper: cloud/azure/rotate-secrets.ps1
  • Post-deploy verification: cloud/azure/verify-containerapp-secrets.ps1

Deployment now defaults to Key Vault reference mode (managed identity + secretref). If Key Vault is missing, deployment fails unless you explicitly pass -AllowPlainEnvFallback.

Default deploy script targets:

  • Resource group: northLo
  • Container Apps environment: coastal-container-env

Known limitations

  • GitHub Copilot and Cursor do not expose exact per-user billing telemetry to third-party VS Code extensions, so their totals are currently effective or estimated rather than audit-grade.
  • Credit-to-USD normalization is only as good as the monthly plan price or credit assumptions you configure.
  • The extension stores billing profiles, usage events, and credit snapshots locally in VS Code global state. It does not store prompts.

Development

  • npm run compile builds the extension bundle.
  • npm run clean:vsix removes all local .vsix artifacts from the repo root.
  • npm run release:package cleans old .vsix files, then builds a fresh production package.
  • npm test runs the extension tests.
  • Press F5 in VS Code to launch an Extension Development Host.

Roadmap

  • Add collector adapters for tools that expose usable telemetry.
  • Support manual plan overage pricing and prepaid credit pools.
  • Improve import flows for provider invoices and usage exports.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft