Javis603/token-monitor

▲ 37 stars today★ 2,521⑂ 250

Local-first desktop widget for tracking token usage, costs, and limits across 43+ AI coding tools—including Claude Code, Codex, Cursor, OpenCode, OpenClaw, and more—with multi-device sync.

About Javis603/token-monitor

Javis603/token-monitor is an open-source project on GitHub, mainly written in JavaScript. Local-first desktop widget for tracking token usage, costs, and limits across 43+ AI coding tools—including Claude Code, Codex, Cursor, OpenCode, OpenClaw It currently holds 2,521 stars and 250 forks with 124 open issues, and was last pushed on 2026-09-30 (repository created 2026-05-19).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #89 with 37 new stars today.

GitHub Repository Details

Repository Javis603/token-monitor · default branch main · size 47953 KB · watchers 6 · source: GitHub REST API and repository README

README

EN | 简 | 繁 | KO | JA

https://github.com/Javis603/token-monitor/blob/HEAD/Token Monitor logo

Token Monitor

One live dashboard for every AI coding tool, synced across every machine.

https://github.com/Javis603/token-monitor/blob/HEAD/Latest release https://github.com/Javis603/token-monitor/blob/HEAD/Total downloads https://github.com/Javis603/token-monitor/blob/HEAD/Windows 10 or later https://github.com/Javis603/token-monitor/blob/HEAD/macOS 12 or later https://github.com/Javis603/token-monitor/blob/HEAD/Linux x64 https://github.com/Javis603/token-monitor/blob/HEAD/Discord https://github.com/Javis603/token-monitor/blob/HEAD/License: MIT

What is Token Monitor?

A desktop widget that shows live token usage and AI Tool Limits across 43+ AI coding tools — Claude Code, Codex, Cursor, GitHub Copilot, Cherry Studio, and more — with real-time multi-device sync, historical usage trends, and breakdowns by tool, device, model, session, or project.

Supported Tools

Token Monitor supports token usage, account-limit checks, and session details separately:

| Logo | Tool | Data path | Token Usage | AI Tool Limits | Session Details | |:---:|------|-----------|:---:|:---:|:---:| | https://github.com/Javis603/token-monitor/blob/HEAD/Claude Code | Claude Code | ~/.claude/projects/, ~/.claude/transcripts/ | ✅ | ✅ | ✅ | | https://github.com/Javis603/token-monitor/blob/HEAD/Codex | Codex | ~/.codex/ (sessions/, archived_sessions/) | ✅ | ✅ | ✅ | | https://github.com/Javis603/token-monitor/blob/HEAD/OpenCode | OpenCode | ~/.local/share/opencode/ (opencode*.db, storage/message/) | ✅ | ✅ | ✅ | | https://github.com/Javis603/token-monitor/blob/HEAD/Hermes Agent | Hermes Agent | ~/.hermes/state.db | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/OpenClaw | OpenClaw | ~/.openclaw/agents/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Cursor | Cursor IDE / Cursor CLI / Grok Bot | ~/.config/tokscale/cursor-cache/ (account-level usage export) | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Antigravity | Antigravity | ~/.gemini/ (antigravity/, antigravity-ide/, antigravity-backup/, antigravity-cli/conversations/) | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Cline | Cline | VS Code globalStorage tasks (.../saoudrizwan.claude-dev/tasks/), ~/.cline/data/sessions/ | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Amp | Amp | ~/.local/share/amp/threads/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Factory Droid | Factory Droid | ~/.factory/sessions/ | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Kimi | Kimi CLI / Kimi Code / Kimi Work | ~/.kimi/sessions/, ~/.kimi-code/sessions/, /kimi-desktop/ | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Qwen | Qwen CLI | ~/.qwen/projects/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Grok Build | Grok Build | ~/.grok/ (sessions/, logs/unified.jsonl) | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/GitHub Copilot | GitHub Copilot | VS Code workspaceStorage/*/chatSessions/, ~/.copilot/ (otel/, data.db, session-store.db) | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Pi | Pi | ~/.pi/agent/sessions/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Oh My Pi | Oh My Pi | ~/.omp/agent/sessions/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Zed | Zed | ~/.local/share/zed/threads/threads.db | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Kilo | Kilo | ~/.local/share/kilo/kilo.db; VS Code globalStorage tasks (.../kilocode.kilo-code/tasks/) — extension logs on Linux & remote/WSL only | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Command Code | Command Code | ~/.commandcode/projects/**/*.jsonl | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/MiMo | MiMo Code / MiMo Desktop | ~/.local/share/mimocode/mimocode.db | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Muse Code | Muse Code | ~/.local/share/muse/sessions/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/ZCode | ZCode / GLM | ~/.zcode/ (projects/, cli/db/db.sqlite) | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Kiro | Kiro | ~/.kiro/sessions/cli/, Kiro IDE globalStorage & kiro-cli DB | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/CodeBuddy | CodeBuddy | ~/.codebuddy/projects/ + IDE / VS Code extension logs | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/WorkBuddy | WorkBuddy | ~/.workbuddy/projects/, ~/.workbuddy/workbuddy.db | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Proma | Proma | ~/.proma/agent-sessions/*.jsonl | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Qoder | Qoder | ~/.qoder-cn/projects/**/*.jsonl, legacy /QoderCN/SharedClientCache/cache/db/local.db (CN only) | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Reasonix | Reasonix | ~/.reasonix/ (stats/, sessions/, projects/*/sessions/) | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/DeepSeek | DeepSeek / DeepSeek Harness | ~/.dsh/sessions/ (session.jsonl, session.jsonl.zstd) | ✅ | ✅ | ✅ | | https://github.com/Javis603/token-monitor/blob/HEAD/Cherry Studio | Cherry Studio | /CherryStudio/ (Data/Agents/.claude/projects/ V2, .claude/projects/ legacy) | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/LM Studio | LM Studio | ~/.lmstudio/server-logs/**/*.log | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Unsloth | Unsloth Studio | ~/.unsloth/studio/studio.db | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Devin | Devin CLI / Devin Desktop | ~/.local/share/devin/cli/sessions.db, /Devin/User/acp-events/ | ✅ | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/fx | fx | ~/.fx/sessions/ | ✅ | — | — | | https://github.com/Javis603/token-monitor/blob/HEAD/TypeSafe | TypeSafe | TypeSafe Console Cookie (billing balance and estimated token spend via usage data) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/OpenRouter | OpenRouter | OpenRouter API key (usage/key limit; balance when credits access is authorized, documented for Management keys) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Minimax | Minimax | Minimax API key (Token Plan quota via Minimax API) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Volcengine | Volcengine | Ark API key or Volcengine AK/SK (Ark Coding Plan & Agent Plan quota via Volcengine API) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Ollama | Ollama | Ollama Cloud cookie (session/weekly usage via ollama.com/settings) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Trae CN | Trae CN | Trae CN access token (Trae CN / SOLO credits via trae.cn) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Alibaba Cloud | Alibaba Cloud | Alibaba Cloud console cookie (Bailian / Model Studio Token Plan quota, Team & Personal) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/StepFun | StepFun | StepFun Oasis-Token (Coding Plan / Token Plan quota) | — | ✅ | — | | https://github.com/Javis603/token-monitor/blob/HEAD/Third-party APIs | Third-party APIs | New API / Sub2API-compatible account presets (including compatible One API forks), a New API API-key preset, and a Custom balance endpoint | — | ✅ | — |

