Tokscale

🛰️ 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

Last verified:

Visit Tokscale

What is Tokscale?

Tokscale is a high-performance, open-source CLI tool and visualization dashboard designed for monitoring and analyzing token consumption across 20+ AI coding agents. It helps developers and operations teams track token usage and associated costs for AI coding assistants including Claude Code, Cursor, Codex CLI, Gemini CLI, OpenCode, Kimi CLI, Qwen CLI, Roo Code, Amp, and many more. The tool reads local LLM data files and provides detailed analytics with per-minute token breakdowns through an interactive terminal UI.

Key features include an interactive Rust-powered TUI (Terminal User Interface) with 6 views (Overview, Models, Daily, Hourly, Stats, Agents), keyboard and mouse navigation, 9 color themes, and a GitHub-style contribution graph showing usage patterns. Tokscale fetches real-time pricing from LiteLLM with automatic OpenRouter fallback, tracks input/output/cache/reasoning tokens separately, and supports flexible filtering by platform, date range, and year. The tool also functions as a social platform with GitHub OAuth login, global leaderboards showing top token consumers, public profiles, and the ability to embed stats widgets in GitHub profile READMEs.

Tokscale is designed for developers, data scientists, and operations teams who use multiple AI coding assistants and need visibility into usage patterns for cost optimization and budget management. It supports cross-platform usage on Windows, macOS, and Linux, can be run instantly with zero setup using npx tokscale@latest or bunx tokscale@latest, and includes JSON export for scripting, automation, and CI/CD pipeline integration. The tool is fully free and open-source under the MIT License.

Tokscale pricing

Pricing model: Freemium

Fully free and open-source under the MIT License. Users can use, modify, and distribute Tokscale freely at no cost. All features are included: interactive TUI with 6 views, support for 20+ AI coding agents, real-time pricing from LiteLLM, native Rust core for fast processing, 2D and 3D contribution graphs, global leaderboard access, GitHub profile embed widgets, Wrapped 2025 generation, and JSON export capabilities. No paid tiers, subscriptions, or premium features exist.

Tokscale pros

  • Fully free and open-source under MIT License
  • Supports 20+ AI coding agents out of the box
  • Native Rust core for 8-10x faster processing
  • Interactive TUI with 6 different views
  • Real-time pricing from LiteLLM with caching
  • Detailed token breakdowns (input, output, cache, reasoning)
  • Flexible filtering by platform and date range
  • Cross-platform support (Windows, macOS, Linux)
  • Zero setup required with npx/bunx
  • Global leaderboard with 1,275+ users tracking trillions of tokens
  • GitHub OAuth login and public profiles
  • Embeddable stats widget for GitHub README
  • Wrapped 2025 year-in-review image generation
  • JSON export for automation and scripting
  • 9 color themes with mouse and keyboard navigation
  • 2D and 3D contribution graph visualization
  • Headless mode for CI/CD pipelines
  • Settings persistence across sessions

Tokscale cons

  • Requires local access to AI agent data files
  • CLI-focused interface may intimidate non-technical users
  • Leaderboard requires manual data submission
  • No native mobile app available
  • Real-time pricing limited to LiteLLM/OpenRouter models
  • Some newer models may lack hardcoded pricing
  • Web visualization requires running frontend locally
  • Learning curve for advanced filtering options

Frequently asked questions about Tokscale

What is Tokscale?

Tokscale is a high-performance CLI tool and visualization dashboard for tracking token usage and costs across multiple AI coding agents. It monitors consumption from 20+ platforms including Claude Code, Cursor, Codex, Gemini, OpenCode, Kimi, Qwen, and more, providing detailed analytics with an interactive Rust-powered TUI, real-time pricing, and a social leaderboard platform.

How do I install Tokscale?

You can run Tokscale instantly with zero setup using bunx tokscale@latest or npx tokscale@latest. For a permanent installation, use pip install tokscale or download the pre-built binary for your operating system. The tool works on Windows, macOS, and Linux.

Which AI coding agents does Tokscale support?

Tokscale supports 20+ AI coding agents including OpenCode, Claude Code, Codex CLI, GitHub Copilot CLI, Cursor IDE, Gemini CLI, Amp (AmpCode), Factory Droid, OpenClaw, Hermes Agent, Pi/Oh My Pi, Kimi CLI, Qwen CLI, Roo Code, Kilo, Mux, Kilo CLI, Crush, and Synthetic.

How do I join the global leaderboard?

To join the leaderboard, first install Tokscale CLI, then run tokscale login to authenticate with GitHub OAuth, and finally run tokscale submit to submit your usage data. This creates a public profile and adds you to the leaderboard where you can compete with 1,275+ other token consumers tracking trillions of tokens worldwide.

Is Tokscale free to use?

Yes, Tokscale is fully free and open-source under the MIT License. There are no paid tiers, subscriptions, or premium features. All functionality including the interactive TUI, 20+ agent support, real-time pricing, contribution graphs, leaderboard access, and JSON export are available at no cost.

How does Tokscale calculate costs?

Tokscale fetches real-time pricing from LiteLLM with a 1-hour disk cache and automatic OpenRouter fallback. For Cursor IDE models, it uses hardcoded pricing for newly released models. The tool tracks input, output, cache read/write, and reasoning tokens separately and applies current model pricing to calculate total costs.

Can I filter my usage data?

Yes, Tokscale offers flexible filtering. You can filter by platform using flags like --claude, --cursor, --opencode, --gemini, etc. For dates, use --today, --week, --month, --year 2024, or custom ranges with --since 2024-01-01 --until 2024-12-31. You can combine multiple filters like tokscale models --week --claude --json.

How do I export my data for automation?

Use the --json flag to output data as JSON for scripting and automation. Examples: tokscale --json for default models view, tokscale models --json for models breakdown, tokscale monthly --json for monthly breakdown. You can save to file with tokscale models --json > report.json for CI/CD pipelines or external visualization tools.

What is the Wrapped 2025 feature?

Wrapped 2025 generates a shareable year-in-review image showing your top models, top clients, usage streaks, and a contribution heatmap. Run tokscale wrapped to generate this image, which is similar to Spotify Wrapped but for your AI token usage patterns throughout the year.

Why is Tokscale called 'The Kardashev Scale for AI Devs'?

The Kardashev Scale originally measured civilizations by energy consumption. Tokscale adopts this concept for AI developers, measuring developer 'civilization level' by token consumption. The leaderboard tracks trillions of tokens worldwide with 1,275+ users, where top users like Kzquandary have consumed 1.192T tokens worth $512.63K, creating a competitive metric for AI coding intensity.

Categories

Use cases

Browse all AI tools on NeedAnAI