In the DeepSeek Harness (DSH) development environment, viewing the subscription usage of OpenCode GO directly usually requires switching to an external console page, which increases the overhead of context switching. The dsh-go-usage plugin embeds a corner badge component in the bottom-right corner of the DSH Web interface, integrating usage monitoring directly into the development workflow.
Plugin Positioning¶
This is a DSH Web plugin maintained by developer shsr07. It presents the rolling/weekly/monthly usage percentages and reset countdowns for OpenCode GO as a collapsible corner badge, allowing developers to monitor resource consumption without leaving the current page.
Core Features¶
- Multi-dimensional Usage Display: Supports rolling, weekly, and monthly usage buckets; the data logic remains consistent with the official OpenCode console.
- Visual Status Feedback: The progress bar color changes with usage. It turns amber at 80% and red at 100% (indicating rate limiting has been triggered).
- Live Countdown: Displays a reset countdown (formatted as “Resets in X days X hours”) and updates the value every 15 seconds.
- Automatic Refresh Mechanism: The interface automatically refetches data every 60 seconds, and a manual refresh button is also provided.
- Interaction and Theme Adaptation: Supports collapsing into a vertical tab at the right edge, which can be expanded by clicking; the interface automatically adjusts its colors according to the DSH theme (light/dark mode).
Installation and Activation¶
Prerequisites¶
- Windows operating system (the plugin fetches data through PowerShell).
- Node.js >= 24 and pnpm.
- DeepSeek Harness is installed.
- The local
auth.jsoncontains theopencode-goAPI key (usually located at%USERPROFILE%\.local\share\opencode\auth.json).
Installation Steps¶
Install using the npm package:
dsh plugin --profile web add dsh-go-usage
Install from Source¶
If you need to install from the GitHub source or perform local development:
git clone https://github.com/shsr07/dsh-go-usage.git
cd dsh-go-usage
pnpm install
pnpm build
dsh plugin --profile web add link:<绝对路径>
After installation, restart the Web service:
dsh web
Open the DSH Web interface in a browser and check the bottom-right corner of the page. In the initial state, a usage card is displayed. Click the » button on the card to collapse it into a vertical tab on the right edge.
Configuration¶
The plugin provides optional configuration items, located in the plugin line inside cordis.patch.yml. The default configuration is usually ready to use directly; if customization is needed, you can add a config: block:
- id: go-usage
name: 'dsh-go-usage'
config:
authJsonPath: 'C:\Users\me\.local\share\opencode\auth.json'
apiUrl: 'https://opencode.ai/zen/go/v1/usage'
powershellExe: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
timeoutSec: 15
| Configuration Item | Type | Default | Description |
|---|---|---|---|
authJsonPath |
string | $USERPROFILE/.local/share/opencode/auth.json |
Local opencode authentication file path. |
apiUrl |
string | https://opencode.ai/zen/go/v1/usage |
OpenCode GO usage API endpoint. |
powershellExe |
string | C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe |
PowerShell execution path used to fetch data. |
timeoutSec |
number | 15 |
API request timeout (seconds). |
Notes¶
- Platform Limitation: Currently supported only on Windows.
- Privacy and Security: The API key is only read locally and extracted from
auth.jsonon the machine; it is not sent to other servers. Only usage percentages and reset timestamps are sent toopencode.ai. - License: Governed by the MIT license; it is recommended to review the source code before installing.
Summary¶
dsh-go-usage integrates OpenCode GO usage monitoring seamlessly into the daily development workflow in DSH, providing intuitive visual feedback and convenient collapsible interactions. For users who rely on the OpenCode GO subscription for development or testing, this is a practical tool.
- Project Homepage: https://github.com/shsr07/dsh-go-usage
- Plugin Directory: https://www.skillhub.cn/plugins/shsr07/dsh-go-usage