-
Notifications
You must be signed in to change notification settings - Fork 121
Supported AI Tools
English · 简体中文
TokenTracker ingests usage from 11 AI tools via three mechanisms: hooks (the tool calls us), plugins (we ship a plugin the tool loads), and passive readers (we read files the tool already produces). This page documents each integration at implementation level — what gets written where, how to verify it, and how to debug.
Run tokentracker status anytime to see what's detected on your machine.
These tools invoke TokenTracker at the end of each session/turn. We write a line or two into their config files.
-
Hook location:
~/.claude/settings.json→hooks.SessionEnd -
Hook script: a shim that calls
node ~/.tokentracker/app/hooks/notify.cjs claude - Logs we parse: Claude's JSONL session logs
-
Verify:
tokentracker statusshowsclaude: configuredand a non-zero session count after your next Claude Code session
-
Hook location:
~/.codex/config.toml→notifyarray - Logs we parse: Codex rollout JSONL
-
Gotcha: Codex's raw
input_tokensalready includes cached tokens. We subtractcached_input_tokensin the normalizer, otherwise cost inflates 6–7× on cache-heavy sessions -
Verify:
grep tokentracker ~/.codex/config.tomlshould show a notify entry
Same shape as Codex — TOML notify array in Every Code's config. Same caveats.
-
Hook location:
~/.gemini/settings.json→hooks.SessionEnd - Logs we parse: Gemini's turn logs; we diff totals between sessions rather than summing deltas (Gemini reports cumulative)
These tools have a plugin system. The plugin ships inside the npm package at ~/.tokentracker/app/ and is symlinked into the tool's plugin directory by its own CLI — no manual copy.
-
Plugin:
~/.tokentracker/app/opencode-plugin/→ linked viaopencode plugins -
Logs: OpenCode's own SQLite DB (
~/.opencode/db.sqlite); the plugin also emits token events directly
-
Plugin:
~/.tokentracker/app/openclaw-plugin/→ linked viaopenclaw plugins install --link …+openclaw plugins enable - Logs: rollout-style JSONL via the session plugin
-
Legacy hook: older OpenClaw versions used a SessionEnd hook — still supported as fallback, see
src/lib/openclaw-hook.js
These tools already produce files we can read. We don't touch their config.
-
Source: Cursor's auth token (SQLite in
~/Library/Application Support/Cursor/or~/.config/Cursor/on Linux) + the usage CSV endpoint we call on your behalf - Privacy note: the auth token never leaves your machine; we only use it to authenticate our own HTTP request to Cursor's usage endpoint
- macOS permission: Cursor data lives inside App Support, which macOS protects with App Management permission. First launch of the macOS app prompts once
- Source: Kiro's SQLite sessions table + JSONL session files
-
Location:
~/.kiro/(all platforms)
-
Source: Hermes's SQLite sessions table at
~/.hermes/state.db -
Normalizer:
parseHermesIncremental— tracks the last-seen row id per session to avoid double-counting
- Source: OpenTelemetry file exporter (Copilot's built-in)
-
How to enable: set
COPILOT_OTEL_FILE_EXPORTER_PATHto a directory you choose (e.g.~/.copilot-otel) and restart VS Code.tokentracker activate-if-neededsuggests the right env var if it sees Copilot installed but OTEL not configured - Logs we parse: OTEL JSON spans; normalized by the rollout parser
-
Source:
~/.kimi/sessions/**/wire.jsonl— Kimi writes every wire request/response here -
Parser:
parseKimiIncremental— tracks file byte-offsets to resume parsing without re-reading
tokentracker status # Per-tool state (configured / skipped / error)
tokentracker doctor # Deeper health check — paths, permissions, queue size
tokentracker diagnostics # Full JSON dump (safe to attach to issues)If a tool shows skipped, the detail column explains why — usually one of:
- Tool CLI not on
PATH - Config file missing or unreadable
- Tool not installed (it's fine to ignore — we just won't sync that one)
To re-run detection after installing a new tool:
tokentracker activate-if-neededMost new integrations are a single parser file. Open an issue with the tool's log format or a sample file — that's usually enough to scope the work.