Skip to content

sinarest1608/Claudometer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claudometer

A macOS menu bar app that tracks your Claude Code token usage in real time — daily consumption, weekly totals, and reset countdowns, all read from Claude's local logs. No API calls, no login required.

Claudometer dark mode    Claudometer light mode

Features

  • Daily & weekly usage — mirrors the two limits shown in Claude's Plan usage limits UI
  • Accurate reset countdowns — daily resets at midnight, weekly resets at your account's fixed day/time
  • Today's token breakdown — input, output, and cache tokens at a glance
  • Reads local logs only — parses JSONL files written by Claude Code CLI and the Xcode extension
  • Optional % tracking — calibrate once from Claude's UI to unlock accurate progress bars
  • Auto-refreshes every 30 seconds

Note: Only Claude Code usage (CLI + Xcode extension) is tracked. Tokens used on claude.ai or Claude Desktop (web) are not stored locally and cannot be read by this app.

Requirements

  • macOS 14 Sonoma or later
  • Xcode 15+
  • Claude Code CLI or the Claude Xcode extension installed and actively used

Build & Run

  1. Clone the repo:

    git clone https://github.com/sinarest1608/Claudometer.git
    cd Claudometer
  2. Open in Xcode:

    open Claudometer.xcodeproj
  3. In Signing & Capabilities, select your team (a free Apple ID works for local builds).

  4. Hit Run (⌘R). The app appears in your menu bar.

Note: App Sandbox is intentionally disabled so the app can read Claude's log files from ~/.claude/ and ~/Library/Developer/Xcode/CodingAssistant/. This is required for the app to function.

One-time Calibration (optional)

By default, Claudometer shows raw token counts and reset times — always accurate. To also show percentage bars matching Claude's UI:

  1. Open Claude and note the % shown under Plan usage limits
  2. In Claudometer, click the gear icon (⚙)
  3. Enter your Daily % and Weekly %
  4. Set your weekly reset time (find it in Claude → Settings → Usage — e.g. Thursday 02:00)
  5. Hit Apply

Limits and reset time are saved permanently and never need to be entered again.

How It Works

Claude Code stores every conversation's token usage as JSONL files on disk:

  • CLI: ~/.claude/projects/<project>/<session>.jsonl
  • Xcode extension: ~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/projects/

Claudometer scans both, sums tokens within two windows — today (midnight → midnight) and this week (from your configured reset time) — and shows the reset countdowns. No data ever leaves your machine.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages