Your AI coding usage, in your editor.
Context budget plus Claude Code, Copilot and Codex usage, in tokens or dollars.
See it work

- Live context budget for the active model
- Switch models in one tap
- Pin a file to keep it relevant
- Close low-relevance tabs
- Claude Code turns update on their own
- 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.
Harness before you type
NewTokens each skill, tool, MCP server and memory file adds at session start.
Waste finder
NewRepeated reads, oversized tool results and MCP servers you never use.
Tool calls per session
NewEvery call your agent makes, counted per tool.
Model and effort advice
NewA weekly suggestion from your own history. Nothing changes on its own.
Compaction and thinking share
NewWhen context was compacted, and how much output went to thinking.
Codex real window
NewContext fill from the window Codex reports, not the catalog.
Copilot CLI live usage
NewUsage while a session runs, not only after it ends.
Faster, smaller extension
NewIncremental log reads and a lighter bundle.
New catalog
NewFable 5.2, GPT 6.2 and Gemini 4, prices checked against each provider.
Highlights
Context budget meter
Tokens used against your model's window, broken down by source.
CommandSidebar: Token BudgetAgent 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 CodeCodexCopilotCommandTab relevance and cleanup
Scores every open tab and closes the noise in one click.
CommandModel catalog
42 current models with verified prices. Detects your Copilot model.
CommandSecure Workspace
Checks every secret file is hidden from agents, fixes gaps, then verifies.
CommandCode 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.
Claude Code hooks
BetaEvery hook across your settings scopes, checked against good practice. Open, remove or pause them in one place.
CommandWhat Claude Code runs
BetaTools, command-line programs and MCP servers from the last 7 days. Program names only, never arguments.
CommandSidebar: What Claude Code runsWhat it tracks
Claude Code
Turns, tokens, cache hits and context size per turn.
Exact tokensGitHub Copilot
Turns, model, prompt and output tokens from the sessions VS Code and the CLI keep.
Exact where recordedCodex
Turns, tokens, cached input and model per turn.
Exact tokensShow 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
Tab relevance
Language match, import link, path closeness, recent edit, diagnostics. Pinned and active tabs score 1.
Growth per turn
Average context added per turn in this session.
Turns remaining
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.
- 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 - 02
Register with Claude Code:
Terminal claude mcp add --transport stdio tokalator -- node "$PWD/build/index.js" - 03
Or install the CLI globally and run it:
Terminal npm install -g . tokalator usage --days 7
~/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).
ext install vfaraji89.tokalatorVSIX
Build the package, then use Extensions: Install from VSIX.
cd tokalator-extension-vs && npm install && npm run packageFrom source
Clone, install and compile.
git clone https://github.com/vfaraji89/tokalator.git
cd tokalator/tokalator-extension-vs
npm install
npm run compileReference
Chat commands 18
| Command | What it does |
|---|---|
/count | Show current token count and budget status |
/optimize | Close low-relevance tabs to free up tokens |
/pin | Pin a file so it's always included |
/breakdown | Show where your tokens are going |
/instructions | List, count, and estimate tokens for instruction files in workspace |
/model | Show or switch the active AI model |
/unpin | Unpin a file so it returns to normal relevance scoring |
/reset | Reset session state (chat turn counter) |
/compaction | Show per-turn token growth and compaction recommendations |
/preview | Preview token cost of your next message before sending |
/secure | Scan workspace security and auto-generate AI agent settings |
/skill-gen | Generate a checks skill (SKILL.md) from your build, lint and test commands |
/settings-gen | Create AGENTS.md and a CLAUDE.md that imports it, from your project files |
/exit | End the current session and save summary |
/codemap | Generate GLOSSARY.md and SITE-MAP.md for agents |
/harness | What loads before you type and its weekly cost |
/waste | Repeated reads, huge results and error loops in the last session |
/advise | Model and effort advice from your history |
Settings 21
| Setting | Default | Description |
|---|---|---|
tokalator.relevanceThreshold | 0.3 | Tabs below this relevance score are marked as distractors (0-1) |
tokalator.windowSize | 0 | Override context window size in tokens. Set to 0 (default) to use the selected model's window. |
tokalator.model | claude-opus-5-5 | AI model to calculate context budget against |
tokalator.autoRefreshInterval | 15000 | Dashboard refresh interval in milliseconds (minimum 5000) |
tokalator.claudeCode.enabled | true | Show 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.claudeCodeUpdates | true | Once 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.enabled | true | Show 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.enabled | true | Show OpenAI Codex CLI usage for sessions started in this workspace, read from local Codex session logs (CODEX_HOME or ~/.codex). Nothing is uploaded. |
tokalator.costDisplay | dollars | How Claude Code usage and turn costs are shown. Subscriptions are not billed per token, so subscribers may prefer tokens. |
tokalator.telemetry.enabled | false | Share 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.git | true | Trends: 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.github | false | Trends: 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.budget | 0 | Trends: monthly budget in USD (API-equivalent) for the month-end forecast. 0 turns the budget off. |
tokalator.plan.claude | auto | Your 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.chatgpt | auto | Your 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.copilot | none | Your 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.claude | 0 | Monthly price you pay for Claude in USD, overriding the catalog (a seat price or an annual discount). 0 uses the catalog. |
tokalator.plan.price.chatgpt | 0 | Monthly price you pay for ChatGPT in USD, overriding the catalog. 0 uses the catalog. |
tokalator.plan.price.copilot | 0 | Monthly price you pay for Copilot in USD, overriding the catalog. 0 uses the catalog. |
tokalator.plans.detect | true | Detect 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.observedFields | false | Also 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
| Provider | Models | Tokenizer | Notes |
|---|---|---|---|
| Claude Fable, Mythos, Opus, Sonnet, Haiku | @anthropic-ai/tokenizer | Approximate 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 | |
| GPT-6.2, 6.1, 6, 5.6, 5.5, 5.4, 5.3-Codex | o200k_base (js-tiktoken) | OpenAI's published encoding | |
| Gemini 4, 3.8 Flash, 3.6 Flash, 3.1 Pro, 3 Flash, 2.5 Pro | ~4 characters per token | Heuristic; 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.