xiaweiliang060035/dsh-opencode-go-usage
Floating widget showing real-time OpenCode Go subscription usage (rolling/weekly/monthly) for every API key, with rate-limit alerts and automatic key-pool discovery.
Shows OpenCode Go subscription usage in the DSH web GUI in real time: a floating widget pinned to the right edge whose badge reflects the worst window across all API keys, with green/orange/pulsing-red colouring and an expandable panel giving one card per key (rolling / weekly / monthly progress bars, percentages, time-until-reset, ★ on the active key, ⚠ on rate-limited windows). The Host polls the official usage endpoint every 60 seconds (configurable), auto-discovers the key pool from $DSH_HOME/.credentials.yaml (OPENCODE_GO_KEY_<name> entries) with a fallback to OPENCODE_GO_API_KEY, resolves values through the credentials service, and keeps keys on the Host — only a same-origin snapshot route reaches the browser. UI is bilingual and theme-aware.
Install
pnpm add @xiaweiliang060035/dsh-opencode-go-usageREADME installation Option B (npm package) quoted verbatim — run it in your profile directory ($DSH_HOME/profiles/web), then add the package to the profile's dsh.profile.bundles list and restart dsh web. Registry-verified live 2026-09-16: @xiaweiliang060035/dsh-opencode-go-usage latest 0.3.0, repository field github.com/xiaweiliang060035/dsh-opencode-go-usage. The README also documents an Option A file: dependency form.
Compatibility
README requirements: Node.js and a DeepSeek Harness web profile (the default dsh web profile mounts the webServer, credentials and timer services the plugin needs). It notes the plugin has both a Host half and a Client half, so a plain copy into plugins/ with a relative patch entry loads the Host half only.
Details
- Repo: xiaweiliang060035/dsh-opencode-go-usage
- Category: Usage & Billing
- Stars: 0
- Version: npm @xiaweiliang060035/dsh-opencode-go-usage 0.3.0 (registry-verified 2026-09-16)
- Last push: 2026-08-15
- First seen: 2026-08-15
Recent updates
The README documents the widget, the Host/Client split and the usage endpoint rather than a release-by-release table; the latest version on the registry when checked on 2026-09-16 was 0.3.0.
FAQ
- How do I install it?
- The README's npm route is pnpm add @xiaweiliang060035/dsh-opencode-go-usage inside $DSH_HOME/profiles/web, then add the package to dsh.profile.bundles and restart dsh web.
- Do my API keys leave my machine?
- No — the README states keys never leave the Host; the browser only polls the Host's same-origin /plugins/dsh-opencode-go-usage/snapshot route.
- How are multiple keys handled?
- The README says the Host auto-discovers OPENCODE_GO_KEY_* entries in .credentials.yaml (or uses config.keyNames), with no hardcoded key count, falling back to OPENCODE_GO_API_KEY.