DEV.co
Open-Source Observability · mm7894215

TokenTracker

TokenTracker is a local-first, zero-config CLI and desktop app that automatically collects and visualizes token usage across 25 AI coding tools (Claude Code, Cursor, Copilot, Gemini, Kimi, Grok, and others). It runs entirely on your machine with no account or API keys required, displaying costs, trends, and usage breakdowns in a web dashboard and native menu bar/system tray apps.

Source: GitHub — github.com/mm7894215/TokenTracker
941
GitHub stars
91
Forks
JavaScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorymm7894215/TokenTracker
Ownermm7894215
Primary languageJavaScript
LicenseMIT — OSI-approved
Stars941
Forks91
Open issues16
Latest releasev0.74.0 (2026-07-08)
Last updated2026-07-08
Sourcehttps://github.com/mm7894215/TokenTracker

What TokenTracker is

Node.js-based tool that installs hooks into supported AI tools' log/cache directories to extract token counts and cost data. Aggregates metrics locally into a SQLite database, serves a React/Vue dashboard on localhost:7680, and offers native macOS (Electron menu bar) and Windows (WebView2 system tray) wrappers. Optional cloud sync merges usage across devices; optional leaderboard and skills manager require opt-in sign-in.

Quickstart

Get the TokenTracker source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/mm7894215/TokenTracker.gitcd TokenTracker# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Multi-tool AI spend visibility for engineering teams

Organizations using multiple AI coding assistants can centralize token tracking without vendor dashboards or cloud overhead. Useful for cost attribution across projects and teams.

Privacy-respecting local cost monitoring

Shops that cannot send telemetry to third-party SaaS can track AI usage (token counts only, no prompts/responses) entirely offline on each developer's machine.

Developer workflow integration and rate-limit awareness

Individual developers and small teams benefit from one-click dashboard setup, real-time rate-limit tracking (Claude, Cursor, Copilot quotas), and desktop widgets pinned to the taskbar.

Implementation considerations

  • Node.js 20+ is a hard requirement. Verify all developers have it installed; CLI runs on macOS, Linux, and Windows; native apps (menu bar, system tray) are platform-specific.
  • First run auto-detects and installs hooks into tool cache/config directories (e.g., ~/.cursor, ~/.config/copilot). Verify those paths exist and are not locked by MDM or endpoint security before rollout.
  • SQLite database is stored locally (location varies by OS); no automatic cloud backup unless user opts in. Teams should document where data is stored and any local backup strategy.
  • Cost pricing uses LiteLLM's model database (auto-refreshed daily if online) plus curated overrides. Offline snapshot is bundled, but custom model pricing requires manual entry or forking.
  • Optional features (leaderboard, cloud sync, skills manager) require GitHub/OAuth sign-in and network access. Fully offline users should disable these to avoid confusion or errors.

When to avoid it — and what to weigh

  • Centralized, enterprise-scale AI governance required — This tool is local-first by design. Enterprise customers needing audit logs, role-based access, or centralized policy enforcement should evaluate dedicated AI Ops platforms (e.g., LiteLLM proxy, Helicone, Langsmith).
  • Strict air-gapped or non-Node.js environments — TokenTracker requires Node.js 20+ and uses system-level hooks to read tool logs/caches. Fully air-gapped systems or non-Node projects (Rust, Go, Java teams) will find it difficult to deploy.
  • Real-time API billing integration with vendor accounts — TokenTracker infers costs locally; it does not integrate directly with OpenAI, Anthropic, Google billing APIs. For live account-level spend synced from vendor dashboards, consider vendor-native solutions.
  • Windows system tray app on non-admin user accounts — The Windows installer is per-user (no admin required), but some enterprise locked-down workstations may block WebView2 or system tray integration. CLI remains usable; desktop app may fail.

License & commercial use

MIT License (permissive OSI-approved). Allows commercial use, modification, and redistribution with attribution and no liability. No copyleft obligations.

MIT License permits commercial use without restriction. However, integration with proprietary AI tools and usage of cost data inferred from third-party tool caches should be reviewed for compliance with those tools' terms of service. No explicit warranty is provided; use 'as-is' in production at your own risk.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

TokenTracker is local-first and collects only token counts and timestamps—never prompts, responses, or file contents. Hook installation reads cache/log files from installed tools; verify those directories are protected by OS/file-level permissions. Optional cloud sync and leaderboard require GitHub OAuth; review privacy policy for any cloud-sync use. No mention of security audit or vulnerability disclosure policy in README; for production use, consider requesting a security assessment or review GitHub issues for known CVEs.

Alternatives to consider

LiteLLM Proxy / LangSmith

Centralized, language-agnostic AI usage tracking with direct API integration and audit logs. Better for enterprise governance; requires proxy setup and API-key management.

Helicone or Langfuse

Cloud-based AI observability platforms with real-time dashboards, cost tracking, and advanced analytics. Trade-off: data leaves your machine; suitable for SaaS teams not requiring full air-gap.

Vendor-native dashboards (OpenAI Platform, Anthropic Console, GitHub Copilot Dashboard)

Direct account-level billing and usage from vendors. No setup, but siloed by provider and requires manual aggregation. Suitable if using only one or two tools.

Software development agency

Build on TokenTracker with DEV.co software developers

Run `npx tokentracker-cli` to install hooks, sync data, and open a beautiful usage dashboard at localhost:7680. Local, private, free.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

TokenTracker FAQ

Does TokenTracker send my data to the cloud?
By default, no. All token counts and metrics stay on your machine in a local SQLite database. Optional features (leaderboard, cloud sync) are opt-in and require explicit sign-in. You can use the tool entirely offline with the bundled cost pricing snapshot.
Which AI tools are supported?
25 tools out of the box: Claude Code, Cursor, Copilot, Gemini CLI, Antigravity, Kiro, OpenCode, Kimi Code, Grok Build, Roo Code, Zed Agent, Goose, and others. Check the README feature table for the full list and detection method (hook vs. API vs. log parsing).
What happens if a tool updates or changes its log format?
TokenTracker's hooks may break. The maintainer updates detection methods as tools evolve (see active release cadence). Open issues or PRs on GitHub to report breakage. Community contributions are welcome.
Can I use this in a corporate/air-gapped environment?
Yes, if Node.js 20+ is available and tool caches are accessible. Cost pricing uses a bundled offline snapshot; no internet required. However, Windows system tray and macOS menu bar apps may not work under strict MDM. CLI remains functional.

Custom software development services

Adopting TokenTracker is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source observability software in production.

Start tracking your AI spend in 30 seconds

Run `npx tokentracker-cli` to install hooks, sync data, and open a beautiful usage dashboard at localhost:7680. Local, private, free.