Skip to content

Supported AI Tools

Rynn edited this page Apr 24, 2026 · 1 revision

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.

Hook-based integrations

These tools invoke TokenTracker at the end of each session/turn. We write a line or two into their config files.

Claude Code

  • Hook location: ~/.claude/settings.jsonhooks.SessionEnd
  • Hook script: a shim that calls node ~/.tokentracker/app/hooks/notify.cjs claude
  • Logs we parse: Claude's JSONL session logs
  • Verify: tokentracker status shows claude: configured and a non-zero session count after your next Claude Code session

Codex CLI

  • Hook location: ~/.codex/config.tomlnotify array
  • Logs we parse: Codex rollout JSONL
  • Gotcha: Codex's raw input_tokens already includes cached tokens. We subtract cached_input_tokens in the normalizer, otherwise cost inflates 6–7× on cache-heavy sessions
  • Verify: grep tokentracker ~/.codex/config.toml should show a notify entry

Every Code

Same shape as Codex — TOML notify array in Every Code's config. Same caveats.

Gemini CLI

  • Hook location: ~/.gemini/settings.jsonhooks.SessionEnd
  • Logs we parse: Gemini's turn logs; we diff totals between sessions rather than summing deltas (Gemini reports cumulative)

Plugin-based integrations

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.

OpenCode

  • Plugin: ~/.tokentracker/app/opencode-plugin/ → linked via opencode plugins
  • Logs: OpenCode's own SQLite DB (~/.opencode/db.sqlite); the plugin also emits token events directly

OpenClaw

  • Plugin: ~/.tokentracker/app/openclaw-plugin/ → linked via openclaw 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

Passive readers (no installation into the target tool)

These tools already produce files we can read. We don't touch their config.

Cursor

  • 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

Kiro

  • Source: Kiro's SQLite sessions table + JSONL session files
  • Location: ~/.kiro/ (all platforms)

Hermes Agent

  • Source: Hermes's SQLite sessions table at ~/.hermes/state.db
  • Normalizer: parseHermesIncremental — tracks the last-seen row id per session to avoid double-counting

GitHub Copilot

  • Source: OpenTelemetry file exporter (Copilot's built-in)
  • How to enable: set COPILOT_OTEL_FILE_EXPORTER_PATH to a directory you choose (e.g. ~/.copilot-otel) and restart VS Code. tokentracker activate-if-needed suggests the right env var if it sees Copilot installed but OTEL not configured
  • Logs we parse: OTEL JSON spans; normalized by the rollout parser

Kimi Code

  • Source: ~/.kimi/sessions/**/wire.jsonl — Kimi writes every wire request/response here
  • Parser: parseKimiIncremental — tracks file byte-offsets to resume parsing without re-reading

Troubleshooting integrations

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-needed

Want another tool added?

Most 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.

Clone this wiki locally