Tokscale – Track token usage across AI coding agents
Monitor token consumption and costs for multiple AI coding agents from your terminal, with a global leaderboard.
- Source repo
- junhoyeo/tokscale
- Stars
- ★ 5.9k
- Last updated
- today v4.24.0
- FARS reviewed
- Nov 08, 2026 +5 new
- License
- MIT
- Primary language
- Rust
- FA score
- 70/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformChatGPT · Codex · Claude Code
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A developer wants to monitor their token usage across Claude Code and OpenCode to optimize costs.
- Not a fit if
- Teams that need fully offline operation without reading local session files
- Users unwilling to log in or sync accounts for Cursor, Trae, or Warp integrations
- Users needing official support for clients without public APIs, such as Trae CN
- Website
- tokscale.ai ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-02latest release v4.24.0 (2026-12-02)+4.6 ★/day over 7 days
- Source review
- 70/100 · Some gaps
What does this agent do, and when should you use it?
Tokscale is a high-performance CLI tool and visualization dashboard that tracks token usage and costs across a wide range of AI coding agents, including OpenCode, Claude Code, Codex CLI, Cursor IDE, Gemini CLI, and more than 40 others. It reads local session files or databases from these agents, computes costs in real time using LiteLLM pricing data, and presents the information through an interactive TUI, a lightweight table mode, JSON exports, contribution graphs, and task-attributed reports. The tool also offers a social platform where users can submit their usage data to a world leaderboard and create public profiles, along with a web frontend for 2D/3D visualization and a 'Wrapped 2025' annual review feature. The core parsing and aggregation are implemented as a native Rust module for up to 10x faster processing. Tokscale is open-source under the MIT license.
Tokscale scans local storage of supported AI coding agents (e.g., Claude Code, OpenCode, Codex, Gemini CLI) to read session transcripts, databases, or exported CSV files. It parses token counts for input, output, cache read/write, and reasoning, then calculates costs using LiteLLM's pricing data with fallbacks to OpenRouter and Cursor pricing. The CLI provides commands like tokscale (TUI), tokscale --light (table), tokscale models, tokscale monthly, and tokscale --json for export. It also offers pricing for model cost lookup, graph for contribution graph data, report for task-attributed summaries (using external LLMs), usage for subscription quotas, and login/submit/autosubmit for leaderboard submission. For specific integrations, it has cursor login/sync, antigravity sync, trae sync, and warp sync commands. The frontend visualizes data on a web dashboard with a 3D contributions graph.
- A developer wants to monitor their token usage across Claude Code and OpenCode to optimize costs.
- A team lead needs to compare costs between different coding agents and review usage statistics across members.
- A developer wants to submit their usage data to the global leaderboard to compete and create a public profile.
- A user wants to generate a task-attributed report to understand which projects consumed the most tokens.
- A developer prefers a lightweight terminal dashboard without opening a browser to quickly check usage.
- A researcher wants to export detailed usage data in JSON format for further analysis and visualization.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npx tokscale@latestbunx tokscale@latest
How do you install or deploy this agent?
Quick start: run npx tokscale@latest or bunx tokscale@latest directly without installation. Also works with deno x npm:tokscale@latest. Requires Node.js or Bun. For source installation, clone the repository, run bun install and bun run build:core (Rust toolchain required).
How do you use this agent?
Basic commands: run tokscale to launch the interactive TUI, or tokscale --light for table output. Use tokscale models for model view, tokscale monthly for daily view, and tokscale --json to export JSON. Filter by client with --client opencode, and set date ranges with --since and --until. Look up prices with tokscale pricing "model-name", log in with tokscale login, and submit data with tokscale submit.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Supports over 40 AI coding agents, covering a wide range of tools.
- Real-time pricing using LiteLLM data with tiered pricing and cache discounts.
- Native Rust core provides ~10x faster processing.
- Multiple interfaces: interactive TUI, lightweight table, and JSON export.
- Social leaderboard feature allows sharing and competition, with public profiles.
- Requires reading local filesystem data from each agent, which may raise privacy and permission concerns.
- Many features (e.g., Cursor, Trae, Warp integrations) require login and sync, adding configuration and network steps.
- Task-attributed reports depend on external LLMs like Apple FM, Claude, or Codex, requiring their installation and authentication.
- Some agents (e.g., Trae CN) are unsupported due to missing official APIs.
- Subscription usage is vendor-reported and may not always be accurate or consistent.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Tokscale – Track token usage across AI coding agents This agent | 70 · Some gaps | CLIFree | ★ 5.9k | today | Rust | ChatGPT · Codex · Claude Code |
| ccusage | 66 · Some gaps | — | ★ 20k | today | Rust | Codex · Claude Code |
| AgentTrace | 74 · Some gaps | — | ★ 159 | 1mo ago | Rust | Codex · Claude Code |
| ccxray | 76 · Good | CLIFree + model costs | ★ 296 | 7d ago | JavaScript | Claude Code · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The CLI primarily reads local session files and databases from multiple agents. The README lists data paths, some source-specific reading behavior, and cache locations, while the CLI exposes an offline option. The product also offers login, sync, usage submission, and a public leaderboard; some sync paths use APIs, browser authentication, or local credentials. The packet does not explain per-action confirmation, permission scope, or the full data flow for all such operations, so these criteria are not full marks. The dependency list and TLS configuration are detailed, but the packet provides no dependency vulnerability review. Recovery or deletion procedures are also not sufficiently documented in the supplied material. The README attributes tracked clients and pricing data sources; publisher identity remains unknown as instructed.
The CLI wrapper selects a native binary by platform and gives a build hint before exiting when it cannot find one. Cargo lists dependency version ranges, and the source exposes offline and cache behavior. The README, CLI options, and workflow are broadly consistent, though the client and version information is distributed and may change over time; static evidence cannot establish runtime correctness. The missing-binary path has a clear message, but the supplied scope does not show complete handling for failures across all platforms and services.
The product targets users who want to aggregate usage across AI coding tools and offers an interactive TUI, light table output, JSON, filters, offline use, cross-platform support, and many sync scenarios. The README also records limitations, including estimated usage from transcript text, sources that provide request totals only, and tool-specific model or path constraints. However, support boundaries are spread across a large client list, and the supplied code does not fully show trigger conditions and permission details for many features, so full marks are not justified.
The README has a table of contents, feature descriptions, installation steps, command examples, configuration and environment variable sections, and an MIT license. The repository also includes version metadata and release workflow guidance. AGENTS.md mainly contains contributor maintenance, commit, and release instructions, so it is not treated as product instructions for end users. The README explains package structure and source build requirements, earning strong installation support. The version and change history evidence is incomplete; naming and the multi-format client list create maintenance overhead. Releases are manually triggered and publish directly to npm latest. The release path is described, but maintenance responsibility is not fully developed.
The product aggregates token, model, session, date, and pricing usage across local agents into a TUI, tables, JSON, and shareable material. Its outputs and comparison use cases are clear, and the README describes filters, grouping, and export. It can be launched directly with npx, bunx, or Deno, while some advanced features require network access, authentication, or extra sync. Ongoing costs and the practical value of submitting data are not fully quantified, so cost-benefit is not full marks.
The README's main interfaces and data sources have partial counterparts in the CLI options, wrapper, Cargo manifest, and CI workflows, providing some traceability and cross-file corroboration. The coverage badge and workflows indicate testing or build processes, but the supplied excerpts cannot verify all README performance, accuracy, and safety claims. The documentation states concrete facts and limitations alongside promotional performance and leaderboard claims; the packet does not independently verify each claim, so full marks are not warranted.
- The tool reads session files and databases from multiple local agents. Before using sync, login, or submission features, check which data those features access or upload.
- Usage accuracy and coverage vary by source; some sources estimate from text or provide aggregate data only, and pricing may depend on external catalogs.
- This static assessment uses only the supplied file excerpts; it did not execute the program or independently verify performance, data accuracy, or dependency security.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
<div align="center"> [](https://github.com/junhoyeo/tokscale) [email protected] is here! </div> What's Changed * fix(lint): make clippy pass on Windows by @The-Minion-oOo in https://github.com/junhoyeo/tokscale/pull/1669 * feat(profile): add custom date range filter to public profiles by @Musicminion in https://github.com/junhoyeo/tokscale/pull/1662 * feat(profile): track and display period-scoped submission counts by @Freakyskittle in https://github.com/junhoyeo/tokscale/pull/1673 …View on GitHub ↗ -
Release notes excerpt
<div align="center"> [](https://github.com/junhoyeo/tokscale) [email protected] is here! </div> - Price gpt-6.2 Astra and Sol requests above 272k input tokens at the long-context rate for the whole request. - Count Zed threads that run on a ChatGPT subscription. - Show saved Pi session names in the Sessions view. - Report an unreadable Claude Keychain item in the Usage view instead of hiding Claude. - Recover Kimi Code response timing from native step events. …View on GitHub ↗ -
Release notes excerpt
<div align="center"> [](https://github.com/junhoyeo/tokscale) [email protected] is here! </div> - Add [Capy](https://capy.ai) usage sync, including subscription-routed usage that has no local session log. - Track Capy in reports, the TUI, submissions, and the website. - Preserve hourly/day bucket totals and isolate cached usage by the active API key and user filter. - Treat Capy usage buckets as aggregates for per-message moderation; daily and lifetime limits still apply. What's Changed …View on GitHub ↗
FAQ
What platforms does Tokscale support?
How is data privacy handled?
How is pricing calculated?
Which coding agents are supported?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.