📦mm7894215 / TokenTracker
← 返回首页
Local-first AI token usage & cost tracker for 27 coding tools — with a desktop pet, 4 widgets, achievements, native macOS/Windows apps, and a one-command CLI. Never reads prompts.
⚖️ MIT#claude-code#cli#codex-cli#cost-tracker#cursor🌐 www.tokentracker.cc📅 创建于 2026-04-05🔄 更新于 2026-10-29
🔗 GitHub JavaScript

📄 仓库 README

在 GitHub 查看 ↗
来自 GitHub 仓库自述文件 · 版权归原作者所有
# Token Tracker **English** · [简体中文](https://github.com/mm7894215/TokenTracker/blob/HEAD/./README.zh-CN.md) · [日本語](https://github.com/mm7894215/TokenTracker/blob/HEAD/./README.ja.md) · [한국어](https://github.com/mm7894215/TokenTracker/blob/HEAD/./README.ko.md) · [Deutsch](https://github.com/mm7894215/TokenTracker/blob/HEAD/./README.de.md) ### Track every AI token — then bring your usage to life An accurate, local-first token usage and cost dashboard for **47 AI coding tools** — plus a desktop pet, **4 native widgets**, and **15 achievement tracks**. No cloud account, no API keys, no setup. [![npm version](https://img.shields.io/npm/v/tokentracker-cli.svg?color=blue)](https://www.npmjs.com/package/tokentracker-cli) [![npm downloads](https://img.shields.io/npm/dm/tokentracker-cli.svg?color=brightgreen)](https://www.npmjs.com/package/tokentracker-cli) [![Homebrew](https://img.shields.io/github/v/release/xiufengsun/TokenTracker?label=brew&color=F8B73E&logo=homebrew&logoColor=white)](https://github.com/xiufengsun/homebrew-tokentracker) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![CLI](https://img.shields.io/badge/CLI-macOS%20%C2%B7%20Linux%20%C2%B7%20Windows-lightgrey.svg)](https://www.npmjs.com/package/tokentracker-cli) [![macOS app](https://img.shields.io/badge/macOS%20app-menu%20bar%20%2B%20widgets-lightgrey.svg?logo=apple&logoColor=white)](https://github.com/xiufengsun/TokenTracker/releases/latest) [![Windows app](https://img.shields.io/badge/Windows%20app-system%20tray-lightgrey.svg?logo=windows&logoColor=white)](https://github.com/xiufengsun/TokenTracker/releases/latest) [![GitHub stars](https://img.shields.io/github/stars/xiufengsun/TokenTracker?style=social)](https://github.com/xiufengsun/TokenTracker/stargazers) [![Featured in 阮一峰周刊 #393](https://img.shields.io/badge/Featured%20in-%E9%98%AE%E4%B8%80%E5%B3%B0%E5%91%A8%E5%88%8A%20%23393-FF6B35?logo=rss&logoColor=white)](https://github.com/ruanyf/weekly/blob/master/docs/issue-393.md) [![Author tokens](https://srctyff5.us-east.insforge.app/functions/tokentracker-badge-svg?user_id=0652839f-d19f-4f67-af85-6b7675875443&metric=tokens&compact=1&label=author%20tokens)](https://github.com/xiufengsun/TokenTracker)
📊 See the token dashboard in action



TokenTracker desktop pet powered by real AI coding activity TokenTracker desktop widgets for usage, heatmap, models, and limits
🐾 A living desktop companion
Codes, celebrates streaks, follows your cursor, and rests when you do.
🧩 Four native widgets
Usage, activity heatmap, top models, and rate limits at a glance.

Token Titan achievement Streak achievement Multitool achievement Night Owl achievement Project Devotion achievement

🏆 Unlock achievements from the way you actually code.

🎬 Meet TokenTracker

TokenTracker intro film

⭐ **If TokenTracker saves you time, please [star it on GitHub](https://github.com/xiufengsun/TokenTracker) — it helps other developers find it.**
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M11XSNWD)

This project is tested with BrowserStack.


⚡ Quick Start

Requirements: Node.js 20+ (CLI runs on macOS / Linux / Windows; native desktop app ships for macOS (menu bar), Windows (system tray) and Linux (AppImage, tray). Cursor token reading uses the system sqlite3 CLI when available and falls back to node:sqlite on supported Node releases).

npx tokentracker-cli

That's it. First run installs hooks, syncs your data, and opens the dashboard at http://localhost:7680.

What you get in 30 seconds: - 📊 A local dashboard at localhost:7680 with usage trends, model breakdown, cost analysis - 🔌 Auto-detected hooks for every supported AI tool you have installed - 🏠 Local-first — parses logs on your machine; no account or API keys required - 🧩 Optional: a Skills tab that browses 250+ public skills and syncs them across Claude · Codex · Grok · Antigravity · Gemini · OpenCode · Hermes

