Skip to content

catokolas/ModelsUsage

Repository files navigation

Models Usage

A native macOS app that tracks AI coding-tool token usage across three sources:

  • KIX — usage pulled from a KIX Models Manager HTTP API.
  • Claude Code — parsed from local session logs in ~/.claude/projects.
  • Codex — parsed from local rollout logs in ~/.codex/sessions.

It shows a dashboard window (Summary plus a tab per source, with day/month/year tables and totals) and a menu-bar item for a quick glance. Live cards show your current usage windows: Claude's rolling 5-hour block, Codex's current window, and KIX's "today so far".

Summary tab — live KIX, Claude Code, and Codex usage-window cards above a per-source, per-model table with Today / This Week / This Month / This Year totals

Claude Code tab — the live 5-hour window, token stat cards (requests, input, output, cached, reasoning), a Top Models table, and a per-day series

Install

Homebrew

brew install --cask catokolas/tap/modelsusage

If Homebrew refuses with "unavailable" or "untrusted tap" (when HOMEBREW_REQUIRE_TAP_TRUST is set), trust the tap once, then install:

brew trust catokolas/tap
brew install --cask catokolas/tap/modelsusage

Trust is per-machine (stored in ~/.homebrew/trust.json), so each new Mac needs it once. It covers every cask in the tap.

Upgrades come through Homebrew the usual way: brew upgrade --cask modelsusage.

The build is ad-hoc signed (no paid Apple Developer account), so the first launch needs a one-time Gatekeeper allow — see First launch.

Download the latest release

Grab ModelsUsage-x.y.z.zip from Releases, unzip it, and drag ModelsUsage.app into /Applications. Then follow First launch.

Build from source

See Build & run below (needs Xcode).

First launch

The build is ad-hoc signed, so macOS Gatekeeper flags it the first time.

  • macOS Sonoma (14) and earlier: right-click (or two-finger click) the app → Open, then click Open in the dialog. macOS remembers the choice.
  • macOS Sequoia (15) / Tahoe (26+): double-click, click Done, then System Settings → Privacy & Security → "Open Anyway".

Faster alternative that works on every version:

xattr -dr com.apple.quarantine /Applications/ModelsUsage.app
open /Applications/ModelsUsage.app

brew install --cask strips the quarantine flag for you, so the red "app is damaged" dialog generally doesn't appear via Homebrew.

Build & run

Requires Xcode (for the Swift toolchain and SwiftUI).

export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
swift build
swift test

# Or open in Xcode:
open Package.swift

# Produce a shareable .app (ad-hoc signed):
./tools/build-app.sh
open build/ModelsUsage.app

The first time you open an ad-hoc-signed build, right-click the app and choose Open to get past Gatekeeper.

Configuration

Open Settings in the app to set the KIX base URL / endpoint / Bearer token / key filter, the Claude and Codex quota estimates, and the number format. The bearer token is stored in the macOS Keychain; everything else lives in ~/Library/Application Support/ModelsUsage/settings.json.

Use the menu-bar Active sources submenu to toggle KIX / Claude Code / Codex — the selection controls which tabs and summary rows show.

Releasing

Cutting a release and maintaining the Homebrew cask is documented in Distribution.md.

License

MIT © Cato Kolås

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors