junhoyeo /tokscale

🛰️ Track token usage across AI coding agents from your terminal. 🏅 Global leaderboard with trillions of tokens tracked.

★ 5,855⑂ 476👁 33⑃ 1,202● 429▤ 109
RustMITCreated 2025-12-01tokscale.ai
下载:`[email protected]` is here! (Now supports Capy)`[email protected]` ↓4.23.02026-11-15
+3
日增长
5,855
stars
476
forks
33
watchers
1,202
prs
429
issues
109
releases

README

--







 A high-performance CLI tool and visualization dashboard for tracking token usage and costs across multiple AI coding agents.

 [!TIP]

 I drop new open-source work every week. Don't miss the next one.

  | Follow @Tokscale on X for release notes and updates. |
 | :-----| :----- |
  | Come hang out in our Discord — and surround yourself with the world's top-tier vibers. |
  | Support Tokscale's continued development through GitHub Sponsors. |
 |  | Follow @junhoyeo on GitHub for more projects. Hacking on AI, infra, and everything in between. |













🇺🇸 English | 🇰🇷 한국어 | 🇯🇵 日本語 | 🇨🇳 简体中文



 --

| Overview | Models |
|:---:|:---:|
| !TUI Overview | !TUI Models | 

| Daily Summary | Stats |
|:---:|:---:|
| !TUI Daily Summary | !TUI Stats | 

| Session Details | Hourly |
|:---:|:---:|
| !TUI Session Details | !TUI Hourly |

| Frontend (3D Contributions Graph) | Wrapped 2025 |
|:---:|:---:|
|  |  |

 Run bunx tokscale@latest submit to 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 |
|------|----------|---------------|
|  | OpenCode | ~/.local/share/opencode/opencode.db (1.2+, all channels including opencode-stable.db) or/and ~/.local/share/opencode/storage/message/ (legacy/unmigrated) |
|  | Claude Code | ~/.claude/projects/ and ~/.claude/transcripts/ |
|  | OpenClaw | ~/.openclaw/agents/ (/agent/openclaw-agent.sqlite + /sessions/.jsonl; + legacy: .clawdbot, .moltbot, .moldbot) |
|  | Codex CLI | ~/.codex/sessions/ and ~/.codex/archived_sessions/ (.jsonl plus zstd-compressed .jsonl.zst and other archive copies; copies of one rollout count once) |
|  | Prime Agent | ~/.prime/agent/sessions/ and ~/.prime/agent/session-artifacts/ (RLM child sessions) |
|  | Sakana Fugu | via Codex — rollouts in ~/.codex/sessions/ and ~/.codex/archived_sessions/ (model_provider: sakana) |
|  | GitHub Copilot CLI | ~/.copilot/session-store.db (CLI usage events; no OTEL required), ~/.copilot/otel/.jsonl (+ COPILOT_OTEL_FILE_EXPORTER_PATH), ~/.copilot/data.db |
|  | Hermes Agent | $HERMES_HOME/state.db and $HERMES_HOME/profiles//state.db (fallback: ~/.hermes/...) |
|  | Gemini CLI | $GEMINI_CLI_HOME/tmp//chats/.json (fallback: ~/.gemini/tmp//chats/.json) |
|  | Cursor IDE | Cursor API usage cached at ~/.config/tokscale/cursor-cache/usage.json (legacy usage.csv caches are still read; desktop auto-login or cookie paste; not ~/.cursor) |
|  | Amp (AmpCode) | ~/.config/tokscale/amp-cache/threads/ (tokscale amp sync) |
|  | Codebuff | ~/.config/manicode/ (+ manicode-dev, manicode-staging; override via CODEBUFF_DATA_DIR) |
|  | Freebuff | shares ~/.config/manicode/ with Codebuff (same runtime); token usage is estimated from the transcript (no local usage; override via FREEBUFF_DATA_DIR) |
|  | Droid (Factory Droid) | ~/.factory/sessions/ |
|  | Pi | ~/.pi/agent/sessions/ |
|  | omp (Oh My Pi) | ~/.omp/agent/sessions//.jsonl 

Top issues

Latest release

`[email protected]` is here! (Now supports Capy) v4.23.0 2026-11-15
[email protected] is here!


- Add Capy 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
 feat(clients): add Capy usage sync from the Capy usage API by @Jackson57279 in https://github.com/junhoyeo/tokscale/pull/1636
 fix(frontend): exempt Capy aggregates from per-message moderation

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON