Open-router Insight is a native macOS menu bar app that monitors your OpenRouter credit balance and usage in real time. It is built for developers who want fast visibility into spend, key activity, and usage trends without opening the OpenRouter dashboard.
- Lives in the macOS menu bar for quick access
- Shows remaining credits, total usage, and key-level spend
- Includes activity charts, model concentration insights, and rankings
- Supports anomaly and low-credit notifications
- Offers one-command local build and install
More screenshots are available in screenshots/.
- macOS 15.4+
- Xcode 16+
- An OpenRouter API key
git clone https://github.com/anhdd-kuro/OpenRouterCreditMenuBar.git
cd OpenRouterCreditMenuBar
./scripts/build.sh --installThen open Open-router Insight from /Applications.
Build from the repository root:
xcodebuild -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -configuration Debug buildRelease build:
xcodebuild -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -configuration Release buildBuild and install helper:
./scripts/build.sh --installRun all tests:
xcodebuild test -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -destination "platform=macOS"Run only unit tests:
xcodebuild test -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -destination "platform=macOS" -only-testing:"OpenRouterCreditMenuBarTests"Run only UI tests:
xcodebuild test -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -destination "platform=macOS" -only-testing:"OpenRouterCreditMenuBarUITests"Run a single test:
# Swift Testing
xcodebuild test -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -destination "platform=macOS" -only-testing:"OpenRouterCreditMenuBarTests/OpenRouterCreditMenuBarTests/example()"
# XCTest UI
xcodebuild test -project "OpenRouterCreditMenuBar.xcodeproj" -scheme "OpenRouterCreditMenuBar" -destination "platform=macOS" -only-testing:"OpenRouterCreditMenuBarUITests/OpenRouterCreditMenuBarUITests/testExample"In Settings, you can configure:
- OpenRouter API key
- Refresh interval
- Launch at login
- Warning threshold alerts and key anomaly alerts
The app stores lightweight preferences in UserDefaults.
OpenRouterCreditManagerhandles API calls, cached activity data, and app stateMenuBarViewrenders current credit, usage views, charts, and ranking sectionsActivityChartsViewrenders spend/request/token charts with hover tooltipsSettingsViewmanages app preferences and connection checksAppLoggerwrites runtime events to log files for debugging
- API calls use bearer authentication to OpenRouter endpoints
- Sensitive values such as API keys should not be logged
- Notifications are local macOS notifications only
- Create a branch from
main - Make focused changes
- Run build and relevant tests
- Open a pull request with clear context
See AGENTS.md for repository-specific commands and coding conventions used by coding agents.
This project is licensed under the MIT License. See LICENSE for details.
