tokenflex/ing
Docs · Supported sources · your OS

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.

SourceCategoryJump to
Command CodeLocal CLI#command-code
Claude CodeLocal CLI#claude-code
Codex CLILocal CLI#codex-cli
OpenCodeLocal CLI#opencode
CursorBrowser cookie#cursor
ClineVS Code extension#cline
Roo CodeVS Code extension#roo-code
Gemini CLILocal CLI#gemini-cli
OpenRouterAPI key#openrouter
Anthropic (Admin)API key#anthropic-admin
OpenAI (Admin)API key#openai-admin
Replit AgentCloud tool (manual)#replit
LovableCloud tool (manual)#lovable
Bolt.newCloud 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 CLI

Command Code's terminal agent. TokenFlexing reads local session usage blocks and keeps prompts on your machine.

1. Recommended · npm · your OS
npm i -g command-code

Need Node 18+. Run `node --version` to check.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives~/.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 CLI

Anthropic's official terminal coding assistant. Tokens read from per-session JSONL.

1. Recommended · npm · your OS
npm i -g @anthropic-ai/claude-code

Need Node 18+. Run `node --version` to check.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives~/.claude/projects/*/.jsonl

Codex CLI

Local CLI

OpenAI's terminal coding agent. Tokens read from per-turn rollouts.

1. Recommended · npm · your OS
npm i -g @openai/codex

Need Node 18+. Run `node --version` to check.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
  • Only writes after a completed turn — run codex once before syncing.

OpenCode

Local CLI

Open-source AI coding agent (sst/opencode). Reads SQLite on 1.2+, JSON tree on legacy.

1. Recommended · install script · your OS
curl -fsSL https://opencode.ai/install | bash

Requires `sqlite3` (preinstalled on macOS). CLI v1.9+ needed for SQLite read.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives~/.local/share/opencode/opencode.db (1.2+) — fallback: storage/message/*.json
  • Cost stays $0 on subscription plans — tokens still real.

Gemini CLI

Local CLI

Google's official Gemini CLI. Reads per-project chat JSONs.

1. Recommended · npm · your OS
npm i -g @google/gemini-cli

Need Node 18+. Run `node --version` to check.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives~/.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 extension

VS Code agent (saoudrizwan.claude-dev). Reads per-task Anthropic-shape conversation log.

1. VS Code → Extensions → search · your OS
code --install-extension saoudrizwan.claude-dev

Or open VS Code, search "Cline" in the Extensions panel.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives<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 extension

Cline fork (rooveterinaryinc.roo-cline). Parses task UI log — events carry tokens + cost.

1. VS Code → Extensions → search · your OS
code --install-extension RooVeterinaryInc.roo-cline

Or open VS Code, search "Roo Code" in the Extensions panel.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives<VS Code globalStorage>/rooveterinaryinc.roo-cline/tasks/*/ui_messages.json

Browser cookie

Vendor doesn't expose tokens on disk. Paste one cookie and we pull usage daily.

Cursor

Browser cookie

Cursor doesn't write tokens to disk. We pull your dashboard CSV with your session cookie — one paste, daily sync.

1. Start the guided setup · your OS
npx tokenflexing@latest setup-cursor-auto

Opens an interactive prompt — full step-by-step below.

Open install page →
2. Sync to your profile
npx tokenflexing@latest sync
Where the data lives~/.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 key

Multi-model router. Daily / weekly / monthly USD spend + BYOK pass-through.

1. Get a key · your OS
Visit openrouter.ai/keys → New key (starts with sk-or-v1-…)

Paste in /connections → New → OpenRouter.

Open install page →
Paste your key on /connections/new →
  • No terminal step — paste once, syncs on every dashboard load.

Anthropic (Admin)

API key

Org-scope admin key. Reads per-model usage from console.anthropic.com.

1. Mint an admin key · your OS
console.anthropic.com → Settings → Admin Keys → Create

Key starts with sk-ant-admin-. Only org admins can create one.

Open install page →
Paste your key on /connections/new →
  • Personal API keys (sk-ant-api-) don't work — must be admin scope.

OpenAI (Admin)

API key

Org-scope admin key. Reads /v1/organization/usage/completions + /costs.

1. Mint an admin key · your OS
platform.openai.com → Organization → Admin keys → Create

Key starts with sk-admin-. sk-proj-/sk-… user keys won't work.

Open install page →
Paste your key on /connections/new →

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.

1. Where to find your number · your OS
replit.com → Account → Usage / Billing → Agent spend

Copy the $ spent on Agent, then enter it under Cloud tools below.

Open install page →
Paste your key on /connections/new →
  • 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.

1. Where to find your number · your OS
lovable.dev → Settings → Plan / Billing

Enter your monthly plan $ under Cloud tools below.

Open install page →
Paste your key on /connections/new →
  • 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.

1. Where to find your number · your OS
bolt.new → account menu → Usage / Subscription

Enter your monthly $ under Cloud tools below.

Open install page →
Paste your key on /connections/new →
  • 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.

1. Where to find your number · your OS
v0.dev → account → Billing / Plan

Enter your monthly plan $ under Cloud tools below.

Open install page →
Paste your key on /connections/new →
  • 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.