A unified Linux desktop companion and command-line utility for tracking your OpenCode Go subscription usage across Rolling (5h), Weekly, and Monthly quota windows β featuring native integrations for KDE Plasma 6, GNOME Shell (46β50), and any terminal via the opencode-usage CLI.
| Light Theme | Settings | Dark Theme |
|---|---|---|
![]() |
![]() |
![]() |
- π¨ Redesigned Brand Logo (
<Oβ¦>): Custom cyan-teal vector logo combining code brackets< >, central ringO, and glowing sparkβ¦, integrated seamlessly across panel icons, header containers, SVGs, and system theme icon sizes (16pxβ128px). - π§ Full GNOME Shell Extension:
- Pure monochrome symbolic icon (
opencodego-symbolic.svg) matching GNOME Shell top-bar indicators. - Full-color glowing brand header in popup card (
opencodego-brand.svg). - Sleek popup with progress bars, reset countdowns, and currency quota metrics ($ spent / $ limit).
- Instant in-popup Refresh button that updates figures live without dismissing the menu.
- Global keyboard shortcut (
<Super><Alt>o) to toggle the popup instantly from anywhere. - Libadwaita Preferences dialog with interactive Test Connection, step-by-step Session Cookie Guide, and EGO-compliant Privacy & Data Security controls.
- Flexible top-bar display modes: Weekly Limit (Default), 5-Hour Rolling Limit, Monthly Limit, All Three Limits with icons, or Icon Only.
- Multi-window quota alert notifications (Rolling, Weekly, Monthly) and Compact Mode toggle.
- Pure monochrome symbolic icon (
- π Real-Time Usage Tracking: Fetches live data from the OpenCode Console JSON API
opencode.ai/console/api/go/statusviacurl. Supports route-walk resilience, transient 5xx retry handling, and graceful stale-figures fallback. - β±οΈ Per-Window Reset Countdowns: Natural-language
(resets in 3 hours 45 minutes)countdowns for Rolling (5h), Weekly, and Monthly windows. - π Horizontal Progress Bars: Smooth rounded progress bars with responsive color accents (sky, cyan, teal) and automatic warning shifts (β₯75% orange, β₯90% red).
- π·οΈ Dynamic Panel Tray Badge: Real-time headline usage percentage badge directly in your desktop top bar or taskbar.
- π¨ 12 Developer Theme Presets (KDE): Catppuccin Mocha (default), Breeze Dark, Nord, Dracula, Solarized, Gruvbox, Tokyo Night, One Dark, plus 4 light themes with full color pickers.
- π» Global CLI Utility (
opencode-usage): Terminal client with formatted tables, JSON mode (--json), CSV export (--export), and interactive setup wizard (--interactive/-i). - π¦ Open Source: Full source, issue tracker, and releases on GitHub β linked with icons right from the widget's About page.
| Component | Minimum | Recommended |
|---|---|---|
| OS | Fedora 39+, Arch, Ubuntu 24.04+, openSUSE, Manjaro | Any modern Linux |
| KDE Plasma | Plasma 6.0+ (Qt 6.5+) | Plasma 6.5+ (Qt 6.7+) |
| GNOME Shell | GNOME Shell 46 | GNOME Shell 46β50 |
| Dependencies | curl, glib-compile-schemas |
Pre-installed on modern distros |
git clone https://github.com/Mayanktaker/OpencodeGo-KDE-GNOME.git
cd OpencodeGo-KDE-GNOME
./install.shThis automatically:
- Installs/upgrades the plasmoid to
~/.local/share/plasma/plasmoids/ - Registers custom icons in
~/.local/share/icons/hicolor/ - Purges QML caches and restarts
plasmashell - Links
opencode-usageCLI to~/.local/bin/ - Installs Bash tab completions
The same usage tracker also ships as a GNOME Shell panel extension (UUID com.mayanktaker.opencodego-usage, GNOME Shell 46β50):
bash gnome-extension/install.sh- Hover the panel icon to see Rolling (5h)/Weekly/Monthly usage; without credentials it shows demo data.
- The panel shows the weekly percentage next to the icon β orange at 75%, red at 90%. Switch it off in settings if you prefer icon only.
- The popup ends with Open OpenCode Console and Settingsβ¦ β both stay available even when your sign-in has expired.
- The panel now shows the O⦠logo on GNOME too, not just on KDE.
- Open the extension's preferences (
gnome-extensions prefs com.mayanktaker.opencodego-usage) and paste your Workspace ID + Auth Cookie to switch to live figures. Test checks your details without waiting for a refresh. - On Wayland, the first install needs a logout/login: a running shell never picks up a newly installed extension. The installer queues it so it comes up enabled automatically.
# 1. install (from a clone, or from the gnome-extension/ folder of a release bundle)
bash gnome-extension/install.sh
# 2. log out and back in β required on Wayland, there is no rescan
# 3. confirm it is running
gnome-extensions info com.mayanktaker.opencodego-usage | grep -E 'State|Enabled'
journalctl --user -b | grep -i opencodego # should be quiet
# 4. add your details
gnome-extensions prefs com.mayanktaker.opencodego-usageStep 1 copies the extension into ~/.local/share/gnome-shell/extensions/com.mayanktaker.opencodego-usage, compiles its gsettings schema, and queues it in dconf so it comes up enabled after the logout.
Getting the two values for step 4: open https://opencode.ai/console/<your-workspace>/go in the browser, then DevTools β Application β Cookies β opencode.ai β __Host-console_session for the cookie, and the wrk_β¦ in the address bar for the workspace id. Paste them in and press Test.
Updating later: re-run bash gnome-extension/install.sh and log out/in again β a running shell keeps the old code.
To remove it:
gnome-extensions disable com.mayanktaker.opencodego-usage # if the shell knows it
rm -rf ~/.local/share/gnome-shell/extensions/com.mayanktaker.opencodego-usage
dconf write /org/gnome/shell/enabled-extensions "['gnome-shell-extensions-appindicator@ubuntu.com']" # keep your other extensionsPrefer a ready-made bundle? Grab the latest .plasmoid package, GNOME extension zip, or the shareable .zip (includes the installer + CLI) from the GitHub Releases page. Install a downloaded .plasmoid with:
kpackagetool6 -t Plasma/Applet -i com.mayanktaker.opencodego-usage-v*.plasmoid- Open the OpenCode Console Go page:
https://opencode.ai/console/wrk_XXXXXXXX/go(sign in if prompted). Use the console β/usageis a separate cost dashboard, not the Go usage page. - Copy the workspace ID from the browser URL bar (it starts with
wrk_, e.g.wrk_01KE20AQRQ9QR7N15TWGJBE2V9;org_...ids work too). It is sent in thex-org-idheader on every request. - Press
F12β Application β Cookies βopencode.ai. - Copy the
__Host-console_sessioncookie value (a short opaque token, ~39 characters, e.g.st_...) β notauth. The old iron-sessionauth=Fe26.2**cookie no longer authenticates the console. - Right-click the widget β Configure β paste Workspace ID and the cookie value.
- Click Apply or OK.
# Display formatted usage stats
opencode-usage
# Interactive setup wizard to test and save credentials for KDE & GNOME
opencode-usage --interactive # or -i
# Output raw JSON
opencode-usage --json
# Export to CSV
opencode-usage --export /tmp/usage.csv
# Force demo mode
opencode-usage --demo
# Custom credentials
opencode-usage -w "wrk_01KE20AQRQ9QR7N15TWGJBE2V9" -c "__Host-console_session=st_..."OpencodeGo-KDE-GNOME/
βββ metadata.json
βββ contents/
β βββ config/
β β βββ config.qml
β β βββ main.xml
β βββ ui/
β β βββ main.qml # Root PlasmoidItem, timer, data flow
β β βββ CompactRepresentation.qml # Panel tray badge
β β βββ FullRepresentation.qml # Expanded popup
β β βββ UsageHeader.qml # Title, refresh, full-bleed stripe
β β βββ HorizontalUsageBars.qml # Progress bars + reset brackets
β β βββ UsageBarChart.qml # Bar chart component
β β βββ UsageFetcher.qml # curl transport via executable engine
β β βββ ViewSelector.qml # (disabled) tab bar
β β βββ configGeneral.qml # Settings: workspace, cookie, Test button
β β βββ configAppearance.qml # Theme presets, toggles & color pickers
β β βββ configAbout.qml # Credits, GitHub repo & support
β βββ code/
β βββ api.js # Parsing, shell-quote, curl builder
βββ bin/
β βββ opencode-usage # Python CLI client
β βββ opencode-usage-completion.bash
β βββ opencode-usage-completion.zsh
βββ gnome-extension/
β βββ metadata.json # Extension manifest (GNOME Shell 46β50)
β βββ extension.js # Panel indicator, async curl transport, timer
β βββ popup.js # Hover popup: header, 3 usage bars, footer
β βββ settings.js # gsettings schema resolution + key names
β βββ prefs.js # libadwaita preferences page
β βββ api.js # GJS port of contents/code/api.js
β βββ schemas/ # gsettings schema (compiled on install)
β βββ icons/ # Branded Oβ¦ logo (not yet wired to the panel)
β βββ tests/ # gjs test suites + runner
β βββ install.sh # Install, compile schema, enable or queue
βββ assets/
β βββ icon.svg
β βββ branding-icon.jpg
βββ .github/
β βββ workflows/
β βββ release.yml # CI: build + publish release bundles
βββ install.sh
βββ install-cli.sh
βββ LICENSE
βββ README.md
- Network Transport: Qt's QML XHR silently strips the
Cookieheader (QtCookieLoadControlAttribute), soUsageFetcher.qmlshells out tocurlvia Plasma'sexecutabledataengine. The cookie is shell-quoted before inlining. - Data Parsing:
api.jsparses the consolego/statusJSON response (access.meters.fiveHour/week/month, BigInt money fields as strings), converting each meter into a percentage, reset countdown, and progress bar. - QML Bindings: Child components must qualify parent properties with the parent's
id(e.g.,fullRoot.usagePercent) β unqualified names resolve to the child's own property, creating silent self-binding loops.
- Now on GNOME Shell as well as KDE Plasma β a panel icon that shows your Rolling (5h), Weekly, and Monthly usage on hover, with its own settings window.
- The GNOME panel icon now uses the same Oβ¦ logo as the KDE widget, and shows your weekly percentage next to it (orange at 75%, red at 90%) β switch the badge off in settings if you prefer icon only.
- The GNOME popup has Open OpenCode Console and Settings⦠entries, and they still work when your sign-in has expired.
- GNOME settings include a Test button that checks your details straight away.
- The GNOME panel icon shows up reliably after a fresh install instead of silently not appearing.
- The GNOME settings window opens its contents properly.
- During a brief OpenCode outage, GNOME keeps your last known figures instead of replacing them with an error.
- The GNOME popup no longer duplicates itself after a refresh.
- GNOME no longer waits on the network in the background, so the desktop stays responsive while usage is checked.
- The download bundle now includes the GNOME extension, and builds always pick up the current version number.
- Full release notes live in CHANGELOG.md.
OpenCode's usage page itself sometimes answers with a short outage (even in a browser). The widget retries automatically and keeps your last numbers on screen, then picks up fresh numbers on the next refresh β no action needed. If you see it often, you can report it to OpenCode with this template:
Subject:
GET /console/api/go/statusreturns intermittent HTTP 500 Body: "While signed in,GET https://opencode.ai/console/api/go/status(withx-org-id) intermittently returns500 {\"_tag\":\"InternalServerError\"}β roughly 6 of 8 tries during one window β while/console/api/orgsstays 200. Seen on 2026-09-18. Please investigate."
Β© Mayanktaker Computers & Web Development β Licensed under MIT.


