Skip to content

junhoyeo/tokscale

⭐ 2,777  ·  Rust  ·  GitHub Repo

🛰️ A CLI tool for tracking token usage from OpenCode, Claude Code, 🦞OpenClaw (Clawdbot/Moltbot), Pi, Codex, Gemini, Cursor, AmpCode, Factory Droid, Kimi, and more! • 🏅Global Leaderboard + 2D/3D Contributions Graph

ai ai-agents ampcode claude claude-code clawdbot codex cursor

1-Sentence Summary

Unified token tracking and cost dashboard for 20+ AI coding agents with gamified leaderboards.

🔥 Key Capabilities & USP

  • Multi-Agent Universal Tracking: Automatically detects and parses token usage from 20+ AI coding agents (Claude Code, Cursor, Gemini CLI, Codex, OpenCode, and more) by reading their local SQLite/JSON data stores. Solves the pain of fragmented billing across different tools.
  • Real-Time Cost Calculation: Integrates with LiteLLM for up-to-date model pricing, including tiered pricing and cache token discounts. No more manual spreadsheet math.
  • Global Leaderboard & Public Profiles: Submit your usage data via bunx tokscale@latest submit to compete globally and create a public profile. Gamifies AI-assisted development productivity.
  • Rich TUI + Web Dashboard: Native Rust TUI with overview, model breakdown, and daily summary views, plus a web frontend featuring a 3D contributions graph. Dual visualization for terminal-first and browser-first workflows.
  • Wrapped 2025 Annual Summary: Generates a yearly AI agent usage visualization (like Spotify Wrapped), turning raw data into shareable insights.

USP: The only tool that unifies token tracking across the entire AI coding agent ecosystem into a single CLI, with gamified global competition and real-time pricing—inspired by the Kardashev scale.

Architecture

Technical Architecture

ComponentTechnologyDetails
CLI EngineRustHigh-performance, cross-platform v2 rewrite
Data ParsingSQLite, JSON, JSONLReads from standard agent directories (~/.local/share/opencode/, ~/.claude/, ~/.codex/sessions/)
Pricing EngineLiteLLM APIReal-time model pricing with tiered/cache discounts
Web DashboardTypeScript/ReactHosted at tokscale.ai with 3D contributions graph
Package Distributionnpm + GitHub ReleasesAvailable as tokscale on npm
Submission APIBun runtimebunx tokscale@latest submit for leaderboard

Quick Start Guide

bash
# Install globally via npm
npm install -g tokscale

# Run the CLI to view your local token usage
tokscale

# Submit usage to global leaderboard and create public profile
bunx tokscale@latest submit

No configuration required—automatically detects all supported agents on your system.

Pros, Cons & Use Cases

Pros

  • Extensive Agent Support: 20+ agents covered, including niche tools like AmpCode, Factory Droid, and Kimi.
  • Dual Visualization: TUI for terminal power users + web dashboard for visual analytics.
  • Free & Open Source: MIT license with active development (last updated May 2026).
  • Gamification: Leaderboards and annual wraps drive engagement and team competition.

Cons

  • Local Data Dependency: Requires access to agent data directories—won't work in CI/CD pipelines, ephemeral containers, or remote development environments.
  • Pricing Lag: Relies on LiteLLM pricing data, which may be delayed for newly released models.
  • Cursor Sync Requirement: Some agents (e.g., Cursor) require API sync via cache, adding a setup step.

Who should NOT use this?

  • CI/CD or ephemeral environments: If your agents run in Docker containers, serverless functions, or auto-scaling clusters where local data directories are wiped.
  • Single-agent users: If you only use one AI coding agent, the overhead of installing and running Tokscale likely outweighs the benefit.
  • Privacy-sensitive teams: Submitting usage data to a global leaderboard may not be acceptable for organizations with strict data governance policies.

Ideal Use Cases

  • Multi-agent power users: Developers who switch between Claude Code, Cursor, Gemini CLI, and Codex daily and need unified cost tracking.
  • Engineering teams: Managers wanting to monitor and optimize team-wide AI agent spending across different tools.
  • Competitive developers: Users who enjoy gamified productivity metrics and want to climb the global leaderboard.
  • AI tool evaluators: Researchers comparing token efficiency and costs across different coding agents.

Community & Activity

With 2,777 stars and active development through May 2026, Tokscale has strong early momentum in the AI developer tools ecosystem. The project's v2 Rust rewrite signals serious engineering investment, and the "Wrapped 2025" feature shows a commitment to user engagement. The combination of a global leaderboard and public profiles is already building a community of competitive AI-assisted developers. For a project that launched relatively recently, this level of adoption and feature velocity is impressive—expect this to become the de facto standard for multi-agent token tracking.

Project data from GitHub API, updated in real-time