Skip to content

A lightweight Windows tray app that shows live status for AI coding providers like Codex and Claude Code, plus token usage and spend.

License

Notifications You must be signed in to change notification settings

fmdz387/costats

Repository files navigation

costats costats icon

A lightweight Windows tray app that shows live status for AI coding providers like Codex and Claude Code, plus token usage and spend.

costats widget screenshot

What it shows

  • Session and weekly utilization with reset timers and pace indicators.
  • Daily tokens + cost and 30-day rolling tokens + cost.
  • Overage or credit balance when available.
  • One-tap tray widget and a global hotkey (Ctrl+Alt+U).

Install

One-step PowerShell (technical)

iwr -useb https://raw.githubusercontent.com/fmdz387/costats/master/scripts/install.ps1 | iex

Downloads the latest release, installs per-user and creates a Start Menu shortcut.

From source: see Build below.

Usage

  • Click the tray icon to open the widget.
  • Press Ctrl+Alt+U to toggle the widget (configurable).
  • Open Settings to set refresh interval or start at login.

Configuration

Settings are stored at: %LOCALAPPDATA%\costats\settings.json

Common settings:

  • RefreshMinutes (default 5)
  • Hotkey (default Ctrl+Alt+U)
  • StartAtLogin (true/false)

Optional environment variable:

  • CODEX_HOME to point to a custom Codex config/logs directory.

Data sources

  • Codex usage: OAuth usage endpoint via ~/.codex/auth.json (or CODEX_HOME), with local logs as a fallback for estimates.
  • Claude usage: OAuth usage endpoint via ~/.claude/.credentials.json, with local logs as a fallback for estimates.
  • Token + cost estimates: local JSONL logs from ~/.codex/sessions and ~/.claude/projects.

Security & privacy

  • Reads local auth and log files on your machine.
  • Sends requests only to provider APIs to fetch usage data; no third-party telemetry.

Performance

  • Background polling at a fixed interval (default 5 minutes).
  • Single-instance, tray-first UI designed to stay lightweight.

Build

Requires a .NET SDK that supports net10.0-windows.

# Build
dotnet build .\costats.sln -c Release

# Publish portable single-file binaries (x64 + arm64)
.\scripts\publish.ps1

About

A lightweight Windows tray app that shows live status for AI coding providers like Codex and Claude Code, plus token usage and spend.

Resources

License

Stars

Watchers

Forks