Session / weekly / Opus limits Β· token spend Β· cost estimates Β· per-session history β all read from local logs, refreshed on a timer, living quietly in your menu bar.
- What's left, at a glance. Mirrors Claude's
/usageview β three meters for Session (5h), Week Β· all models, and Week Β· Opus, each with real usage and a live reset countdown. - Real token data. Exact per-request token counts parsed straight from Claude Code's session logs β input, output, and cache read/write.
- Cost estimates per model (Opus / Sonnet / Haiku) from standard-tier pricing.
- 7-day spark chart + all-time model breakdown + recent-session history.
- Live vendor data (optional). Add a GLM Coding Plan or Anthropic admin API key β stored encrypted, machine-bound β for real GLM 5h/weekly quota and org-level Anthropic cost.
- Always current. A Rust timer re-scans and pushes fresh data to the UI β auto-refresh interval is configurable in Settings (default 30s), applied live without a restart. No frozen snapshots.
- Stays out of the way. Menubar-only (
LSUIElement), click-to-toggle dropdown, single-instance, launch-at-login. - Self-updating. Signed auto-updates via the Tauri updater β an in-app "Update & restart" banner appears when a newer build ships.
A thin React frontend that only renders, and a rich Rust backend that does all the work.
ββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
β React frontend (src/) β β Rust backend (src-tauri/src/) β
β β β β
β useUsage / useTauriCommand βββββββββΆβ commands/ invoke handlers β
β Meter Β· WeekChart Β· Settings β invoke β scanner/ log aggregation β
β β + eventβ vendors/ z.ai + Anthropic clients β
β renders the snapshot βββββββββΆβ encryption/ AES-256-GCM key vault β
β β usage- β settings/ Β· state/ Β· storage/ β
β β updatedβ tray.rs menubar dropdown β
ββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
β² timer (cfg) β² on-demand refresh
β β
~/.claude/projects/**/*.jsonl Β· ~/.zai/zai-mcp-*.log
The backend scans logs (off-thread via spawn_blocking), optionally fetches live vendor data, merges one UsageSnapshot, and emits usage-updated to the UI.
| Metric | Source | Real? |
|---|---|---|
| Claude token usage (session/week/model) | ~/.claude/projects/**/*.jsonl |
β exact |
| Claude cost | derived from per-model pricing | β estimated |
| Reset countdowns | computed from log timestamps | β real |
| "% left" ceilings | editable plan tier (Pro / Max 5Γ / Max 20Γ) | β estimated* |
| GLM token/cost (local) | ~/.zai/*.log β lifecycle only |
β shown as β |
| GLM 5h/weekly quota (with key) | z.ai monitor API (/api/monitor/usage/quota/limit) |
β real |
| Anthropic cost (with admin key) | Anthropic Admin Cost API | β real (org-level) |
| Copilot premium-request quota | GitHub copilot_internal/user (your editor / gh token) |
β real (per-user) |
* The Pro/Max subscription "weekly % left" has no public API, so ceilings are estimates you set by picking your plan. The Anthropic admin key reports org-level cost, not the subscription quota.
npm install
npm run tauri dev # develop
npm run tauri build # bundle an unsigned .app + .dmg (local testing)Heads-up: if your shell sets
NODE_ENV=production, install withNODE_ENV=development npm install --include=devso the dev toolchain is included.
For a .dmg that installs cleanly on any Mac (no Gatekeeper warnings), it
must be signed with a Developer ID cert and notarized by Apple:
cp .env.example .env # fill in your signing identity + notarization creds
./scripts/release-mac.shSee docs/RELEASE.md for the full runbook (certificates, notarization credentials, verification, universal builds, troubleshooting).
- Auto-refresh interval β choose 10s / 15s / 30s / 1m / 2m / 5m in Settings (default 30s); takes effect on the next cycle.
- Plan tier β pick Pro / Max 5Γ / Max 20Γ from the header dropdown; it sets the limit ceilings and persists.
- API keys (Settings tab) β optional z.ai and Anthropic admin (
sk-ant-adminβ¦) keys for live vendor data. - z.ai endpoint β editable; confirm it against your account's billing API.
API keys are encrypted with AES-256-GCM using an Argon2id-derived key whose password is this machine's UID β so a settings.json copied elsewhere can't be decrypted. Keys never leave Rust in plaintext and are never exposed to the frontend (which only sees β¦KeySet booleans).
agent-status/
βββ src/ # React frontend (thin)
β βββ hooks/ # useTauriCommand, useUsage
β βββ components/ # Meter, WeekChart, VendorCard, Settings
β βββ styles/app.css
βββ src-tauri/ # Rust backend (rich)
βββ src/
βββ commands/ # invoke handlers (collect = scan + vendor)
βββ scanner/ # log β UsageSnapshot aggregation
βββ vendors/ # z.ai + Anthropic API clients
βββ encryption/ # at-rest key vault
βββ settings/ state/ storage/
βββ tray.rs # menubar icon + dropdown
cd src-tauri && cargo test --all # 12 tests: scanner, encryption, vendor parsersCI runs the suite on macOS / Windows / Ubuntu (.github/workflows/unit-tests.yml).
- Icon lives at
src-tauri/icons/icon.svgβicon.png; re-runnpx @tauri-apps/cli icon src-tauri/icons/icon.pngafter editing to regenerate every size. - Bundle identifier is
com.dennisrongo.agentstatusβ change insrc-tauri/tauri.conf.jsonif distributing under a different org. - Signing, notarization & auto-updates for distribution β see docs/RELEASE.md.
- Live vendor endpoints are best-effort and unverified offline β confirm against your accounts on first run.


