Tokalator4.3.0…installs…downloads
01Extension

Your AI coding usage, in your editor.

Context budget plus Claude Code, Copilot and Codex usage, in tokens or dollars.

4.3.0Latest version
42Models priced
18Chat commands
1.99.0+VS Code

See it work

Recording of the Tokalator dashboard: context budget, switching models, pinning a file, closing low-relevance tabs, a Claude Code turn arriving, and collapsing sections
  1. Live context budget for the active model
  2. Switch models in one tap
  3. Pin a file to keep it relevant
  4. Close low-relevance tabs
  5. Claude Code turns update on their own
  6. Collapse what you do not need

New in 4.3.0

Fixes first: exact model matching, correct output and tool counts, and costs that match your logs.

01

Harness before you type

New

Tokens each skill, tool, MCP server and memory file adds at session start.

02

Waste finder

New

Repeated reads, oversized tool results and MCP servers you never use.

03

Tool calls per session

New

Every call your agent makes, counted per tool.

04

Model and effort advice

New

A weekly suggestion from your own history. Nothing changes on its own.

05

Compaction and thinking share

New

When context was compacted, and how much output went to thinking.

06

Codex real window

New

Context fill from the window Codex reports, not the catalog.

07

Copilot CLI live usage

New

Usage while a session runs, not only after it ends.

08

Faster, smaller extension

New

Incremental log reads and a lighter bundle.

09

New catalog

New

Fable 5.2, GPT 6.2 and Gemini 4, prices checked against each provider.

Highlights

01

Context budget meter

Tokens used against your model's window, broken down by source.

CommandSidebar: Token Budget
02

Agent usage

Claude Code, GitHub Copilot and Codex turns, tokens and cost from their local logs, side by side in the All tab. Updates on its own.

Claude CodeCodexCopilotCommand
03

Tab relevance and cleanup

Scores every open tab and closes the noise in one click.

Command
04

Model catalog

42 current models with verified prices. Detects your Copilot model.

Command
05

Secure Workspace

Checks every secret file is hidden from agents, fixes gaps, then verifies.

Command
06

Code maps

GLOSSARY.md and SITE-MAP.md so agents find the right files first.

Command
  • Dashboard in an editor tabNew
  • Guided walkthroughNew
  • Turn analytics
  • Pinned files
  • Long-context pricingTurn Cost card
  • Instruction file audit
  • Opt-in telemetry and feedback

In beta

These work and are tested, and may change as we hear how you use them. Feedback welcome.

01

Claude Code hooks

Beta

Every hook across your settings scopes, checked against good practice. Open, remove or pause them in one place.

Command
02

What Claude Code runs

Beta

Tools, command-line programs and MCP servers from the last 7 days. Program names only, never arguments.

CommandSidebar: What Claude Code runs

What it tracks

Claude Code

VS Code extension and CLI

Turns, tokens, cache hits and context size per turn.

Exact tokens

GitHub Copilot

Chat in VS Code and Copilot CLI

Turns, model, prompt and output tokens from the sessions VS Code and the CLI keep.

Exact where recorded

Codex

OpenAI Codex CLI

Turns, tokens, cached input and model per turn.

Exact tokens

Show usage as API-equivalent dollars, as tokens only (for subscriptions), or both. When Copilot did not record a request's tokens, Tokalator estimates them and shows the estimated share.

How it counts

01

Tab relevance

R=0.25 L+0.30 I+0.20 P+0.15 E+0.10 DR = 0.25\,L + 0.30\,I + 0.20\,P + 0.15\,E + 0.10\,D

Language match, import link, path closeness, recent edit, diagnostics. Pinned and active tabs score 1.

02

Growth per turn

g=cn−c1n−1g = \frac{c_n - c_1}{n - 1}

Average context added per turn in this session.

03

Turns remaining

t=⌊W−cng⌋t = \left\lfloor \frac{W - c_n}{g} \right\rfloor

Turns left in window W at the current growth.

MCP server and CLI

Token counts, budgets and Claude Code usage inside Claude Code and your terminal.

  1. 01

    Clone and build (Node.js 18 or later):

    Terminal
    git clone https://github.com/vfaraji89/tokalator.git
    cd tokalator/tokalator-mcp && npm install && npm run build
  2. 02

    Register with Claude Code:

    Terminal
    claude mcp add --transport stdio tokalator -- node "$PWD/build/index.js"
  3. 03

    Or install the CLI globally and run it:

    Terminal
    npm install -g .
    tokalator usage --days 7
tokalator CLI 4.3.0
~/my-repo $ tokalator count src/core/claudeCodeUsage.pure.ts
Model:      Claude Opus 5.5
Tokenizer:  Claude BPE tokenizer (approximate)
Tokens:     2,745
Characters: 9,315

~/my-repo $ tokalator preview 182000
Now:              ~182.0K  [████░░░░░░░░░░░░░░░░░░░░]
After next turn:  ~182.8K  (18.3%)
Output reserve:   ~128.0K
Remaining:        ~689.2K  (~861 turns left)

Install

Marketplace

VS Code 1.99 or later. Paste into Quick Open (Cmd+P or Ctrl+P).

Quick Open
ext install vfaraji89.tokalator

VSIX

Build the package, then use Extensions: Install from VSIX.

Terminal
cd tokalator-extension-vs && npm install && npm run package

From source

Clone, install and compile.

Terminal
git clone https://github.com/vfaraji89/tokalator.git
cd tokalator/tokalator-extension-vs
npm install
npm run compile

Reference

Chat commands 18
CommandWhat it does
/countShow current token count and budget status
/optimizeClose low-relevance tabs to free up tokens
/pinPin a file so it's always included
/breakdownShow where your tokens are going
/instructionsList, count, and estimate tokens for instruction files in workspace
/modelShow or switch the active AI model
/unpinUnpin a file so it returns to normal relevance scoring
/resetReset session state (chat turn counter)
/compactionShow per-turn token growth and compaction recommendations
/previewPreview token cost of your next message before sending
/secureScan workspace security and auto-generate AI agent settings
/skill-genGenerate a checks skill (SKILL.md) from your build, lint and test commands
/settings-genCreate AGENTS.md and a CLAUDE.md that imports it, from your project files
/exitEnd the current session and save summary
/codemapGenerate GLOSSARY.md and SITE-MAP.md for agents
/harnessWhat loads before you type and its weekly cost
/wasteRepeated reads, huge results and error loops in the last session
/adviseModel and effort advice from your history
Settings 21
SettingDefaultDescription
tokalator.relevanceThreshold0.3Tabs below this relevance score are marked as distractors (0-1)
tokalator.windowSize0Override context window size in tokens. Set to 0 (default) to use the selected model's window.
tokalator.modelclaude-opus-5-5AI model to calculate context budget against
tokalator.autoRefreshInterval15000Dashboard refresh interval in milliseconds (minimum 5000)
tokalator.claudeCode.enabledtrueShow token usage and cost from local Claude Code session logs (CLI and VS Code extension) for this workspace. Reads ~/.claude/projects (or CLAUDE_CONFIG_DIR) on this machine; nothing is uploaded.
tokalator.claudeCodeUpdatestrueOnce a day, download the public Claude Code changelog and commands reference to show updates that touch what you use and suggest the next command to try. Plain GET requests with cache headers only; nothing about you or your sessions is sent. Works offline from the last download.
tokalator.agents.copilot.enabledtrueShow GitHub Copilot usage: Copilot Chat sessions that VS Code stores for this workspace, and Copilot CLI sessions started in this workspace. Read locally; nothing is uploaded.
tokalator.agents.codex.enabledtrueShow OpenAI Codex CLI usage for sessions started in this workspace, read from local Codex session logs (CODEX_HOME or ~/.codex). Nothing is uploaded.
tokalator.costDisplaydollarsHow Claude Code usage and turn costs are shown. Subscriptions are not billed per token, so subscribers may prefer tokens.
tokalator.telemetry.enabledfalseShare anonymous daily usage counts (feature use, model IDs, Claude Code totals) with tokalator.ai to improve the extension. Off by default. Never includes code, file names, paths, or prompts. Also requires VS Code telemetry to be on. Use Tokalator: Show Telemetry Data to see exactly what is sent and Tokalator: Delete My Telemetry Data to erase it. Privacy policy
tokalator.trends.gittrueTrends: count your own commits in the workspace repository with `git log` (run locally, in the background) for cost per commit. Only dates and counts are kept.
tokalator.trends.githubfalseTrends: count your merged pull requests with `gh pr list --state merged` for cost per merged PR. Needs the GitHub CLI signed in. Only merge dates are kept.
tokalator.trends.budget0Trends: monthly budget in USD (API-equivalent) for the month-end forecast. 0 turns the budget off.
tokalator.plan.claudeautoYour Claude plan. `auto` detects it from `claude auth status` and the statusline rate limits. Prices come from the dated catalog in plans.json (vendor pricing pages, checked 2026-11-20).
tokalator.plan.chatgptautoYour ChatGPT plan for Codex. `auto` detects API key or ChatGPT sign-in from `codex login status`. Prices come from the dated catalog in plans.json (vendor pricing pages, checked 2026-11-20).
tokalator.plan.copilotnoneYour GitHub Copilot plan. Copilot does not store it locally, so pick it here to compare AI Credits with the allowance. Prices come from the dated catalog in plans.json (vendor pricing pages, checked 2026-11-20).
tokalator.plan.price.claude0Monthly price you pay for Claude in USD, overriding the catalog (a seat price or an annual discount). 0 uses the catalog.
tokalator.plan.price.chatgpt0Monthly price you pay for ChatGPT in USD, overriding the catalog. 0 uses the catalog.
tokalator.plan.price.copilot0Monthly price you pay for Copilot in USD, overriding the catalog. 0 uses the catalog.
tokalator.plans.detecttrueDetect plans from documented signals: `claude auth status` (authMethod only), the Claude Code statusline rate limits saved by `tokalator statusline`, and `codex login status`. Runs locally at most once a day.
tokalator.plans.observedFieldsfalseAlso use undocumented local fields, labeled observed: the plan tier fields of `oauthAccount` in `~/.claude.json` (never email, names or ids), Codex rollout rate limits and plan type, and Copilot Chat credits. No tokens are ever read.
Tokenizers 3
ProviderModelsTokenizerNotes
AnthropicClaude Fable, Mythos, Opus, Sonnet, Haiku@anthropic-ai/tokenizerApproximate for Claude 3 and later; Claude Opus 4.7 and newer tokenize the same text into roughly 1.0 to 1.35 times as many tokens
OpenAIGPT-6.2, 6.1, 6, 5.6, 5.5, 5.4, 5.3-Codexo200k_base (js-tiktoken)OpenAI's published encoding
GoogleGemini 4, 3.8 Flash, 3.6 Flash, 3.1 Pro, 3 Flash, 2.5 Pro~4 characters per tokenHeuristic; Gemini's tokenizer is not published for local use

Questions

Does Tokalator track Claude Code usage?

Yes. It reads Claude Code's local session logs, written by both the VS Code extension and the CLI, and shows turns, requests, cache hit rate, context size per turn, and cost. It refreshes every 15 seconds while the sidebar is open, and the active model follows the agent you used last.

Does Tokalator keep any of my data?

Zero data retention for your work. Your code, prompts, chats, file names and paths never leave your machine, so nothing about your work is stored anywhere. With telemetry off, which is the default, the extension sends nothing about you to any server. If you opt in, only anonymous daily counts are kept, deleted after 13 months or whenever you ask.

Does it track GitHub Copilot usage?

Yes, from version 4.1.2. VS Code keeps your Copilot Chat sessions on your machine, and recent versions record each request's prompt and output tokens and the model that answered. Tokalator reads those files locally, estimates the requests where tokens were not recorded, and shows the estimated share. It also reads Copilot CLI sessions. For multi-step agent requests VS Code records only the final prompt size, so input can be undercounted.

Which coding agents does it support?

Claude Code (VS Code extension and CLI), GitHub Copilot (Chat in VS Code and the Copilot CLI) and the OpenAI Codex CLI. Each has its own tab on the usage card and its own setting. Everything is read on your machine.

What does API-equivalent cost mean?

It is what the tokens would cost at API list prices. If you use a Claude, Copilot or ChatGPT subscription you are not billed per token, so switch the usage card to Tokens (setting tokalator.costDisplay) to hide dollar amounts.

Is my code sent anywhere?

No. Everything runs locally. The only default network request downloads the public pricing catalog from GitHub. Telemetry is opt-in, off by default, and never includes code, file names, paths, or prompts.

Is Tokalator free?

Yes. The extension, the website tools, and the MCP server are free and open source under the AGPL-3.0-or-later license.