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
Install / Use
/learn @junhoyeo/TokscaleQuality Score
Category
Development & EngineeringSupported Platforms
README
A high-performance CLI tool and visualization dashboard for tracking token usage and costs across multiple AI coding agents.
<div align="center">[!TIP]
v2 is here — native Rust TUI, cross-platform support, and more. <br /> I drop new open-source work every week. Don't miss the next one.
| <img alt="GitHub Follow" src="https://img.shields.io/github/followers/junhoyeo?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" /> | Follow @junhoyeo on GitHub for more projects. Hacking on AI, infra, and everything in between. | | :-----| :----- | <img alt="Discord link" src="https://img.shields.io/discord/1480206352755458110?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" /> | Come hang out in our Discord — and surround yourself with the world's top-tier vibers. |
🇺🇸 English | 🇰🇷 한국어 | 🇯🇵 日本語 | 🇨🇳 简体中文
</div> <!-- </CENTERED SECTION FOR GITHUB DISPLAY> -->| Overview | Models |
|:---:|:---:|
|
|
|
| Daily Summary | Stats |
|:---:|:---:|
|
|
|
| Frontend (3D Contributions Graph) | Wrapped 2025 | |:---:|:---:| | <a href="https://tokscale.ai"><img alt="Frontend (3D Contributions Graph)" src=".github/assets/frontend-contributions-graph.png" width="700px" /></a> | <a href="#wrapped-2025"><img alt="Wrapped 2025" src=".github/assets/wrapped-2025-agents.png" width="700px" /></a> |
Run
bunx tokscale@latest submitto submit your usage data to the leaderboard and create your public profile!
Overview
Tokscale helps you monitor and analyze your token consumption from:
| Logo | Client | Data Location | Supported |
|------|----------|---------------|-----------|
| <img width="48px" src=".github/assets/client-opencode.png" alt="OpenCode" /> | OpenCode | ~/.local/share/opencode/opencode.db (1.2+) or/and ~/.local/share/opencode/storage/message/ (legacy/unmigrated) | ✅ Yes |
| <img width="48px" src=".github/assets/client-claude.jpg" alt="Claude" /> | Claude Code | ~/.claude/projects/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-openclaw.jpg" alt="OpenClaw" /> | OpenClaw | ~/.openclaw/agents/ (+ legacy: .clawdbot, .moltbot, .moldbot) | ✅ Yes |
| <img width="48px" src=".github/assets/client-openai.jpg" alt="Codex" /> | Codex CLI | ~/.codex/sessions/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-gemini.png" alt="Gemini" /> | Gemini CLI | ~/.gemini/tmp/*/chats/*.json | ✅ Yes |
| <img width="48px" src=".github/assets/client-cursor.jpg" alt="Cursor" /> | Cursor IDE | API sync via ~/.config/tokscale/cursor-cache/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-amp.png" alt="Amp" /> | Amp (AmpCode) | ~/.local/share/amp/threads/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-droid.png" alt="Droid" /> | Droid (Factory Droid) | ~/.factory/sessions/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-pi.png" alt="Pi" /> | Pi | ~/.pi/agent/sessions/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-kimi.png" alt="Kimi" /> | Kimi CLI | ~/.kimi/sessions/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-qwen.png" alt="Qwen" /> | Qwen CLI | ~/.qwen/projects/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-roocode.png" alt="Roo Code" /> | Roo Code | ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/tasks/ (+ server: ~/.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/tasks/) | ✅ Yes |
| <img width="48px" src=".github/assets/client-kilocode.png" alt="Kilo" /> | Kilo | ~/.config/Code/User/globalStorage/kilocode.kilo-code/tasks/ (+ server: ~/.vscode-server/data/User/globalStorage/kilocode.kilo-code/tasks/) | ✅ Yes |
| <img width="48px" src=".github/assets/client-kilocode.png" alt="Kilo CLI" /> | Kilo CLI | ~/.local/share/kilo/kilo.db | ✅ Yes |
| <img width="48px" src=".github/assets/client-mux.png" alt="Mux" /> | Mux | ~/.mux/sessions/ | ✅ Yes |
| <img width="48px" src=".github/assets/client-synthetic.png" alt="Synthetic" /> | Synthetic | Re-attributed from other sources via hf: model prefix or synthetic provider (+ Octofriend: ~/.local/share/octofriend/sqlite.db) | ✅ Yes |
Get real-time pricing calculations using 🚅 LiteLLM's pricing data, with support for tiered pricing models and cache token discounts.
Why "Tokscale"?
This project is inspired by the Kardashev scale, a method proposed by astrophysicist Nikolai Kardashev to measure a civilization's level of technological advancement based on its energy consumption. A Type I civilization harnesses all energy available on its planet, Type II captures the entire output of its star, and Type III commands the energy of an entire galaxy.
In the age of AI-assisted development, tokens are the new energy. They power our reasoning, fuel our productivity, and drive our creative output. Just as the Kardashev scale tracks energy consumption at cosmic scales, Tokscale measures your token consumption as you scale the ranks of AI-augmented development. Whether you're a casual user or burning through millions of tokens daily, Tokscale helps you visualize your journey up the scale—from planetary developer to galactic code architect.
Contents
- Overview
- Features
- Installation
- Usage
- Frontend Visualization
- Social Platform
- Wrapped 2025
- Development
- Supported Platforms
- Session Data Retention
- Data Sources
- Pricing
- Contributing
- Acknowledgments
- License
Features
- Interactive TUI Mode - Beautiful terminal UI powered by Ratatui (default mode)
- 4 interactive views: Overview, Models, Daily, Stats
- Keyboard & mouse navigation
- GitHub-style contribution graph with 9 color themes
- Real-time filtering and sorting
- Zero flicker rendering
- Multi-platform support - Track usage across OpenCode, Claude Code, Codex CLI, Cursor IDE, Gemini CLI, Amp, Droid, OpenClaw, Pi, Kimi CLI, Qwen CLI, Roo Code, Kilo, Kilo CLI, Mux, and Synthetic
- Real-time pricing - Fetches current pricing from LiteLLM with 1-hour disk cache; automatic OpenRouter fallback and Cursor model pricing for newly released models
- Detailed breakdowns - Input, outpu


