token-monitor README

README проекта с github.com/Javis603/token-monitor. Одним файлом markdown: README.md.

EN | 简 | 繁 | KO | JA | PT

Token Monitor logo

Token Monitor

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

Latest release Total downloads Windows 10 or later macOS 13 or later Linux x64 Discord License: MIT

Javis603%2Ftoken-monitor | Trendshift

What is Token Monitor?

A desktop app that shows live token usage and AI Tool Limits across 56+ 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. It lives wherever you look: the main window, the MacBook notch, the menu bar or system tray, the edge of the screen, a floating bubble, and native macOS widgets.

Supported Tools

Token usage, AI Tool Limits and session details from the AI coding tools and providers you already use:

Claude Code Codex OpenCode Hermes Agent OpenClaw Cursor Antigravity Gemini CLI Cline Amp Factory Droid Kimi Qwen Grok Build GitHub Copilot Pi Oh My Pi OmO Native Goose Zed Kilo Command Code MiMo Muse / Muse Code ZCode Kiro CodeBuddy WorkBuddy Proma CatPaw Qoder Reasonix DeepSeek Cherry Studio LM Studio Unsloth Devin fx MiniMax Mistral Vibe Prime Agent Jcode Junie OpenCodeReview TypeSafe OpenRouter Volcengine Ollama Trae CN Alibaba Cloud StepFun Notion AI Manus Hark OpenDesign Third-party APIs

See what each tool supports and where its data is read from →

Showcase

On your desktop

Notch Panel
Notch Panel — running sessions beside the notch; swipe down for today's usage, every account's limits, sessions and breakdowns
Edge Dock
Edge Dock — quotas and usage parked at the screen edge; hover for limits, recent sessions and tokens
Menu bar and popover
Menu bar & tray — pick a preset or compose your own: tool icons, quota bars, reset times, cost or live tok/s

Inside the app

Limits View
Multiple accounts side by side, one-click switch of the active Codex account
Tools View
Click any tool to expand input / output and cache-hit detail
Session View
Open a single session to break each prompt into tokens and tools used
More views — projects, models and devices
Projects View
Usage and cost per project, aggregated across tools and devices
Models View
Every model's usage and cost, aggregated across tools
Devices View
Each device's usage, cost, and sync status — expand for per-machine detail

Usage Dashboard

Usage Dashboard Overview
A year of activity heatmap and streaks, aggregated across all devices
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.

Quick Install

On macOS, install through the official Homebrew Cask:

brew install --cask token-monitor

Or download the app for macOS, Windows, or Linux from GitHub Releases.

Launch the app to start tracking this device locally, with no hub setup required. See Installation for full details.

Features

Tracking usage

Multi-device & deployment

Interface & surfaces

Plugins (experimental)

Extend desktop pages with custom content, add plugin pages and settings, and place content in Notch, Edge Dock, the menu bar/system tray or floating bubbles. Authors can build their own interfaces and optional local Node backends for data sources and computation.

Manage plugins in Settings → Plugins. See the user guide, community plugins, development guide and Plugin API. The plugin API is experimental and may change; plugins may need updates. Enable only code you trust: plugins are not sandboxed, and Node backends run with your OS user’s permissions.

Supported Tools in Detail

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

Logo Tool Data path Token Usage AI Tool Limits Session Details
Claude Code Claude Code ~/.claude/projects/, ~/.claude/transcripts/ ✅ ✅ ✅
Codex Codex ~/.codex/ (sessions/, archived_sessions/) ✅ ✅ ✅
OpenCode OpenCode ~/.local/share/opencode/ (opencode*.db, storage/message/) ✅ ✅ ✅
Hermes Agent Hermes Agent ~/.hermes/state.db ✅ — —
OpenClaw OpenClaw ~/.openclaw/agents/ ✅ — —
Cursor Cursor IDE / Cursor CLI / Grok Bot ~/.config/tokscale/cursor-cache/ (account-level usage export) ✅ ✅ —
Antigravity Antigravity ~/.gemini/ (antigravity/, antigravity-ide/, antigravity-backup/, antigravity-cli/conversations/) ✅ ✅ —
Gemini CLI Gemini CLI ~/.gemini/tmp/ ✅ — —
Cline Cline VS Code globalStorage tasks (.../saoudrizwan.claude-dev/tasks/), ~/.cline/data/sessions/ ✅ ✅ —
Amp Amp ~/.local/share/amp/threads/ ✅ — —
Factory Droid Factory Droid ~/.factory/sessions/ ✅ ✅ —
Kimi Kimi CLI / Kimi Code / Kimi Work ~/.kimi/sessions/, ~/.kimi-code/sessions/, <platform-app-data>/kimi-desktop/ ✅ ✅ —
Qwen Qwen CLI ~/.qwen/projects/ ✅ — —
Grok Build Grok Build ~/.grok/ (sessions/, logs/unified.jsonl) ✅ ✅ —
GitHub Copilot GitHub Copilot VS Code workspaceStorage/*/chatSessions/, ~/.copilot/ (otel/, data.db, session-store.db) ✅ ✅ —
Pi Pi ~/.pi/agent/sessions/ ✅ — ✅
Oh My Pi Oh My Pi ~/.omp/agent/sessions/ ✅ — ✅
OmO Native OmO Native ~/.omo/agent/sessions/, ~/.senpi/agent/sessions/, ~/.omo/senpi-task/children/, <project>/.omo/senpi-task/children/ ✅ — ✅
Goose Goose ~/.local/share/goose/sessions/sessions.db ✅ — —
Zed Zed ~/.local/share/zed/threads/threads.db ✅ ✅ —
Kilo Kilo ~/.local/share/kilo/kilo.db; VS Code globalStorage tasks (.../kilocode.kilo-code/tasks/) ✅ — —
Command Code Command Code ~/.commandcode/projects/**/*.jsonl ✅ ✅ —
MiMo MiMo Code / MiMo Desktop ~/.local/share/mimocode/mimocode.db ✅ ✅ —
Muse Code Muse / Muse Code ~/.local/share/muse/sessions/; muse.ai Cookie ✅ ✅ —
ZCode ZCode / GLM ~/.zcode/ (projects/, cli/db/db.sqlite) ✅ ✅ —
Kiro Kiro ~/.kiro/sessions/cli/, Kiro IDE globalStorage & kiro-cli DB ✅ ✅ —
CodeBuddy CodeBuddy ~/.codebuddy/projects/ + IDE / VS Code extension logs ✅ — ✅
WorkBuddy WorkBuddy ~/.workbuddy/projects/, ~/.workbuddy/workbuddy.db ✅ ✅ ✅
Proma Proma ~/.proma/ (agent-sessions/, sdk-config/sessions/, sdk-config/projects/), ~/.proma-dev/ ✅ — —
CatPaw CatPaw <platform-app-data>/ (catpaw-moon/, catpaw-overseas/, catpaw-memory-*.db) ✅ — —
Qoder Qoder ~/.qoder/projects/**/*.jsonl (global), ~/.qoder-cn/projects/**/*.jsonl (CN) ✅ ✅ —
Reasonix Reasonix ~/.reasonix/ (stats/, sessions/, projects/*/sessions/) ✅ — ✅
DeepSeek DeepSeek / DeepSeek Harness ~/.dsh/sessions/ (session.jsonl, session.jsonl.zstd) ✅ ✅ ✅
Cherry Studio Cherry Studio <platform-app-data>/CherryStudio/ (Data/Agents/.claude/projects/ V2, .claude/projects/ legacy) ✅ — —
LM Studio LM Studio ~/.lmstudio/server-logs/**/*.log ✅ — —
Unsloth Unsloth Studio ~/.unsloth/studio/studio.db ✅ — —
Devin Devin CLI / Devin Desktop ~/.local/share/devin/cli/sessions.db, <platform-app-data>/Devin/User/acp-events/ ✅ ✅ —
fx fx ~/.fx/sessions/ ✅ — —
MiniMax MiniMax / MiniMax Code ~/.minimax/v2/sessions/ ✅ ✅ —
Mistral Mistral Vibe $VIBE_HOME/logs/session/ (~/.vibe/logs/session/); Mistral Admin cookie (Included API / Vibe monthly allowance and credit balance) ✅ ✅ —
Prime Agent Prime Agent ~/.prime/agent/ (sessions/, session-artifacts/) ✅ — —
Jcode Jcode ~/.jcode/sessions/ ✅ — —
Junie Junie ~/.junie/sessions/**/events.jsonl ✅ — —
OpenCodeReview OpenCodeReview ~/.opencodereview/sessions/**/*.jsonl ✅ — —
TypeSafe TypeSafe TypeSafe Console Cookie (billing balance and estimated token spend via usage data) — ✅ —
OpenRouter OpenRouter OpenRouter API key (usage/key limit; balance when credits access is authorized, documented for Management keys) — ✅ —
Volcengine Volcengine Ark API key or Volcengine AK/SK (Ark Coding Plan & Agent Plan quota via Volcengine API) — ✅ —
Ollama Ollama Ollama Cloud API key or Cookie (monthly included usage, legacy session/weekly quotas, and credit balances) — ✅ —
Trae CN Trae CN Trae CN access token (Trae CN / SOLO credits via trae.cn) — ✅ —
Alibaba Cloud Alibaba Cloud Alibaba Cloud console cookie (Bailian / Model Studio Token Plan quota, Team & Personal) — ✅ —
StepFun StepFun StepFun Oasis-Token (Coding Plan / Token Plan quota) — ✅ —
Notion AI Notion AI Business/Enterprise Standard and Select credits or legacy rolling/monthly allowances; manual token_v2 cookie + explicit workspace ID — ✅ —
Manus Manus Manus credits (monthly + daily/periodic refresh + balance); desktop session (macOS/Windows) or manual web session (all OSes) — ✅ —
Hark Hark Hark Pro daily and monthly token pools; macOS desktop session or pasted session cookie — ✅ —
OpenDesign OpenDesign Five-hour / weekly subscription allowance for the current workspace; manual Cookie — ✅ —
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, $GEMINI_CLI_HOME, $SENPI_CODING_AGENT_DIR, $SENPI_CODING_AGENT_SESSION_DIR, $GROK_HOME, $HERMES_HOME, $GOOSE_PATH_ROOT, $KIMI_CODE_HOME, $UNSLOTH_STUDIO_HOME, $LM_STUDIO_HOME, $DSH_HOME, $REASONIX_STATE_HOME, $REASONIX_HOME and the $CLINE_* family.

  • Gemini CLI supports $GEMINI_CLI_HOME on the host; WSL discovery checks only the default Linux ~/.gemini/tmp/. Fresh installs track it by default; existing saved tool selections must enable it in Settings → tools.

  • Muse Code subscription limits use muse usage --json from Muse Code 1.4.13+ and its existing sign-in. Missing allowance and API-key billing do not provide quota percentages. See the Muse data-source notes.

  • Goose counts all session usage on its creation day, including usage on later days. Remote goosed servers and custom scan paths are not supported. See Goose source notes.

  • CatPaw is off by default; enable it in Settings → tools. It reads domestic and overseas assistant databases on macOS and Windows. See CatPaw source notes for paths and verification boundaries.

  • OmO Native tracks local session records from both OmO Native and standalone Senpi. A fresh install tracks it. An existing saved Tools selection does not gain it on upgrade; enable OmO Native in Settings → tools. Some child-task logs count toward usage but do not yet support Session Detail. See OmO Native source notes.

  • 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.

  • Notion AI uses internal APIs with a manually pasted token_v2 cookie and an explicit Business/Enterprise workspace ID. Token Monitor tests against fixtures, including a sanitized Standard/Select response. See Notion source notes for validation details.

  • Manus reads a signed-in desktop session on macOS/Windows, or a manually supplied web session on any OS (including Linux). Monthly credits, refresh allowance and balance use the same undocumented internal endpoint, with no compatibility guarantee. See Manus source notes.

  • Hark reads the signed-in macOS desktop session, or a pasted session cookie on any OS. It shows account-level daily and monthly token pools. See Hark source notes.

  • MiniMax Code reads the local session history the CLI writes, under ~/.minimax or MINIMAX_DATA_DIR / MAVIS_DATA_DIR (also ~/.mavis and ~/.minimax-<profile> / ~/.mavis-<profile>), plus runs captured with tokscale headless mcode; a turn found in both counts once.

  • 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 recent usage may still appear with a delay.

  • Custom maps numeric JSON fields from one GET balance endpoint; OpenAI or Anthropic compatibility alone is not enough.

  • Qoder: the Qoder group in Settings → tools tracks the international and CN editions independently. Fresh installations track both; existing selections are preserved. The tool usage list combines them unless Show versions separately is on. International transcripts are read from QODER_CONFIG_DIR/projects (default ~/.qoder/projects); CN transcripts from TOKEN_MONITOR_QODER_CN_PROJECTS_PATH, then QODERCN_CONFIG_DIR/projects (default ~/.qoder-cn/projects). Only token counts recorded in transcripts are counted: managed-model rows that record credits without tokens are left out, and those credits stay in AI Tool Limits. Qoder CN CLI 1.1.62 has been reported to record future counters with QODERCN_EXPOSE_TOKEN_USAGE=1; existing records are not backfilled. Dynamic model slots such as dfmodel are shown as recorded. Older Qoder CN releases that stored usage only in SQLite are no longer collected; existing Token Monitor history files are kept. See Qoder source notes.

Additional Feature Support

Feature Supported tools/sources Notes
Session titles Claude Code, Codex, OpenCode, Cursor, Antigravity, Cline CLI, Factory Droid, Kimi CLI, Grok Build, Pi, Oh My Pi, OmO Native, MiMo, ZCode, CodeBuddy, WorkBuddy, Reasonix, DeepSeek Harness, Cherry Studio, Devin CLI, fx, MiniMax Code —
Per-prompt/reply usage and tool calls Claude Code, Codex, OpenCode, Pi, Oh My Pi, OmO Native, CodeBuddy, WorkBuddy, DeepSeek Harness Details are read locally and are not synced.
Context usage/remaining space Claude Code, Codex, DeepSeek Harness, Grok Build, WorkBuddy, CatPaw Claude Code's context limit is estimated from the model.
Cache usage/session cache hit rate Sources exposing cache fields, including Claude Code, Codex, OpenCode, Cursor, Kimi, Pi, Oh My Pi, OmO Native, DeepSeek Harness Hit rate is shown when cache usage data is available.
Estimated cache time remaining Claude Code 5 minutes or 1 hour, based on the recorded cache tier.
Output speed/token consumption rate Claude Code, Codex, OpenCode, Antigravity, Kimi, GitHub Copilot, Pi, Oh My Pi, OmO Native, Kilo CLI, MiMo Code/MiMo Desktop, Muse Code, ZCode CLI, Kiro, DeepSeek Harness, Devin CLI Output speed in tok/s, total token consumption in tok/min; timing can include waiting.
Session model and reasoning effort Claude Code, Codex Only models and reasoning effort explicitly recorded in the session are shown.
Reasoning token counts Codex, OpenCode, Pi, Oh My Pi, OmO Native, CodeBuddy, WorkBuddy, DeepSeek Harness —
Turn start/completion detection Claude Code, Codex, OpenCode, Cursor, Antigravity, CodeBuddy, WorkBuddy, DeepSeek Harness Uses turn signals recorded by the tool. For other tools or without valid signals, running is estimated for about 10 minutes after the last activity.
Native running/waiting-for-input status Claude Code, Codex, Antigravity Antigravity ACP in T3 Code reports running and idle only.
Parent/subagent grouping Codex, Antigravity, Oh My Pi, ZCode; T3 Code sessions with verifiable parent links Claude Code grouping is available through T3 Code.
Continuation-record grouping for the same conversation Codex; T3 Code sessions with verified thread links —
Switch local accounts Codex Switches between accounts added in Token Monitor.
Quota reset times/countdowns Sources exposing reset times, e.g. Claude Code, Codex, OpenCode, Cursor, Antigravity —
Available quota reset credits/grants Claude Code, Codex Shows remaining resets and expiry dates; display only.
Quota reset forecast Codex Optional third-party forecasts from codex-resets.com.

Reasonix Sessions and Session Detail are read on demand from local files. Reasonix projects are not aggregated.

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 the headless 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.

Headless agent

Run the headless agent on servers, SSH hosts, or inside WSL — anywhere you use AI tools without the desktop widget. It collects usage on that machine and posts it to your hub (Option A, B, or C). Requires Node.js 22.22+ and git.

git clone https://github.com/Javis603/token-monitor.git
cd token-monitor
npm ci
cp .env.example .env              # set TOKEN_MONITOR_HUB_URL, TOKEN_MONITOR_SECRET, and a unique TOKEN_MONITOR_DEVICE_ID
npm run agent                     # run continuously

See docs/headless-agent.md for running it as a service, updating, uninstalling, and troubleshooting. For SQLite-backed tools inside WSL, follow the WSL SQLite setup.

App data

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

Platform Path
macOS ~/Library/Application Support/Token Monitor/
Windows %APPDATA%/Token Monitor/
Linux ~/.config/Token Monitor/

Build from source

To build your own installer, use Node.js 22.22+ on the target OS (electron-builder can't cross-build a macOS .dmg on Windows, or vice-versa).

npm install
npm run dist:mac     # macOS arm64 .dmg           → dist/
npm run dist:mac:x64 # macOS Intel x64 .dmg       → dist/
npm run dist:win     # Windows x64 installer .exe → dist/
npm run dist:linux   # Linux x64 AppImage         → dist/
npm run pack         # unpacked app dir (no installer), for quick local testing

Output lands in dist/. Windows and Linux use the matching dist:* script above on the target OS. Packaging the macOS release build requires a local Developer ID Application signing identity; use npm start for local development or unsupported platforms.

Runtime and packaging scripts explicitly ensure the pinned tokscale binary on every target with a vendored build. Other source platforms keep the npm binary and filter clients it does not support; npm install, lint, and tests do not download it.

For lint and tests, run npm run verify. Run npm run test:coverage for JavaScript coverage reports; see testing and coverage for scope, report files and interpretation limits.

How it works

Mode A — Local (default, no setup)
    widget (Electron) ──▶ tokscale ──▶ ~/.claude, ~/.codex, $HERMES_HOME

Mode B — Sync (opt-in, multi-device)
    device A widget ──▶
    device B widget ──▶  hub  ──▶  widget on any device
    device C agent  ──▶

The widget chooses local vs sync mode based on Settings → Multi-device Sync. The hub itself can run as a separate npm run hub process, a Cloudflare Worker, or directly inside one of the widgets (Host mode). In Hub Client and Host modes, the hub pushes aggregated stats to every connected widget over Server-Sent Events, so updates on one device usually appear on the others within a few seconds. iCloud Drive mode syncs files directly; propagation is eventually consistent and may take longer.

Session data retention

With Preserve deleted session usage enabled (Settings → Collection), Token Monitor archives observed daily tool/model usage locally with no time limit — so even after a source tool prunes its own sessions, the heatmap and trends are unaffected.

Advanced: extend the source tool's own retention

The heatmap and sync payload use a rolling 370-day window (older observations remain available locally for future views). Claude Code keeps only 30 days of transcripts by default (cleanupPeriodDays); to keep the full rolling year before the archive kicks in, raise it in ~/.claude/settings.json before the window passes:

{
  "cleanupPeriodDays": 370
}

A larger value keeps more, at the cost of transcripts living on disk for as long as you set. tokscale's Session Data Retention table covers the other tools' defaults and config paths.

This archive only covers days Token Monitor has already observed; data deleted before it started tracking cannot be recovered.

Settings

There are two places to configure Token Monitor; day-to-day use only needs the first:

See the configuration reference for every setting and all environment variables.

Privacy

Token Monitor processes usage logs locally and sends no analytics or telemetry to the project maintainer. Network access occurs only for documented or user-enabled features. See the privacy policy for the data used by updates, provider integrations, Discord Rich Presence, and optional multi-device sync.

Star History

Star History Chart

Contributing

Issues and PRs are welcome. Start with CONTRIBUTING.md; project conventions, architecture notes, and the command reference live in AGENTS.md.

Acknowledgments

License

MIT © @Javis

token-monitor (Javis603/token-monitor)

Ищем в базе…

Что это такое?Десктопный виджет, который в реальном времени показывает расход токенов и лимиты ИИ-инструментов в 44+ инструментах для программирования с ИИ — Claude Code, Codex, Cursor, GitHub Copilot, Cherry Studio и других. Есть синхронизация между устройствами в реальном времени, история расхода и разбивка по инструменту, устройству, модели, сессии или проекту.
Это локальное приложение или облачный сервис?Это десктопный виджет, работающий локально, а не облачный сервис: он напрямую читает локальные логи и базы данных на вашем компьютере, а синхронизация между вашими устройствами — лишь необязательная опция через собственный самохостинг-хаб.
Как его запустить?Вы просто запускаете виджет, и он автоматически сканирует стандартные локальные пути к данным каждого поддерживаемого инструмента, например ~/.claude/projects/ или ~/.codex/. Для локального отслеживания вход в аккаунт не нужен; если ваши папки с сессиями лежат не в стандартных местах, можно указать их вручную.
Нужен ли API-ключ или аккаунт?Аккаунт не нужен для чтения локальной статистики из таких инструментов, как Claude Code или Codex, но для некоторых проверок лимитов на уровне провайдера (OpenRouter, Volcengine, Ollama Cloud, Trae CN, Alibaba Cloud, StepFun) потребуется API-ключ или cookie сессии этого провайдера.
Подсчёт одинаково точен для всех инструментов?Нет — некоторые интеграции лишь оценивают расход: в расшифровках Command Code нет реального числа токенов, поэтому расход оценивается по тексту расшифровки, а определение модели может показывать текущую настроенную модель, а не ту, что реально использовалась в каждом запросе.
На каких системах он работает?Работает на macOS, Windows и Linux; на Windows он также автоматически находит и объединяет данные о расходе из файлов работающего дистрибутива WSL.
Данные моих сессий куда-то отправляются?Нет — детали каждой сессии читаются по запросу прямо из ваших локальных расшифровок или баз данных и никогда не синхронизируются; при использовании на одном устройстве сервер вообще не требуется.
Как именно работает синхронизация между устройствами?Каждое устройство следит за своими локальными логами и отправляет сводные обновления на самохостинг-хаб через Server-Sent Events, поэтому каждый подключённый виджет видит изменения токенов в течение пары секунд. Также поддерживается синхронизация через iCloud Drive, но там изменения расходятся с задержкой.
Что будет, если инструмент удалит старые файлы сессий?Многие инструменты, например Claude Code, по умолчанию удаляют расшифровки старше 30 дней. Token Monitor может сохранять наблюдаемый дневной расход локально, чтобы тепловые карты и тренды оставались доступны даже после удаления исходных файлов.
Можно ли экспортировать данные о расходе?Да, данные экспортируются в универсальный формат CSV и JSON — вручную или автоматической записью в папку; их можно использовать в таблицах, Obsidian или Grafana.
Показывает ли он стоимость в моей валюте?Стоимость показывается в USD, TWD, HKD или CNY; курсы валют обновляются автоматически раз в день и при желании задаются вручную в настройках.
Какие есть похожие проекты?casbin-gateway, openusage, magpie, 9router, tokscale, superpowers-zh, ThinkWatch-Lite, cockpit-tools
Автор
Javis603
Размер
80 MB
Звёзды
3.7K
Возраст
6 мес
Коммиты · 90 дней