ai-token-monitor  by soulduse

Monitor AI token usage and costs across multiple models

Created 3 months ago
269 stars

Top 95.3% on SourcePulse

GitHubView on GitHub
Project Summary

A system tray application for macOS and Windows, AI Token Monitor tracks real-time token usage and costs for AI models like Claude Code, Codex, and OpenCode. It targets developers and power users seeking to monitor AI expenses, offering analytics, a leaderboard for community comparison, and chat features to enhance productivity and provide insights into API consumption.

How It Works

The application parses session JSONL files from supported AI providers (Claude Code, Codex, OpenCode) to accurately track token usage, cost, and activity. It employs a React/Vite frontend for the user interface and a Rust/Tauri backend for file watching, data parsing, and system tray integration. Optional features like the leaderboard and chat leverage Supabase, while AI translation for chat messages can be enabled using user-provided API keys from Gemini, OpenAI, or Anthropic.

Quick Start & Requirements

  • Primary install / run command: Clone the repository, install Node.js dependencies, and run npm run tauri dev for development or npm run tauri build for a production build.
  • Non-default prerequisites and dependencies: Node.js 18+, Rust toolchain, Tauri CLI v2. Users must have Claude Code, Codex, or OpenCode installed and used at least once.
  • Links: GitHub repository: https://github.com/soulduse/ai-token-monitor.git

Highlighted Details

  • Real-time token tracking and cost visualization across multiple AI providers (Claude, Codex, OpenCode) with per-provider cost models.
  • Optional opt-in leaderboard and chat features for community comparison and interaction, utilizing GitHub OAuth.
  • AI translation for chat messages using user-provided Gemini, OpenAI, or Anthropic API keys, with keys encrypted locally.
  • Configurable webhook alerts for Discord, Slack, and Telegram based on usage thresholds or resets.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or dedicated community channels like Discord or Slack. The GitHub repository serves as the primary point for community interaction and project development.

Licensing & Compatibility

The project is licensed under the MIT license, which is permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

Linux support is currently untested, although it may function due to Tauri's cross-platform capabilities. Support for Intel Macs is noted as "coming soon." The leaderboard and chat features require opting into data sharing and involve network requests to Supabase.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
25
Issues (30d)
1
Star History
36 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.