What is tokscale?
tokscale is an open-source CLI tool and visualization dashboard for tracking token consumption and costs across AI coding agents. tokscale is intended for developers using tools such as Claude Code, Codex CLI, OpenCode, Cursor IDE, and Gemini CLI. The project is hosted in the junhoyeo/tokscale GitHub repository and distributed under the MIT license.
tokscale combines usage analysis with a public leaderboard. The repository presents views for models, daily summaries, statistics, session details, and hourly activity, alongside a contributions graph. These views provide different ways to examine recorded consumption, while leaderboard submission offers a separate route for publishing usage data and creating a public profile.
What tokscale can do
tokscale monitors usage from supported coding agents, IDEs, and local inference tools. tokscale calculates costs using LiteLLM pricing data, with support for tiered model prices and cache token discounts. The supported source list includes local transcripts, SQLite databases, application logs, and usage records cached through client-specific synchronization commands.
- tokscale tracks token consumption across multiple AI coding agents.
- tokscale calculates usage costs from LiteLLM pricing data.
- tokscale accounts for tiered pricing and cache token discounts.
- tokscale displays model, daily, hourly, and session detail views.
- tokscale reads supported local session files and databases.
- tokscale submits usage data to a global leaderboard.
How tokscale works
tokscale obtains usage information from the data locations documented for each supported client. Claude Code records come from project and transcript directories, while Codex CLI records come from session and archived-session files. OpenCode support includes its database and legacy message storage. The repository also documents environment variables and alternative paths for several clients.
tokscale uses additional synchronization or authentication paths for some integrations. Cursor IDE usage is cached from the Cursor API, with desktop auto-login or cookie paste listed as access methods. Amp, Google Antigravity, Trae, and Warp have synchronization commands. Other integrations, including Antigravity CLI and the Antigravity IDE Extension, read local SQLite databases directly.
Who tokscale is for
tokscale serves developers who use AI-assisted coding tools and want to monitor their token consumption. Support spans command-line agents, IDE integrations, desktop applications, and local inference sources. Developers using several supported clients can examine their usage through the same CLI and dashboard rather than relying only on each client's separate records.
- tokscale helps developers review consumption across supported coding agents.
- tokscale supports analysis of usage by model, day, hour, and session.
- tokscale lets users publish recorded consumption through leaderboard submissions.
tokscale access and licensing
tokscale is available as an open-source project through GitHub under the MIT license. The repository invites support through GitHub Sponsors and provides the command bunx tokscale@latest submit for submitting usage data to the leaderboard and creating a public profile. LiteLLM pricing data supplies the model cost calculations described in the project.
tokscale strengths and data limitations
tokscale combines broad client coverage, terminal access, dashboard views, and pricing calculations in an open-source project. tokscale also documents differences in source data rather than presenting every integration as equivalent. Available detail depends on the client: some integrations read recorded usage directly, while others use transcript estimates or aggregate spending records.
- tokscale estimates Freebuff token usage from transcripts because local usage data is unavailable.
- tokscale receives aggregate requests and spending from Warp and Oz, without token transcripts.
- tokscale tracks hosted Zed models but excludes external ACP agents.
- tokscale excludes training metrics from Unsloth Studio usage tracking.
tokscale FAQ
What is tokscale?
tokscale is an open-source CLI tool and visualization dashboard for tracking token usage and costs across AI coding agents. tokscale supports sources such as Claude Code, Codex CLI, OpenCode, Cursor IDE, and Gemini CLI, with model, daily, hourly, and session detail views.
Is tokscale open source?
tokscale is an open-source project distributed under the MIT license and available from its GitHub repository. tokscale also accepts support through GitHub Sponsors, which the repository describes as a way to support continued development.
How does tokscale calculate AI usage costs?
tokscale calculates costs using LiteLLM pricing data and supports tiered pricing models and cache token discounts. tokscale's available usage detail depends on the source client; for example, Freebuff usage is estimated from transcripts, while Warp provides aggregate requests and spending.
Which AI coding tools does tokscale support?
tokscale supports Claude Code, Codex CLI, OpenCode, Cursor IDE, Gemini CLI, GitHub Copilot CLI, and many other listed clients. tokscale reads different sources for different tools, including session transcripts, SQLite databases, logs, and cached API usage records.
How do you submit usage to the tokscale leaderboard?
tokscale provides the command bunx tokscale@latest submit to submit usage data to its global leaderboard and create a public profile. tokscale presents leaderboard submission alongside its terminal tracking and visualization dashboard capabilities.
From the community
No reviews yet
Be the first to review this tool. What you write helps the next person choose.




