Skip to content

agileandy/claude-mon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Monitor

Live gauge Burn rate Forecast

A macOS menu-bar app that monitors Claude Code usage — live rate-limit gauge, per-block burn rate, weekly forecasts, proactive notifications, and per-project attribution.

It reads Claude Code's local journal files under ~/.claude/projects/ and the live statusline rate-limit data; nothing is sent off-device.

Features

  • Live rate-limit gauge driven by Claude Code's statusline data (5-hour and 7-day windows).
  • Burn-rate estimator with confidence tier (low/medium/high) using windowed median over per-minute buckets.
  • Weekly forecast projecting cost and tokens to end-of-week.
  • Proactive alerts at 75 / 90 / 100 % thresholds, 5-minute spike detection, and a daily 18:00 digest.
  • Per-project attribution — Projects tab with sparkline + week-on-week delta; tap to filter Now/History.
  • Pure-function core, fully testable: BurnRateEstimator, AlertCenter.evaluate, WeeklyForecast.compute, ProjectName.decode.

Requirements

  • macOS 14 (Sonoma) or later.
  • Swift toolchain 6.0+ (Xcode 16, or Apple Command-Line Tools — see test note below).
  • Claude Code already in use locally so that ~/.claude/projects/ exists.

Build

swift build --product ClaudeMon -c release

To run as a real .app (required for notifications, since UNUserNotificationCenter needs a Bundle.main.bundleIdentifier):

scripts/make-app.sh release
open .build/ClaudeMon.app

Test

The test target is an executable harness, not an XCTest target — this lets the suite run on machines that have only Apple Command-Line Tools installed (XCTest/swift-testing aren't resolvable there).

swift run ClaudeMonTests

When Xcode is installed, the harness can be switched to a .testTarget in Package.swift.

Project layout

Sources/
  ClaudeMon/         thin executable — menu-bar entry point
  ClaudeMonKit/      library — Models, Services, Views
Tests/
  ClaudeMonTests/    Runner-based suite + Fixtures/
scripts/
  make-app.sh        wraps the swift binary into a .app bundle

License

MIT — see LICENSE.

About

macOS menu-bar app monitoring Claude Code usage — live rate-limit gauge, burn-rate, weekly forecast, proactive alerts, per-project attribution

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors