# Tokscale

> A high-performance CLI tool and visualization dashboard for tracking token usage and costs across multiple AI coding agents including Claude Code, Cursor, Codex, Gemini, and more.

Tokscale is an open-source, high-performance CLI tool and visualization dashboard for monitoring and analyzing token consumption across 20+ AI coding agents. It features a native Rust TUI powered by Ratatui, real-time pricing from LiteLLM, and a social platform with global leaderboards and public profiles. The tool supports cross-platform usage on Windows, macOS, and Linux, and can be run instantly with `npx tokscale@latest` or `bunx tokscale@latest` with zero setup.

- **Interactive TUI Mode** — *Run `tokscale` to launch a beautiful terminal UI with 6 views (Overview, Models, Daily, Hourly, Stats, Agents), keyboard/mouse navigation, 9 color themes, and a GitHub-style contribution graph.*
- **Multi-platform Agent Support** — *Tracks usage from OpenCode, Claude Code, Codex CLI, Copilot CLI, Cursor IDE, Gemini CLI, Amp, Droid, OpenClaw, Hermes Agent, Pi, Kimi CLI, Qwen CLI, Roo Code, Kilo, Mux, Kilo CLI, Crush, and Synthetic.*
- **Real-time Pricing** — *Fetches current model pricing from LiteLLM with 1-hour disk cache, automatic OpenRouter fallback, and hardcoded Cursor model pricing for newly released models.*
- **Native Rust Core** — *All parsing and aggregation is done in Rust for ~8-10x faster processing and ~45% memory reduction vs. pure TypeScript.*
- **Detailed Token Breakdowns** — *Tracks input, output, cache read/write, and reasoning tokens per model and per client.*
- **Flexible Filtering** — *Filter by platform (`--claude`, `--cursor`, `--opencode`, etc.), date range (`--today`, `--week`, `--since`/`--until`), or year.*
- **Web Visualization** — *Run the frontend locally for an interactive 2D/3D contribution graph with tooltips, day breakdowns, and source filtering.*
- **Social Platform** — *Login with GitHub (`tokscale login`), submit usage data (`tokscale submit`), compete on leaderboards, and embed stats in your GitHub profile README.*
- **Wrapped 2025** — *Generate a shareable year-in-review image with top models, clients, streaks, and a contribution heatmap using `tokscale wrapped`.*
- **Export & Scripting** — *Output data as JSON (`--json`) for automation, CI/CD pipelines, or external visualization tools.*

## Features
- Interactive TUI with 6 views (Overview, Models, Daily, Hourly, Stats, Agents)
- Native Rust core for ~8-10x faster processing
- Real-time pricing from LiteLLM with OpenRouter fallback
- Support for 20+ AI coding agents
- Detailed token breakdowns (input, output, cache read/write, reasoning)
- Flexible filtering by platform, date range, and year
- 2D and 3D contribution graph visualization
- Social platform with global leaderboard and public profiles
- GitHub profile embed widget and badge
- Wrapped 2025 year-in-review image generation
- JSON export for scripting and automation
- Headless mode for CI/CD pipelines
- 9 color themes
- Mouse and keyboard navigation
- Settings persistence
- Cross-platform support (Windows, macOS, Linux)

## Integrations
Claude Code, OpenCode, 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, Synthetic, LiteLLM, OpenRouter, GitHub (OAuth)

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Version
v2.0.25

## Links
- Website: https://tokscale.ai
- Documentation: https://github.com/junhoyeo/tokscale#readme
- Repository: https://github.com/junhoyeo/tokscale
- EveryDev.ai: https://www.everydev.ai/tools/tokscale
