tokscale README

The project's README from github.com/junhoyeo/tokscale. As one markdown file: README.md.

Tokscale

A high-performance CLI tool and visualization dashboard for tracking token usage and costs across multiple AI coding agents.

[!TIP]

I drop new open-source work every week. Don't miss the next one.

GitHub Follow Follow @junhoyeo on GitHub for more projects. Hacking on AI, infra, and everything in between.
Discord link Come hang out in our Discord — and surround yourself with the world's top-tier vibers.
Sponsor Tokscale Support Tokscale's continued development through GitHub Sponsors.

GitHub Release npm Version npm Downloads GitHub Contributors GitHub Forks GitHub Stars GitHub Issues License Coverage

🇺🇸 English | 🇰🇷 한국어 | 🇯🇵 日本語 | 🇨🇳 简体中文

Overview Models
TUI Overview TUI Models
Daily Summary Stats
TUI Daily Summary TUI Stats
Frontend (3D Contributions Graph) Wrapped 2025
Frontend (3D Contributions Graph) Wrapped 2025

Run bunx tokscale@latest submit to submit your usage data to the leaderboard and create your public profile!

Overview

Tokscale helps you monitor and analyze your token consumption from:

Logo Client Data Location
OpenCode OpenCode ~/.local/share/opencode/opencode.db (1.2+, all channels including opencode-stable.db) or/and ~/.local/share/opencode/storage/message/ (legacy/unmigrated)
Claude Claude Code ~/.claude/projects/ and ~/.claude/transcripts/
OpenClaw OpenClaw ~/.openclaw/agents/ (*/agent/openclaw-agent.sqlite + */sessions/*.jsonl; + legacy: .clawdbot, .moltbot, .moldbot)
Codex Codex CLI ~/.codex/sessions/
Prime Agent Prime Agent ~/.prime/agent/sessions/ and ~/.prime/agent/session-artifacts/ (RLM child sessions)
Sakana Fugu Sakana Fugu via Codex — ~/.codex/sessions/*.jsonl (model_provider: sakana)
Copilot GitHub Copilot CLI ~/.copilot/otel/*.jsonl (+ COPILOT_OTEL_FILE_EXPORTER_PATH)
Hermes Agent Hermes Agent $HERMES_HOME/state.db and $HERMES_HOME/profiles/*/state.db (fallback: ~/.hermes/...)
Gemini Gemini CLI $GEMINI_CLI_HOME/tmp/*/chats/*.json (fallback: ~/.gemini/tmp/*/chats/*.json)
Cursor Cursor IDE Cursor API export cached at ~/.config/tokscale/cursor-cache/usage*.csv (desktop auto-login or cookie paste; not ~/.cursor)
Amp Amp (AmpCode) ~/.local/share/amp/threads/
Codebuff Codebuff ~/.config/manicode/ (+ manicode-dev, manicode-staging; override via CODEBUFF_DATA_DIR)
Freebuff Freebuff shares ~/.config/manicode/ with Codebuff (same runtime); token usage is estimated from the transcript (no local usage; override via FREEBUFF_DATA_DIR)
Droid Droid (Factory Droid) ~/.factory/sessions/
Pi Pi ~/.pi/agent/sessions/
Oh My Pi Oh My Pi ~/.omp/agent/sessions/**/*.jsonl
Senpi Senpi (OmO Native) ~/.senpi/agent/sessions/ (override via SENPI_CODING_AGENT_DIR)
Kimchi Kimchi Coding ~/.config/kimchi/harness/sessions/ (override via KIMCHI_CODING_AGENT_DIR)
Reasonix Reasonix ~/.reasonix/stats/*.jsonl (override via REASONIX_STATE_HOME or REASONIX_HOME)
Kimi Kimi CLI / Kimi Code kimi-cli: ~/.kimi/sessions/ kimi-code: ~/.kimi-code/sessions/ (override via KIMI_CODE_HOME) kimi-work: desktop app-data root (auto-discovered)
Qwen Qwen CLI ~/.qwen/projects/
Roo Code Roo Code ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/tasks/ (+ server: ~/.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/tasks/)
Kilo Kilo ~/.config/Code/User/globalStorage/kilocode.kilo-code/tasks/ (+ server: ~/.vscode-server/data/User/globalStorage/kilocode.kilo-code/tasks/)
Kilo CLI Kilo CLI ~/.local/share/kilo/kilo.db
Mux Mux ~/.mux/sessions/
Crush Crush $XDG_DATA_HOME/crush/projects.json (project registry; fallback: ~/.local/share/crush/projects.json)
Goose Goose ~/.local/share/goose/sessions/sessions.db (+ macOS Application Support, legacy Block/goose paths; override via GOOSE_PATH_ROOT)
Antigravity Google Antigravity Cached via tokscale antigravity sync to ~/.config/tokscale/antigravity-cache/sessions/*.jsonl (live RPC against the local language server)
Antigravity CLI Antigravity CLI ~/.gemini/antigravity-cli/conversations/*.db (override the Gemini home via GEMINI_CLI_HOME; local SQLite, read directly — no antigravity sync needed)
Trae Trae IDE / Trae Solo (international) Cached via tokscale trae sync to ~/.config/tokscale/trae-cache/sessions/*.json (account-level usage from the official API)
Warp Warp / Oz Cached via tokscale warp sync to ~/.config/tokscale/warp-cache/usage.json (aggregate requests and spend only; no token transcripts)
Grok Build Grok Build $GROK_HOME/sessions/*/*/updates.jsonl (fallback: ~/.grok/sessions/*/*/updates.jsonl)
Zed Agent Zed Agent ~/.local/share/zed/threads/threads.db (macOS: ~/Library/Application Support/Zed/threads/threads.db; Windows: %LOCALAPPDATA%/Zed/threads/threads.db; hosted Zed models only, not external ACP agents)
Kiro Kiro ~/.kiro/sessions/cli/*.json (+ *.jsonl), ~/.local/share/kiro-cli/data.sqlite3 (macOS: ~/Library/Application Support/kiro-cli/data.sqlite3), and Kiro IDE globalStorage snapshots (Kiro/User/globalStorage/kiro.kiroagent; macOS Application Support, Linux ~/.config/Kiro, Windows %APPDATA%\Kiro)
Cline Cline VS Code globalStorage tasks (Linux: ~/.config/Code/...; macOS: ~/Library/Application Support/Code/...; Windows: %APPDATA%\Code\...; server: ~/.vscode-server/data/User/globalStorage/saoudrizwan.claude-dev/tasks/) + Cline CLI sessions (first available root, in order: $CLINE_SESSION_DATA_DIR, $CLINE_DATA_DIR/sessions/, $CLINE_DIR/data/sessions/, fallback ~/.cline/data/sessions/; blank/whitespace-only environment values are ignored)
Gajae-Code gajae-code (gjc) ~/.gjc/agent/sessions/ (override via GJC_CODING_AGENT_DIR, GJC_CONFIG_DIR, PI_CONFIG_DIR; $XDG_DATA_HOME/gjc/sessions/ on Linux/macOS)
Cherry Studio Cherry Studio %APPDATA%\CherryStudio\Data\Agents\.claude\projects\*.jsonl and legacy %APPDATA%\CherryStudio\.claude\projects\*.jsonl (macOS: ~/Library/Application Support/CherryStudio/Data/Agents/.claude/projects/; Linux: $XDG_CONFIG_HOME/CherryStudio/Data/Agents/.claude/projects/; Agent / Claude Code mode transcripts; V2 root preferred, legacy keeps untransferred history)
LM Studio LM Studio ~/.lmstudio/server-logs/**/*.log (LM_STUDIO_HOME supported; Chat Completions and Responses API final-response usage only; prompts and responses are not retained; local inference cost is $0)
Unsloth Studio Unsloth Studio $UNSLOTH_STUDIO_HOME/studio.db (fallback: ~/.unsloth/studio/studio.db; exact internal-chat and authenticated API inference usage; message content is not read; training metrics are excluded; local inference cost is $0)
Hindsight Hindsight $HINDSIGHT_HOME/usage/*.jsonl (fallback: ~/.hindsight/usage/*.jsonl; populated via tokscale hindsight sync)
Jcode Jcode ~/.jcode/sessions/session_*.json + session_*.journal.jsonl sidecars (override via JCODE_HOME)
MiMo Code MiMo Code ~/.local/share/mimocode/mimocode.db (XDG data dir; SQLite)
Junie Junie ~/.junie/sessions/*/events.jsonl
Command Code Command Code ~/.commandcode/projects/**/*.jsonl (v3 transcripts persist per-request usage and cost; estimated fallback only for legacy transcripts without a usage block)
ZCode ZCode ~/.zcode/cli/db/db.sqlite (v2 usage database) and ~/.zcode/projects/**/*.jsonl (legacy transcripts)
OpenCodeReview OpenCodeReview ~/.opencodereview/sessions/**/*.jsonl
CodeBuddy CodeBuddy (CLI, IDE, VS Code plugin) ~/.codebuddy/projects/**/*.jsonl + extension logs
WorkBuddy WorkBuddy ~/.workbuddy/projects/**/*.jsonl + SQLite fallback
Devin CLI Devin CLI ~/.local/share/devin/cli/sessions.db (SQLite)
Devin Desktop Devin Desktop ACP events: macOS ~/Library/Application Support/Devin/User/acp-events/; Linux ~/.config/Devin/User/acp-events/; Windows %APPDATA%\Devin\User\acp-events\
Augment Code Augment Code (Auggie CLI) ~/.augment/sessions/*.json
Synthetic Synthetic Re-attributed from other sources via hf: model prefix or synthetic provider (+ Octofriend: ~/.local/share/octofriend/sqlite.db)
DeepSeek Harness DeepSeek Harness ~/.dsh/sessions/**/session.jsonl.zstd (or session.jsonl when written uncompressed; override via DSH_HOME)
MiniMax Code MiniMax Code ~/.config/tokscale/headless/mcode/*.jsonl (headless capture of mcode exec --output-format stream-json; override via TOKSCALE_HEADLESS_DIR)
Fx fx ~/.fx/sessions/<sessionId>/usage-v2.json (per-session aggregates)

Get real-time pricing calculations using 🚅 LiteLLM's pricing data, with support for tiered pricing models and cache token discounts.

Why "Tokscale"?

Tokscale

This project is inspired by the Kardashev scale, a method proposed by astrophysicist Nikolai Kardashev to measure a civilization's level of technological advancement based on its energy consumption. A Type I civilization harnesses all energy available on its planet, Type II captures the entire output of its star, and Type III commands the energy of an entire galaxy.

In the age of AI-assisted development, tokens are the new energy. They power our reasoning, fuel our productivity, and drive our creative output. Just as the Kardashev scale tracks energy consumption at cosmic scales, Tokscale measures your token consumption as you scale the ranks of AI-augmented development. Whether you're a casual user or burning through millions of tokens daily, Tokscale helps you visualize your journey up the scale—from planetary developer to galactic code architect.

Contents

tokscale (junhoyeo/tokscale)

Searching Database…

What is this?Tokscale is a terminal tool that tracks how many tokens and how much money you burn across AI coding agents like Claude Code, Codex, Cursor, and Gemini CLI — with a dashboard and a global leaderboard on top.
Does it live in my terminal, or is it a separate dashboard?Both: the core is a CLI and TUI you run in the terminal for daily summaries, stats, and filtering, and there is also a frontend with a 3D contributions graph and a Wrapped 2025 recap.
How do I get it running?Run it with Bun: `bunx tokscale@latest`. There is also a from-source build path using Cargo plus Bun, and the repo ships Docker and Compose files.
Which coding agents does it actually track?Dozens: Claude Code, OpenCode, Codex CLI, Gemini CLI, Cursor IDE, GitHub Copilot CLI, Amp, Droid, Hermes Agent, OpenClaw, and many more — it reads each tool's local session files, like ~/.claude/projects/ or ~/.codex/sessions/.
Does every agent just work, or do some need extra setup?Most are read straight from disk, but a few need a sync or export first — Cursor IDE uses an API export with desktop auto-login or a cookie paste, and clients like Google Antigravity, Trae, and Warp cache data via dedicated sync commands.
Does it work on Windows and Linux, or just macOS?All three — it is a cross-platform Rust CLI, and the README documents data paths for macOS, Linux, and Windows side by side.
Does my usage data leave my machine?Not unless you publish it: counting happens locally against files your agents already wrote, and the only upload path is the submit command that puts your usage on the public leaderboard.
Why is it called Tokscale?It is modeled on the Kardashev scale, which ranks civilizations by energy consumption — the author's premise is that tokens are the new energy, so Tokscale measures your climb from planetary developer to galactic code architect.
What do the visualizations actually show?Daily summaries and per-platform stats in the terminal, plus a frontend with a 3D contributions-style graph of your activity and a Wrapped 2025 recap of your year in tokens.
What is the global leaderboard about?Running `bunx tokscale@latest submit` publishes your usage under a public profile so you can compare your token burn against other developers; the project says trillions of tokens are already tracked.
Creator
junhoyeo
Size
100.8 MB
Stars
5.7K
Age
10mo
Commits · 90 Days