macOS Menu Bar System Monitor
AIUsageMonitor is a lightweight macOS menu bar system monitor that displays real-time laptop temperature, CPU usage, AI service usage (DeepSeek / Tavily / MiniMax / OpenRouter / Command Code / OpenCode GO), and Hindsight memory stats. Supports auto-refresh and manual refresh.
The Hindsight dashboard requires two backend services to be running:
The core memory engine. Install and run via pip:
pip install hindsight-api -U
hindsight-api --port 9077API keys and LLM provider are configured via environment variables. See the Hindsight documentation for details.
The official web UI for browsing memory banks, searching memories, and managing configuration. Requires Node.js 18+.
# Install globally (one-time)
npm install -g @vectorize-io/hindsight-control-plane
# Run (pointing to your local API)
hindsight-control-plane --api-url http://localhost:9077The Control Plane starts on port 9999 by default. AIUsageMonitor's native dashboard window loads this URL automatically.
For auto-start on login, both services can be managed via launchd. See
scripts/for example plist files.
Download the latest release from GitHub Releases:
AIUsageMonitor.dmg— Universal macOS installer
After installation:
- Mount the DMG and drag
AIUsageMonitor.appto Applications - Launch AIUsageMonitor
- Click the menu bar icon to view data
- Configure API keys & workspace URL in Settings
⚠️ If Gatekeeper blocks the app, right-click → Open or allow it in System Settings > Privacy & Security.
- 🌡️ Temperature Monitor — Real-time battery temp, CPU usage & thermal state
- 🐋 DeepSeek Balance — Check total, granted & topped-up balance
- 🔍 Tavily Usage — Monthly quota, used & remaining credits
- 🌐 OpenRouter Usage — Account balance (total/used/remaining) + today's spend via the Analytics API. Requires a Management Key
- ✨ MiniMax Token Plan — China subscription usage (5h + weekly windows per model family, with countdown reset)
- 🔄 OpenCode GO — RPC usage % with WKWebView login & browser fallback
- 🧠 Hindsight Dashboard — Opens native Hindsight Control Plane (port 9999) with official web UI for memory banks, recall, and entity exploration
- 🌐 Network Speed — Real-time ↓↑ network speed, 3s refresh
- 🟢 Health Indicator — Color-coded: default/orange/red for health status
- 🔒 Secure Storage — API keys stored in macOS Keychain
- ⏱️ Auto Refresh — Configurable refresh interval (1-30 min)
- 👁️ Show/Hide Cards — Toggle each module's visibility in settings
- ⚙️ Settings Panel — Visual config for API keys, workspace & refresh
- Balance via
https://api.deepseek.com/user/balance - Daily usage via WebView scraper from
https://platform.deepseek.com/usage
- Usage via
https://api.tavily.com/usage - Shows plan type, monthly limit, used & remaining credits
- Usage via RPC + WKWebView scraping
- Supports WKWebView embedded login (GitHub / Google OAuth)
- System browser login as fallback
- Manual confirmation button on login failure
- Balance via
https://openrouter.ai/api/v1/credits(requires a Management Key) - Today's spend via
POST https://openrouter.ai/api/v1/analytics/query(beta Analytics API, grouped by day, UTC-aligned)
This build uses ad-hoc signing. Gatekeeper blocks it. Run in terminal:
xattr -dr com.apple.quarantine /Applications/AIUsageMonitor.appClick the menu bar icon → Settings → Paste API Key → Save.
Requires macOS 14+, Xcode 15+.
git clone git@github.com:zdx52/AIUsageMonitor.git
cd AIUsageMonitor
swift build -c release
cp -r .build/release/AIUsageMonitor AIUsageMonitor.app/Contents/MacOS/- 🐐 Command Code usage card — New menu bar card showing GOAT (or Pro/Max) subscription usage: monthly credit remaining vs. $70 cap with progress bar, 5-hour and weekly rolling window meters with reset countdowns, and current billing period total cost / request count / tokens. Uses the same API key as the CLI (internal
/alpha/*endpoints: whoami, billing/credits, billing/subscriptions, usage/summary) - 🎛️ Settings — Added "Command Code 用量" toggle + API Key input
- 🌐 OpenRouter Usage card (re-added) — Menu bar card showing account balance (total credits / used / remaining) from the
/api/v1/creditsendpoint, plus today's spend from the beta Analytics API (/api/v1/analytics/query), grouped by day. Requires an OpenRouter Management Key in Settings - 🎛️ Settings — Added "OpenRouter 用量" toggle + Management Key input
- ✨ MiniMax Token Plan card — New menu bar card showing China subscription usage per model family (general / video): 5h rolling window + weekly window with progress bars (used %) and "重置于 X 小时之后" reset countdowns. Requires subscription Key (eyJ...) in Settings, separate from the pay-as-you-go API Key
- 🎛️ Settings — Added "MiniMax Token Plan" + "show video model" toggles
- 🗑️ Removed OpenRouter — Card, service, settings panel and toggle all removed (unused dead code)
- 📖 Novel Writing Web UI integrated — New "小说" (Novel) button next to the dashboard launches the built-in Flask web UI (port 8080) in a native window; the web/ app is now maintained in this repo
- 🚀 Auto service startup — Clicking the button detects and starts the novel web service (web/.venv) automatically; cleaned up on app exit
- 🎨 UI polish — Gradient book covers (real cover images from 封面/ take priority), overview hero with SVG word-count chart (hover details) + quality summary, character avatar cards, world/outline/tracking card layouts, pill badges, macOS glassmorphism, evenly spaced menu bar buttons
- 🧹 Cleaner status bar — Removed CPU usage percentage from menu bar title, keeping temperature + network speed only
- 🧠 Hindsight native dashboard — Replaced embedded web proxy with native Hindsight Control Plane (port 9999)
- 🗑️ Cleanup — Removed old hindsight-server.py and hindsight-dashboard.html resources
- 📋 Prerequisites documented — Added setup guide for Hindsight API + Control Plane services
- 🧹 Simplify mental model page — Removed category filters, only show "全部" (All) view
- 🐛 Minor fixes — Streamlined mental model list UI