Pre-flight token count and cost estimation for Cursor / VS Code — before you hit send.
Features
Live status bar — token count and estimated cost updates as you type, on every file
Clipboard auto-watcher — copy your prompt anywhere → cost estimate appears instantly (no button press)
Sidebar panel — model picker, cursor mode selector, output size override, cost breakdown, pool burn tracker
Cursor mode presets — Ask / Edit / Agent / Debug / Plan — each with tuned output token and step estimates
Output size override — Minimal / Low / Auto / Large / XL — fine-tune output token estimate on top of mode default
Cursor-native models — Composer 1.5, Composer 1, and Auto (plan) all supported
Auto mode shadow pricing — shows what a turn would cost, with 2.6–3.6× Cursor overhead range
Attach files — pick specific files to include in token count (simulates @file context)
Smart folder scan — top 30 most-recently-modified files (simulates Cursor codebase retrieval) or full folder scan
Cache cost row — shows estimated cost with Cursor prompt caching vs cold
Max mode surcharge — toggle +20% for Cursor overage billing
Cursor hooks — logs every agent turn to ~/.cursor-preflight/usage.log automatically
Usage Log tab — turn counts by model, project, and day; monthly pool burn tracker
Live prices — fetched from OpenRouter at startup, falls back to hardcoded table offline
Supported Models
Model
Input $/1M
Output $/1M
Cursor Composer 1.5
$3.50
$17.50
Cursor Composer 1
$1.25
$10.00
Cursor Auto
covered
covered
Claude Sonnet 4.5/4.6
$3.00
$15.00
Claude Opus 4.5/4.6
$15.00
$75.00
Claude Haiku 4.5
$0.80
$4.00
GPT-4o
$2.50
$10.00
GPT-4o Mini
$0.15
$0.60
o1
$15.00
$60.00
Gemini 2.0 Flash
$0.10
$0.40
+ 300+ via OpenRouter live feed
Install
# One-time: install the VS Code packager
npm install -g @vscode/vsce
# Package the extension
cd token-preflight
vsce package --no-dependencies
# Install in Cursor
cursor --install-extension promptmeter-0.2.0.vsix
# Or in VS Code
code --install-extension promptmeter-0.2.0.vsix
Restart Cursor. You'll see:
A speedometer icon in the left activity bar
A token counter in the bottom-right status bar
A 📋 clipboard status bar item (appears after first copy)
A ✓ hooks / ⊘ hooks indicator
Keyboard Shortcut
Shortcut
Action
Cmd+Shift+T (text selected)
Estimate selection
Cmd+Shift+T (nothing selected)
Estimate clipboard
Workflow
Draft prompt (file, editor, or anywhere)
↓
Copy it → 📋 status bar updates in 1.5s
↓
Sidebar auto-fills + estimates
↓
Cost OK? → paste into Cursor agent box → send
Cost high? → trim prompt → repeat
↓
After agent finishes → hook logs the turn
Setup Cursor Hooks (Usage Log)
Open the sidebar panel (speedometer icon)
Click Usage Log tab
Click ⚙ Setup Cursor Hooks
Done — every agent turn is now logged to ~/.cursor-preflight/usage.log
Or run from Command Palette: Promptmeter: Setup Cursor Hooks