TokenWatch
AI coding cost attribution for dev agencies. TokenWatch tracks token usage from Cursor, Cline, and Windsurf per developer, project, and client — and surfaces it in a billing dashboard so you can recover AI costs as billable revenue.
What this extension does
When you open a project that has been initialized with TokenWatch, the extension:
- Starts a local HTTP proxy on
localhost:3030
- Automatically points Cursor or Cline's Anthropic base URL to the proxy
- Intercepts every AI API call, captures token usage and cost, and forwards it to your TokenWatch dashboard
- Shows a status bar indicator with your developer identity
Zero latency impact — usage data is sent fire-and-forget after the API response is already delivered to your tool.
Requirements
Your project must be initialized before the extension can track usage:
npx @tokenwatch/cli init
This creates a .tokenwatch/config.json in your project with your agency's ingest key and your developer identity. The extension discovers this file automatically — no further setup needed.
Team setup: Commit .tokenwatch/config.json to your repo. It contains only the ingest key (no personal credentials). Teammates who clone the repo get automatic tracking on first open — no init needed on their end.
| Tool |
Status |
Notes |
| Cursor |
✅ Supported |
Anthropic base URL set automatically |
| Cline |
✅ Supported |
API base URL set automatically |
| Windsurf |
🔜 Upcoming |
— |
Switch tools via Settings → TokenWatch → Tool.
Status bar
The status bar item in the bottom-right corner shows the current state:
| Status |
Meaning |
⬡ TokenWatch: tracking (you@agency.com) |
Proxy running, usage being captured |
⬡ TokenWatch: not configured |
No .tokenwatch/config.json found — run npx @tokenwatch/cli init |
⬡ TokenWatch: error |
Proxy failed to start — click to retry |
Click the status bar item to restart the proxy.
Commands
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search "TokenWatch":
- TokenWatch: Restart Proxy — restarts the local proxy
- TokenWatch: Stop Proxy — stops tracking for this session
- TokenWatch: Show Setup Instructions — shows the proxy URL with a copy button
- TokenWatch: Show Debug Info — shows current workspace paths
How it works
Cursor / Cline makes an API call
→ routed through localhost:3030 (this extension's proxy)
→ forwarded transparently to Anthropic / OpenAI
→ response streamed back to your tool with zero added latency
→ token usage parsed from response
→ POSTed to app.tokenwatch.one/api/ingest (fire-and-forget)
→ appears in dashboard under your developer name + project
Project attribution is automatic — the proxy reads your git remote URL and maps it to the correct project in your dashboard, regardless of local directory structure.
Dashboard
View spend by client, project, developer, and branch at app.tokenwatch.one.
TokenWatch is $99/mo per agency. Get started.
Data & Privacy
This extension collects the following data and sends it to the TokenWatch ingest API (app.tokenwatch.one/api/ingest):
- Token usage — input, output, and cache tokens per API call
- Cost — calculated from model pricing
- Developer identity — your name and email from
git config user.email
- Git metadata — repository remote URL and current branch name
- Tool — which AI coding tool made the request (Cursor, Cline)
This data is sent to your agency's TokenWatch dashboard only. It is never sold or shared with third parties.
The local proxy on localhost:3030 is required to intercept API calls before they reach the AI provider. Your API keys pass through the proxy to the upstream provider — they are never stored or logged by TokenWatch.
Privacy Policy