dsh-opencode-go-usage: A Balance and Usage Overlay for DeepSeek Harness
verneuil/dsh-opencode-go-usage
A DeepSeek Harness plugin that merges your DeepSeek balance and OpenCode Go usage (5-hour, weekly, monthly) into a single floating pill with click-to-refresh.
dsh-opencode-go-usage is a DeepSeek Harness plugin that gathers your DeepSeek official balance and OpenCode Go subscription usage into one floating pill. It removes the need to hop between pages to check money and quota, showing the 5-hour rolling window, weekly and monthly usage next to your CNY balance. Three rings display the used percentage at their center, and clicking the pill refreshes both sides at once without one failure affecting the other. The pill can be dragged with snap-to-edge, while the refresh interval and display toggles live in its matching settings page.
How to Install
dsh plugin --profile web add github:verneuil/dsh-opencode-go-usage- Category
- Models & Reasoning
- Platform
- DSH Plugin
- Author
- verneuil
- Distribution
- Plugin
dsh-opencode-go-usage Key Features
dsh-opencode-go-usage Repo Summary
What Does It Do?
OCG Usage is a DSH plugin for DeepSeek Harness that merges your DeepSeek official balance and your OpenCode Go subscription usage into a single floating pill. It solves the problem of checking money and quota across separate pages by showing the 5-hour rolling window, weekly and monthly usage alongside your balance right inside the harness. Maintained by verneuil under the MIT license, it is a lightweight client-side plugin that also ships a matching settings page.
Core Features
- Two datasets in one view: the same pill shows the DeepSeek official balance (in CNY) plus OpenCode Go usage for the 5-hour, weekly and monthly windows; clicking the pill refreshes both at once, and a failure on one side does not affect the other.
- Three rings: each ring center shows the used percentage without a percent sign, with distinct states and colors for refreshing, successful completion and failure.
- Two key sources: manual keys entered in the settings page take priority, otherwise the plugin reads the matching variables from the DSH credential store; neither key leaves the host process, and the client only reads a redacted config projection.
- Draggable pill: drag to reposition with snap-to-edge behavior, written back to config automatically, and you can hide the balance to make the pill narrower.
- Automatic refresh: one round every 5 minutes by default, refreshing balance and usage together, with the interval configurable in settings.
- Careful integration: it only occupies the overlay slot the harness reserves, replaces no official entry, and styles itself purely with theme tokens for light and dark modes.
How to Use This Plugin?
After enabling it in DSH, the floating pill appears on screen; click it to pull a fresh round of balance and usage data, and drag it to reposition with automatic snapping. Open the matching settings page to change behavior: enter manual OpenCode Go and DeepSeek keys (leave blank to fall back to the DSH credential store), adjust the auto-refresh interval, and toggle the pill or the balance display. The usage endpoint returns status, used percentage and reset time for the rolling, weekly and monthly windows, while the balance endpoint prefers the CNY row; the host writes these derived snapshots and the client reads them.
How to Troubleshoot This Plugin?
When an error appears on the pill, first identify which side failed: balance and usage are fetched separately, so an error on one does not affect the other. If the message concerns keys, check whether the manual keys in the settings page are correct, or confirm the matching environment variables exist in the DSH credential store; OpenCode Go tries two candidate variable names in order, while DeepSeek uses a separate fixed one. If the data stops updating, click the pill to refresh manually, or check whether the auto-refresh interval has been set too long.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: verneuil/dsh-opencode-go-usage. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
