Preface¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. When developing with OpenCode Go, frequently switching to the browser to check subscription quota and spending disrupts the workflow. The willwhi/dsh-opencode-go-meter plugin integrates OpenCode Go usage monitoring (5-hour rolling/weekly/monthly) and actual spending amounts directly into the conversation input area, and provides login and credential configuration within a popup, without requiring access to the terminal or code changes.
Plugin Positioning¶
This is a DeepSeek Harness (dsh) web interface plugin maintained by willwhi and released under the MIT license. It solves the need to check OpenCode Go subscription status and cost during local development.
Core Features¶
- Usage and spend monitoring: Displays subscription usage (percentage) and reset countdowns across three dimensions—5-hour rolling window, weekly, and monthly—and directly shows the actual current-month spend amount (in USD).
- Data sources: Supports automatic fallback between dual data sources, prioritizing the official quota API and automatically falling back to dashboard SSR data if it fails.
- Credential security: API keys and Cookies are only used in the Host process. The browser only reads the same-origin JSON endpoint, and credentials are not sent to the browser or logged.
- Ready out of the box: If not configured, it displays
<noconfig>, and you can click the button to open a login form for configuration. - Lightweight design: The frontend polls every 30 seconds, while the Host side uses a 60-second cache and failure cooldown mechanism.
Installation and Activation¶
Installation command
dsh plugin --profile web add dsh-opencode-go-meter
Prerequisites
* The DeepSeek Harness (web profile) version must be 0.1.0-rc.6 or higher.
* pnpm (a plugin dependency) must be included in the system PATH environment variable.
Activation steps
1. Run the installation command above.
2. Restart the dsh web process (terminate the current process and start it again).
3. Force refresh the page in the browser (Ctrl+Shift+R).
Usage¶
- View summary: Below the conversation input area, you can see the usage percentages for the three time windows and the current-month spend.
- View details: Click the “Go Usage” button inside the input area to open a details popup, including progress bars, reset countdowns, and a daily cost breakdown bar chart.
- Refresh and update: A manual refresh function is provided in the bottom-right corner of the popup. To update credentials, click “Login” inside the popup.
Notes¶
- Uninstall leftovers: Running the uninstall command will not delete
~/.dsh/opencode-go-meter.jsonandauth.json; credentials remain on the local system. - Permission security: The
authcookie read by the plugin is the complete OpenCode user session, used only for Host-side data fetching and never sent to the browser or written to logs. - Applicable scope: This plugin only applies to the DSH Web Profile. Make sure OpenCode Go CLI is installed locally (optional; if already installed, it can automatically read the Key).
Summary¶
By integrating monitoring into the DSH interface, this plugin simplifies the resource management workflow. For more details, refer to the GitHub repository or the community directory.