Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>TokenometerNew to Visual Studio Code? Get it now.
Tokenometer

Tokenometer

Faraazuddin Mohammed

|
1 install
| (0) | Free
Tokenometer for VS Code / Cursor — live token count and USD cost in the status bar for LLM prompts (Claude, GPT-4o, Gemini, Mistral, Cohere).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Tokenometer for VS Code & Cursor

License: MIT

Live token count and USD cost for the active prompt file, right in the status bar — across Claude, GPT-4o, and Gemini.

Most "token counter" extensions stop at counts. Tokenometer adds the dollar value, using the same pricing the tokenometer CLI and GitHub Action use, so what you see in the editor matches what you'd see in CI and on the npm side.

status bar screenshot placeholder

Install

Marketplace (coming with v1.0.0)

The Marketplace install button arrives with the v1.0.0 cut — Phase I owns that publish step. Track it on the milestones page.

  • VS Code Marketplace: coming with v1.0.0
  • Open VSX (Cursor / VSCodium): coming with v1.0.0

Build locally now (.vsix)

While the Marketplace listing is in flight, build a .vsix from this repo and side-load it:

npm install
npm run build --workspace=@tokenometer/vscode
npm run package:vsix --workspace=@tokenometer/vscode
code --install-extension packages/vscode/tokenometer-*.vsix

The same .vsix works in Cursor and VSCodium.

What it shows

The status bar (right side) shows three things, separated by ·:

opus-4-7 · 1,234 tok · $0.0186
  • Model — the active model id, shortened (full id in the tooltip).
  • Tokens — input token count for the current file. A leading ~ means the count is approximate (e.g. Claude / Gemini in offline mode).
  • Cost — input cost in USD at the model's published per-1k-input rate.

Hovering reveals the full model id, the exact token count, the 8-decimal cost, the tokenizer name, and a hint to click to switch model.

Settings

Setting Default Description
tokenometer.model claude-opus-4-7 Model id to count and price against. Run Tokenometer: Switch model for the full registry list.
tokenometer.format text Format conversion before counting (text, markdown, json, yaml, xml).
tokenometer.warnOnCostAbove 0 If non-zero, the status bar turns warning-colored when the file's input cost exceeds this USD value.

Settings can be changed per-workspace (Workspace Settings) or globally (User Settings) — switching via the command saves to the workspace if one is open, otherwise globally.

Commands

  • Tokenometer: Switch model — quick-pick over every model in @tokenometer/core's registry.
  • Tokenometer: Show details for current file — modal with the full breakdown.

Both commands appear under the Tokenometer: prefix in the command palette.

Supported files

The extension activates only on prompt-shaped content: .md, .markdown, .txt, .json, .jsonc, .yaml, .yml, .xml (matched by language id or extension). Anything else gets a hidden status bar item — no work, no noise.

Files larger than 1 MB are skipped to keep the editor responsive (— shown in place of the count).

How it works

Under the hood the extension reuses @tokenometer/core's tokenize() function — the same path the CLI takes. Counts, pricing, and tokenizer choices are identical to the rest of the suite.

Links

  • Root README — methodology, findings, and the full project overview.
  • tokenometer CLI on npm
  • Live playground

License

MIT

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