No description
- QML 70%
- Python 30%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Panel: overlay percentage on each limit bar (replace the separate right-aligned text); fix fill radius reference to the parent Item - Add OpenCode Zen balance (from the workspace page, /workspace/<id>) shown at the bottom of the panel - Move the fetcher out of inline QML Python (which had escaping/syntax issues and was silently failing) into opencode-go/fetch_usage.py; the widget now calls python3 fetch_usage.py which writes both Go usage and Zen balance to usage.json - README: document new features and file layout |
||
| opencode-go | ||
| .gitignore | ||
| config-template.json | ||
| fetch_usage.py | ||
| LICENSE | ||
| README.md | ||
| SKILL.md | ||
OpenCode Omarchy Plugin
Omarchy bar widget showing OpenCode Go subscription usage (5-hour rolling, Weekly, Monthly) in the status bar — click for a panel with percentage bars, reset timers, and your remaining OpenCode Zen balance.
Install
# On your desktop machine (where Omarchy runs)
git clone ssh://git@forgejo.vosjes.cloud/yarrith/Opencode-Omarchy-Plugin.git
cd Opencode-Omarchy-Plugin
# Install the plugin (one of these)
omarchy plugin add . --enable
# or manually:
mkdir -p ~/.config/omarchy/plugins/yarrith.opencode-usage
cp -r opencode-go/* ~/.config/omarchy/plugins/yarrith.opencode-usage/
omarchy-shell shell rescanPlugins
omarchy plugin enable yarrith.opencode-usage
Restart Omarchy or run omarchy-shell shell rescanPlugins.
Credentials
The widget reads from (in priority order):
~/.config/opencode-omarchy/opencode-usage.json{ "workspace_id": "YOUR_ID", "auth_token": "YOUR_TOKEN" }~/.config/opencode-usage-gui/session.db(credentials from the GUI app)
How to Get Credentials
- Open
https://opencode.ai→ sign in - Navigate to
https://opencode.ai/workspace/<your-id>/go - DevTools (F12) → Application → Cookies →
opencode.ai→ copyauthcookie value
What it Shows
| Period | Bar chip | Colors |
|---|---|---|
| 5-hour | 5h 67% |
Green < 60%, orange 60–90%, red ≥ 90% |
| Weekly | Wee 45% |
(same thresholds) |
| Monthly | Mon 12% |
(same thresholds) |
Click the chip → panel with per-limit percentage bars, reset timers, and your OpenCode Zen balance at the bottom. Press R to refresh.
Settings
After install, configure in Omarchy → Setup → Plugins → OpenCode Go Usage:
- Refresh interval — how often to re-fetch (default 5 min)
- Workspace ID / Auth token — override the config file
Dependencies
requestsPython library (for fetching):pip install requests # or uv pip install requests
Files
opencode-go/
├── manifest.json # Omarchy plugin manifest
├── BarWidget.qml # Bar widget (bar button + panel loader)
├── Panel.qml # Popup panel (percentage bars, reset timers, Zen balance)
├── OpenCodeIcon.qml # Monochrome bar icon
└── fetch_usage.py # Fetcher: Go usage + Zen balance → ~/.local/state/omarchy/opencode-go/usage.json
fetch_usage.py # Standalone CLI fetcher (optional)