How to connect every tool we support.
One card per AI tool, with install + sync commands pre-filled for your OS. Pick your tool below or jump straight from the table.
| Source | Category | Jump to |
|---|---|---|
| Command Code | Local CLI | #command-code → |
| Claude Code | Local CLI | #claude-code → |
| Codex CLI | Local CLI | #codex-cli → |
| OpenCode | Local CLI | #opencode → |
| Cursor | Browser cookie | #cursor → |
| Cline | VS Code extension | #cline → |
| Roo Code | VS Code extension | #roo-code → |
| Gemini CLI | Local CLI | #gemini-cli → |
| OpenRouter | API key | #openrouter → |
| Anthropic (Admin) | API key | #anthropic-admin → |
| OpenAI (Admin) | API key | #openai-admin → |
| Replit Agent | Cloud tool (manual) | #replit → |
| Lovable | Cloud tool (manual) | #lovable → |
| Bolt.new | Cloud tool (manual) | #bolt → |
| v0 (Vercel) | Cloud tool (manual) | #v0 → |
Local CLI
Auto-detected by our CLI on every sync. Install the tool, use it once, run sync.
Command Code
Local CLICommand Code's terminal agent. TokenFlexing reads local session usage blocks and keeps prompts on your machine.
npm i -g command-code
Need Node 18+. Run `node --version` to check.
Open install page →npx tokenflexing@latest sync
~/.commandcode/**/*.jsonl- Usage appears after Command Code writes a session transcript with token counts.
- If a transcript has no usage block yet, the CLI reports Command Code as detected and keeps scanning on the next loop.
Claude Code
Local CLIAnthropic's official terminal coding assistant. Tokens read from per-session JSONL.
npm i -g @anthropic-ai/claude-code
Need Node 18+. Run `node --version` to check.
Open install page →npx tokenflexing@latest sync
~/.claude/projects/*/.jsonlCodex CLI
Local CLIOpenAI's terminal coding agent. Tokens read from per-turn rollouts.
npm i -g @openai/codex
Need Node 18+. Run `node --version` to check.
Open install page →npx tokenflexing@latest sync
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl- Only writes after a completed turn — run codex once before syncing.
OpenCode
Local CLIOpen-source AI coding agent (sst/opencode). Reads SQLite on 1.2+, JSON tree on legacy.
curl -fsSL https://opencode.ai/install | bash
Requires `sqlite3` (preinstalled on macOS). CLI v1.9+ needed for SQLite read.
Open install page →npx tokenflexing@latest sync
~/.local/share/opencode/opencode.db (1.2+) — fallback: storage/message/*.json- Cost stays $0 on subscription plans — tokens still real.
Gemini CLI
Local CLIGoogle's official Gemini CLI. Reads per-project chat JSONs.
npm i -g @google/gemini-cli
Need Node 18+. Run `node --version` to check.
Open install page →npx tokenflexing@latest sync
~/.gemini/tmp/<projectHash>/chats/*.json- Cost stays $0 — Gemini CLI doesn't persist per-message price.
VS Code extension
Auto-detected from the extension's task log. Install in VS Code, use it once, run sync.
Cline
VS Code extensionVS Code agent (saoudrizwan.claude-dev). Reads per-task Anthropic-shape conversation log.
code --install-extension saoudrizwan.claude-dev
Or open VS Code, search "Cline" in the Extensions panel.
Open install page →npx tokenflexing@latest sync
<VS Code globalStorage>/saoudrizwan.claude-dev/tasks/*/api_conversation_history.json- Cost stays $0 — Cline doesn't write per-message price.
Roo Code
VS Code extensionCline fork (rooveterinaryinc.roo-cline). Parses task UI log — events carry tokens + cost.
code --install-extension RooVeterinaryInc.roo-cline
Or open VS Code, search "Roo Code" in the Extensions panel.
Open install page →npx tokenflexing@latest sync
<VS Code globalStorage>/rooveterinaryinc.roo-cline/tasks/*/ui_messages.jsonBrowser cookie
Vendor doesn't expose tokens on disk. Paste one cookie and we pull usage daily.
Cursor
Browser cookieCursor doesn't write tokens to disk. We pull your dashboard CSV with your session cookie — one paste, daily sync.
npx tokenflexing@latest setup-cursor-auto
Opens an interactive prompt — full step-by-step below.
Open install page →npx tokenflexing@latest sync
~/.config/tokenflexing/cursor-usage.csv (cached export)- Session cookie expires every few days — re-run setup-cursor-auto when prompted.
- Manual fallback: download Settings → Usage → Export CSV, then `tokenflexing import-cursor <path>`.
- Realtime: `tokenflexing watch` polls every 5 min in foreground, or `tokenflexing daemon --install` runs hourly in background.
API key
Paste an org-scope API key. We read live usage from the vendor's billing endpoint.
OpenRouter
API keyMulti-model router. Daily / weekly / monthly USD spend + BYOK pass-through.
Visit openrouter.ai/keys → New key (starts with sk-or-v1-…)
Paste in /connections → New → OpenRouter.
Open install page →- No terminal step — paste once, syncs on every dashboard load.
Anthropic (Admin)
API keyOrg-scope admin key. Reads per-model usage from console.anthropic.com.
console.anthropic.com → Settings → Admin Keys → Create
Key starts with sk-ant-admin-. Only org admins can create one.
Open install page →- Personal API keys (sk-ant-api-) don't work — must be admin scope.
OpenAI (Admin)
API keyOrg-scope admin key. Reads /v1/organization/usage/completions + /costs.
platform.openai.com → Organization → Admin keys → Create
Key starts with sk-admin-. sk-proj-/sk-… user keys won't work.
Open install page →Cloud tool (manual)
Runs in the cloud — no local files, no public usage API. Enter your spend by hand. Self-reported, credits/$ only (no token count).
Replit Agent
Cloud tool (manual)Replit Agent runs in Replit's cloud and bills in Cycles/$. No local files, no usage API — enter your Agent spend by hand.
replit.com → Account → Usage / Billing → Agent spend
Copy the $ spent on Agent, then enter it under Cloud tools below.
Open install page →- Self-reported — Replit exposes no public usage API.
- $ only: Replit bills in Cycles, not raw model tokens.
Lovable
Cloud tool (manual)Lovable bills in monthly credits/messages with no token breakdown. Enter your plan spend by hand.
lovable.dev → Settings → Plan / Billing
Enter your monthly plan $ under Cloud tools below.
Open install page →- Self-reported — Lovable exposes no public usage API.
- Credits/$ only: no per-token data exists.
Bolt.new
Cloud tool (manual)Bolt.new (StackBlitz) shows a token allowance in-app but has no public API. Enter your spend/tokens by hand.
bolt.new → account menu → Usage / Subscription
Enter your monthly $ under Cloud tools below.
Open install page →- Self-reported — Bolt has no public usage API yet.
v0 (Vercel)
Cloud tool (manual)v0 bills in monthly credits via Vercel. No public usage API — enter your plan spend by hand.
v0.dev → account → Billing / Plan
Enter your monthly plan $ under Cloud tools below.
Open install page →- Self-reported — v0 exposes no public usage API.
Don't see your tool?
Open an issue or ping us. If the agent writes structured tokens to disk we can usually add a parser inside an afternoon — same shape the existing local sources use.