token-monitor  by Javis603

AI token and cost monitor with multi-device sync

Created 1 month ago
609 stars

Top 53.1% on SourcePulse

GitHubView on GitHub
Project Summary

A desktop widget addresses the challenge of fragmented AI token, cost, and limit tracking across multiple coding tools and devices. It provides a unified, real-time dashboard for developers and power users, offering immediate visibility into AI resource consumption and syncs data across machines, enhancing workflow efficiency and cost awareness.

How It Works

The project utilizes an Electron-based desktop widget that parses local AI tool logs via the tokscale library for token usage and limit data. In its default local mode, it directly reads from device-specific configuration paths. For multi-device synchronization, agents on each machine send aggregated summary updates to a chosen hub backend (self-hosted Node.js process, Cloudflare Worker, or even within another widget instance). Connected widgets then receive these updates near-instantly via Server-Sent Events, ensuring a consistent view across all synchronized devices while maintaining a local-first privacy stance.

Quick Start & Requirements

  • Primary install / run command: npm install followed by npm start for source execution. Desktop installers are available from the releases page.
  • Non-default prerequisites and dependencies: Node.js 18.17+ is required. For multi-device sync, network reachability between agents/widgets and the hub is necessary. Official installers are provided for macOS and Windows; Linux and Intel Macs require running from source.
  • Links: Releases page (for installers), worker/README.md (iOS widget recipe), docs/API.md (hub API).

Highlighted Details

  • Real-time multi-device synchronization using Server-Sent Events.
  • Supports a broad range of AI tools including Claude Code, Codex, Hermes Agent, GitHub Copilot CLI, and more.
  • Detailed usage breakdowns by tool, device, model, or session, alongside cost tracking.
  • Optional opt-in Usage Trends & Dashboard featuring a GitHub-style activity heatmap and historical charts.
  • Privacy-focused design transmitting only summary data, with multiple self-hosted sync backend options.

Maintenance & Community

The project is maintained by Javis603. No specific community channels (like Discord/Slack) or details on contributors, sponsorships, or partnerships are mentioned in the README.

Licensing & Compatibility

  • License type: MIT.
  • Compatibility notes: The permissive MIT license generally allows for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Official installers for macOS and Windows are unsigned, necessitating manual first-launch unlock steps. Linux and Intel Mac users must build from source or run directly via npm start as dedicated packaging targets are unavailable. Detection of usage within WSL is periodic, refreshing approximately every five minutes.

Health Check
Last Commit

19 hours ago

Responsiveness

Inactive

Pull Requests (30d)
57
Issues (30d)
43
Star History
445 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.