Notes, Custom balance endpoints, and data paths overridden by environment variables


  • Paths above are the defaults. Token Monitor follows the same environment overrides Tokscale does — $XDG_DATA_HOME for the ~/.local/share/ roots, and per-tool variables such as $CODEX_HOME, $GROK_HOME, $HERMES_HOME, $KIMI_CODE_HOME, $UNSLOTH_STUDIO_HOME, $LM_STUDIO_HOME, $DSH_HOME, $REASONIX_STATE_HOME, $REASONIX_HOME and the $CLINE_* family.
  • LM Studio tracking currently covers OpenAI-compatible /v1/chat/completions and /v1/responses requests recorded in server logs. Conversations started from LM Studio's built-in Chat UI and native /api/v1/chat requests are not included.
  • Unsloth Studio tracks inference usage from studio.db: Studio chats and its local API. Local inference has zero API cost; recognized metered providers use Tokscale's price estimates. Training tokens are not included. See Unsloth source notes.
  • Devin tracks Devin CLI sessions from the local sessions.db and Devin Desktop agent sessions from acp-events ACP logs; where both cover the same session the CLI database is authoritative. Desktop coverage depends on the connected ACP agent: only agents that write usage_update events locally are counted, and Devin Desktop's default devin-cloud agent meters its usage server-side, so a default Desktop setup reports no Desktop tokens. Session titles and project attribution come from the CLI database. See Devin source notes.
  • Command Code transcripts do not contain actual token counts or per-message model metadata. Token usage is estimated from transcript text, while model attribution and derived cost may reflect the currently configured model rather than the model historically used for each request.
  • The Cursor cache comes from Cursor's account-level usage export, so it covers usage from Cursor IDE, Cursor CLI, and Grok Bot. Token Monitor automatically detects accounts signed in through the Cursor desktop app and also supports adding accounts manually in Settings. The cache re-syncs automatically when stale, but newly finished sessions can take a few minutes to reach Cursor's dashboard, so usage updates on sync rather than instantly.
  • Custom maps numeric JSON fields from one GET balance endpoint; OpenAI or Anthropic compatibility alone is not enough.

Qoder CN (local adapter)

Qoder CN token usage is read from the app's local data, not an API — enable it in Settings → tools (opt-in, off by default). Current builds persist Claude-compatible JSONL transcripts in the Qoder config directory's projects tree (normally ~/.qoder-cn/projects), while older builds wrote a SQLite database. The adapter reads both. The transcript path follows TOKEN_MONITOR_QODER_CN_PROJECTS_PATH, then QODERCN_CONFIG_DIR/projects, then the default; the legacy database is auto-detected per platform and can be overridden with TOKEN_MONITOR_QODER_CN_DB_PATH. See Qoder source notes.

This is an advanced local integration: the JSONL path needs no extra runtime, but reading the legacy database needs a sqlite3 CLI on PATH or a Node runtime with unflagged node:sqlite (Node ≥ 22.15; the Electron widget may need the CLI). Read failures retain the last complete snapshot. Only JSONL rows with reported token counts are included: current first-party plan-billed rows may expose credits and context occupancy but no reliable per-session context window, so their tokens cannot be reconstructed safely and are omitted from token totals. Their credits remain available in AI Tool Limits; BYOK/custom-model rows with measured tokens are counted normally.

Showcase

https://github.com/Javis603/token-monitor/blob/HEAD/Home View
Customizable dashboard — choose which modules show and their order
https://github.com/Javis603/token-monitor/blob/HEAD/Limits View
Multiple accounts side by side, one-click switch of the active Codex account
https://github.com/Javis603/token-monitor/blob/HEAD/Tools View
Click any tool to expand input / output and cache-hit detail
https://github.com/Javis603/token-monitor/blob/HEAD/Session View
Open a single session to break each prompt into tokens and tools used
https://github.com/Javis603/token-monitor/blob/HEAD/Models View
Every model's usage and cost, aggregated across tools
https://github.com/Javis603/token-monitor/blob/HEAD/Devices View
Each device's usage, cost, and sync status — expand for per-machine detail
https://github.com/Javis603/token-monitor/blob/HEAD/Usage Dashboard Overview
A year of activity heatmap and streaks, aggregated across all devices
https://github.com/Javis603/token-monitor/blob/HEAD/Usage Dashboard Trends
A year of daily trends, stacked by tool / model, with K-line

Why Token Monitor?

Most usage monitors are useful on the machine they run on. Token Monitor is built for multi-device work: each device watches its own local logs, sends summary updates to your hub, and every connected widget sees token changes almost immediately.

Features

Tracking usage

Limits, trends & export

Multi-device & deployment

Interface & surfaces

Installation

On macOS, install through the official Homebrew Cask:

brew install --cask token-monitor

Or download from GitHub Releases.

Packaged builds check GitHub Releases automatically. When an update is available, the app shows an update indicator; supported platforms can also install from Settings → General.

First run

Local mode is the default: launch the app and it starts tracking this device. No hub, agent, or config required.

Multi-device sync

Pick ONE multi-device sync backend for your devices (and any headless agents). On each device, open the widget and pick a mode under Settings → Multi-device Sync. The widget contributes this device's usage automatically; run npm run agent only on machines without a widget. iCloud Drive is a macOS-widget-only option and does not support headless agents.

Option A — Host the hub from the widget (easiest, no CLI)

In the widget on one always-on machine, open Settings → Multi-device Sync and pick Host hub on this device. The widget generates a random secret and lists the LAN URLs other devices can connect to (Tailscale or ZeroTier addresses appear here too). On every other device, pick Connect to a hub and paste the URL + secret.

The hub runs while Token Monitor is running — quitting (not just closing the window) stops it for all connected devices.

Option B — Self-hosted Node hub (always-on headless machine)

# on the always-on machine
cp .env.example .env

set TOKEN_MONITOR_SECRET to something private, then:

npm run hub

Option C — Cloudflare Worker hub (across networks, including iPhone)

Deploy to Cloudflare

One-click deploy — Cloudflare will prompt for the TOKEN_MONITOR_SECRET during setup. Or deploy manually:

cd worker
npm install
npx wrangler login
npx wrangler secret put TOKEN_MONITOR_SECRET
npx wrangler deploy

Paste the deployed URL into each device's widget at Settings → Multi-device Sync. See worker/README.md for the iOS widget recipe and endpoint reference, or docs/API.md for the hub HTTP API.

Option D — iCloud Drive (macOS, no Hub server)

On each Mac signed into the same Apple ID, choose iCloud Drive in Settings → Multi-device Sync. This is an opt-in macOS-only path: Token Monitor writes one atomic snapshot per device and one subscription snapshot per writer under iCloud Drive/Token Monitor/sync-v1/, then each Mac aggregates the valid files locally. It uses no Token Monitor server, CloudKit, or credentials; provider API keys, cookies, and tokens stay local. iCloud Drive is eventually consistent, so another Mac may take a moment to appear or update, and a missing or malformed file never clears the last-good aggregate.

App data

App state lives in the OS user-data dir — delete it along with the app to fully uninstall.

| Platform | Path | |---

GitHub Stars & Activity

2,521Stars
250Forks
124Open issues
JavaScriptLanguage

GitHub Popularity

GitHub stars2,521
Forks250
Open issues124
Primary languageJavaScript
LicenseMIT
Stars gained today37
Created2026-05-19
Last pushed2026-09-30

Trending History

Daily boardrank #89 · ▲ 37 stars

Related GitHub Projects

1

affaan-m / ECC

JavaScript★ 270,115⑂ 40,363▲ 650 stars
→
2

DietrichGebert / ponytail

JavaScript★ 148,990⑂ 8,012▲ 865 stars
→
3

Leonxlnx / taste-skill

JavaScript★ 91,512⑂ 6,218▲ 333 stars
→
4

pbakaus / impeccable

JavaScript★ 72,938⑂ 4,405▲ 460 stars
→
5

byoungd / up

JavaScript★ 66,331⑂ 6,634▲ 714 stars
→
6

vercel-labs / agent-skills

JavaScript★ 31,762⑂ 2,779▲ 45 stars
→
7

decolua / 9router

JavaScript★ 30,102⑂ 5,699▲ 71 stars
→
8

open-gsd / gsd-core

JavaScript★ 10,036⑂ 719▲ 56 stars
→

More Trending Repositories