Want a native desktop app? - macOS — Download TokenTrackerBar.dmg → drag to Applications. Menu bar status icon, desktop widgets, and the dashboard in a WKWebView. - Windows — Download TokenTracker-Setup.exe → run the per-user installer (no admin needed). System-tray app with the dashboard in WebView2. Portable zip also on the releases page. - Linux — Download TokenTracker-linux-x86_64.AppImage → chmod +x and run. Tray app with the dashboard in a WebKitGTK window. It carries its own GTK/WebKit, so it needs nothing from your distro beyond a current glibc; on GNOME the tray icon still needs the AppIndicator extension. .deb and .rpm packages are also on the releases page — those link the distro's webkit2gtk-4.1, gtk3 and appindicator instead, so the .deb will not install on Debian 12 (use the AppImage there).

Install globally for shorter commands:

npm i -g tokentracker-cli

tokentracker              # Open the dashboard
tokentracker sync         # Manual sync
tokentracker status       # Check hook status
tokentracker status --json     # Machine-readable summary (pipe to jq, ingest from AI agents)
tokentracker status --light    # Plain ASCII table (CI / SSH, no spinner)
tokentracker doctor       # Health check

🍺 Homebrew (macOS)

Prefer brew? Install directly — no extra tap step needed:

# macOS menu bar app (DMG)
brew install --cask xiufengsun/tokentracker/tokentracker

# CLI only
brew install xiufengsun/tokentracker/tokentracker

Upgrade with brew upgrade --cask xiufengsun/tokentracker/tokentracker. The tap auto-bumps within an hour of every new release.

🐧 Linux (AppImage, .deb, .rpm)

Every release ships all three. One self-contained file, no package manager:

chmod +x TokenTracker-linux-x86_64.AppImage
./TokenTracker-linux-x86_64.AppImage

Or install through your package manager:

sudo apt install ./TokenTracker-linux-x86_64.deb    # Debian / Ubuntu
sudo dnf install ./TokenTracker-linux-x86_64.rpm    # Fedora / RHEL

Debian 12: the .deb depends on libappindicator3-1, which bookworm dropped in favour of libayatana-appindicator3-1, so apt refuses it. Use the AppImage.

All three bundle their own Node runtime and the dashboard. The AppImage additionally carries GTK3, WebKitGTK and appindicator, which is why it is ~120MB and installs nowhere; the .deb and .rpm link the distro's webkit2gtk-4.1, gtk3 and appindicator instead, at ~55MB. Tested on Arch + KDE Plasma; on GNOME the tray icon requires the AppIndicator extension, and clicking the tray icon opens the menu rather than the window (a libayatana-appindicator limitation).

An Arch PKGBUILD for a local pacman install lives in TokenTrackerLinux/packaging/arch/tokentracker-linux — see TokenTrackerLinux/README.md. It is not published to the AUR.


✨ Features

  • 🔌 47 AI tools out of the box — Claude Code, Codex CLI, AStudio, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenSquilla, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, WorkBuddy AI, Grok Build, oh-my-pi, OmO, pi, Dots, Prime Agent, Craft Agents, Reasonix, Muse Code, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, DuMate, ZCode, Qoder, AnythingLLM Desktop, Claude Science, DeepSeek Harness, TRAE Work CN, LM Studio, Unsloth Studio, Devin CLI, Cline, MiniMax Code, Command Code, TRAE
  • 🏠 Local-first — Runs on your machine. Parses logs locally with no account or API keys needed.
  • 🚀 Zero config — Hooks auto-install on first run. From zero to dashboard in 30 seconds.
  • 📊 Beautiful dashboard — Usage trends, cost breakdowns by model, GitHub-style activity heatmap, project attribution
  • 🖥️ Native desktop app — macOS menu bar (+ widgets) and Windows system tray, each with an embedded server and the dashboard in a native webview
  • 🐾 Desktop pet — A pixel companion powered by real coding activity: it works when you work, celebrates streaks, and sleeps when you rest
  • 🎨 4 desktop widgets — Pin Usage / Activity Heatmap / Top Models / Usage Limits to your desktop
  • 🏆 15 achievement tracks — Turn daily usage, streaks, tools, models, and milestones into collectible badges worth sharing
  • 📈 Real-time usage limits — Claude / Codex / Cursor / Gemini / Kimi / Kiro / Grok / Copilot / Antigravity / ZCode / OpenCode

📈 近 7 天 Star 趋势

每日新增 Star(柱)与累计 Star(线)· 数据来自 GitHub

🏆 排名变化趋势

在各榜单中的排名历史(数字越小越靠前)

📋 历史上榜记录

每次快照的详细数据
日期 榜单 排名 周期新增 总 STAR