A macOS menu bar widget that checks your OpenCode Go usage and stores the API key in the system Keychain.
- Download
OpenCodeGoWidget-<version>-universal.zipfrom the latest GitHub release. - Unzip it and drag
OpenCode Go Widget.appinto/Applications(or anywhere you like). - Right-click the app and choose
Openthe first time to confirm you trust it (Gatekeeper). - Open the menu bar icon, choose
Settings(inside the popover), and paste your OpenCode Go API key.
The widget runs only in the menu bar; it has no Dock icon.
- Quit the app from the menu bar.
- Delete
OpenCode Go Widget.app. - Remove the API key: open Keychain Access, search for
com.manatel.opencode-go-widget, and delete theapi-keyitem. - Optionally clear preferences and history:
defaults delete com.manatel.opencode-go-widget
- macOS 13 or later
- Xcode 15 or later
swift runOn first launch, open Settings inside the menu bar popover and enter your API key. Command-, also opens the Settings window. The app queries the endpoint every 15 minutes and also supports manual refresh.
Settings open inside the menu bar popover so the widget stays visible. Command-, still opens a separate Settings window.
- Refresh interval: choose between 5, 15, 30 and 60 minutes.
- Menu bar metric: pick which usage window (rolling, weekly or monthly) shows in the menu bar and in the history chart.
- Usage notifications: opt in to get notified when monthly usage crosses 70%, 85% or 90%. Notifications fire only when a threshold is crossed, not on every refresh.
- Delete API key: remove the stored key and local usage history from the Keychain and preferences.
swift testTests are deterministic and run without internet access: HTTP responses are mocked with a custom URLProtocol, and the Keychain is injected as a mock.
swift build -c release --arch arm64 --arch x86_64The universal binary is written to .build/apple/Products/Release/OpenCodeGoWidget (Apple Silicon and Intel).
To create an app you can open from Finder:
chmod +x scripts/build-app.sh
./scripts/build-app.sh
open "dist/OpenCode Go Widget.app"The API key is never written to project files or logs. It is stored using Keychain Services under service com.manatel.opencode-go-widget and account api-key. Local usage history only stores percentages and timestamps — never the API key or raw API responses — and is removed when the API key is deleted.
See docs/OPENCODE-GO-API.md for the endpoint contract the widget relies on.
See CONTRIBUTING.md and SECURITY.md before contributing. The roadmap is in docs/ROADMAP.md.
See docs/ROADMAP.md for future improvements and the open source release plan.