Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>AI Coding UsageNew to Visual Studio Code? Get it now.
AI Coding Usage

AI Coding Usage

Minidoracat

|
239 installs
| (1) | Free
Track Claude Code and Codex usage from VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Coding Usage

AI Coding Usage

Track local Claude Code and Codex usage from VS Code.

Visual Studio Marketplace Version Visual Studio Marketplace Installs GitHub Discord

English · 繁體中文 · 简体中文 · 日本語 · 한국어

AI Coding Usage is a local-first VS Code extension for reviewing AI coding usage, token volume, sessions, and API-equivalent cost estimates. It reads local usage files from Claude Code and Codex, aggregates them by provider/model/session/date range, and presents the result in a VS Code dashboard and status bar summary.

Features

  • Local Claude Code and Codex usage discovery
  • Provider filters for Claude, Codex, or both
  • Calendar quick ranges for today, yesterday, this week, last week, this month, last month, and custom dates; week ranges start on Monday and all boundaries use the selected time zone
  • Time zone selection: system time zone, UTC, or custom IANA time zone
  • Model and session breakdowns with input tokens, output tokens, cache creation, cache reads, and message counts
  • API-equivalent USD estimates for supported models
  • Auto refresh controls with configurable intervals
  • Multi-language dashboard UI: English, Traditional Chinese, Simplified Chinese, Japanese, and Korean
  • Local screenshot copy support for sharing the dashboard without uploading data

Usage

Open the dashboard in either of these ways:

  • Command Palette: press Ctrl+Shift+P (Cmd+Shift+P on macOS), then run Open AI Coding Usage.
  • Status bar: click the bottom-right AI Usage / cost summary item.

Useful commands:

  • Open AI Coding Usage: open the dashboard in the editor area.
  • Refresh Usage: rescan local usage files and refresh the dashboard.
  • Detect Local AI Usage Sources: detect local Claude Code and Codex usage paths.
  • Open AI Coding Usage Settings: configure usage paths, language, time zone, auto refresh, display currency, and screenshot content.

On first launch, leave the usage path settings empty to let the extension detect common local paths. You can also open settings and fill aiCodingUsage.claude.usagePath or aiCodingUsage.codex.usagePath manually.

Privacy

This extension is local-only.

  • No login
  • No upload
  • No cloud sync
  • No telemetry
  • No background network requests

The only network request is optional and user-triggered: pressing "Update public rates" in the dashboard fetches exchange rates from open.er-api.com (rates by ExchangeRate-API). It sends no local data and never runs automatically. Everything else is local-only: the extension reads only the local usage paths you configure or approve through local source detection.

Local Usage Sources

If these settings are empty, the extension detects common local paths and applies them automatically:

Provider Default path
Claude Code ~/.claude/projects
Codex ~/.codex/sessions

On native Windows VS Code, ~ resolves to the current Windows user home, such as C:\Users\<user>\.claude\projects and C:\Users\<user>\.codex\sessions.

In Remote SSH or WSL windows, the extension runs in the remote extension host and reads the remote or WSL home directory. To inspect usage from the Windows host while working remotely, configure a path that is readable from that extension host.

Cost Estimates

Cost values are API-equivalent estimates. They answer the question: "What would this usage roughly cost if billed through the corresponding public API pricing?"

They are not:

  • A Claude Code subscription bill
  • A Codex subscription bill
  • A provider invoice
  • A guaranteed billing statement

Pricing is calculated from the packaged pricing catalog in src/pricing/catalog.json. The catalog includes source URLs and checkedAt metadata, and npm run check:pricing validates the pricing metadata before packaging.

The packaged Codex catalog includes GPT-5.6 Sol (gpt-5.6-sol, with gpt-5.6 as an alias), GPT-5.6 Terra, and GPT-5.6 Luna, plus the official long-context rates for GPT-5.5 and GPT-5.4. For rules with long-context metadata, the long-context tier applies only when one usage record's input + cachedInput is strictly greater than 272,000 tokens (>272K); exactly 272,000 remains in the base tier. Once selected, that one tier applies to every priced category in the record, including output. Session and date-range totals are not re-tiered.

Codex-specific limitation: local Codex JSONL currently does not expose structured cache_write_tokens, so the extension does not estimate or infer unreported cache-write usage. Claude data is unaffected: when a Claude source provides cacheWrite5m or cacheWrite1h, those categories are displayed and priced normally.

Costs are calculated in USD. To display another currency, use the currency row in the dashboard: pick a 3-letter code (for example TWD), then either press "Update public rates" (a user-triggered fetch from open.er-api.com) or enter a rate per 1 USD manually. Manual rates (stored in aiCodingUsage.exchangeRates) take precedence over fetched public rates; without any rate the dashboard falls back to USD.

The full-page screenshot copy excludes the pricing rules panel and the sessions table by default. Enable aiCodingUsage.screenshot.includePricing or aiCodingUsage.screenshot.includeSessions to include them.

Screenshots

The dashboard below is shown with the English UI. Previews for other languages live in their localized READMEs: 繁體中文, 简体中文, 日本語, 한국어.

AI Coding Usage dashboard

Screenshot guidance lives in docs/screenshots/README.md.

Development

npm install
npm run compile
npm test
npm run check:i18n
npm run check:privacy
npm run check:pricing
npm run check:test-data
npm run package:vsix
npm run inspect:vsix

npm run package:vsix creates a local .vsix package. It does not publish to Visual Studio Marketplace.

Extension Host Testing

Open this repository in VS Code and run the Run Extension launch configuration.

For fixture-only testing, configure:

  • aiCodingUsage.claude.usagePath: test/fixtures/claude
  • aiCodingUsage.codex.usagePath: test/fixtures/codex

The dashboard webview uses Preact, uPlot, and esbuild. Runtime assets are packaged into media/main.js and media/main.css; the extension does not load external web assets at runtime.

Support

See SUPPORT.md for support and issue reporting guidance.

License

MIT. See LICENSE.

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