Preface

When using OpenCode Go in DSH Web, checking usage typically requires leaving the current interface to check an external endpoint. dsh-ocgo-usage turns this into a DSH plugin: it displays a persistent usage badge in the bottom-left corner of the Web sidebar, which expands to show usage details and a peak usage timeline upon hovering.

DSH adopts an “everything is a plugin” extension approach. The related community directory is an independent site with no official affiliation with DeepSeek / Huafan, and this article introduces the plugin based on verified information.

What is this

badai147/dsh-ocgo-usage is a DSH Web plugin maintained by badai147. Its purpose is to display OpenCode Go usage in the bottom-left corner of the DeepSeek Harness Web sidebar.

The verified materials indicate the license is MIT. As of 2026-09-01, the version in package.json is 0.2.0.

Core Features

Persistent Badge

There is a persistent button in the bottom-left corner, styled the same as the settings button. The badge displays a dashboard icon and the percentage of remaining usage for this month.

Status colors are as follows:

Remaining ≤20%: Orange
Remaining ≤0: Red

Hover Details Card

After hovering over the “Go Usage” button in the bottom-left corner, a details card pops up. The card includes:

DeepSeek Peak Usage Timeline (Beijing Time)
Scroll / Weekly / Monthly usage progress bars
Used percentage
Reset time

Peak Usage Timeline

Peak hours are displayed in Beijing Time. The peak hours for DeepSeek V4 Flash / Pro are:

09:00-12:00
14:00-18:00

Corresponding UTC times are:

01:00-04:00
06:00-10:00

The timeline highlights the interval where the current moment falls and displays the remaining time until the next switch point.

Data Refresh

After activation, it pulls usage data once initially, then refreshes automatically every 60 seconds.

Reading API Key

The plugin automatically reads the opencode-go API key from the DSH provider configuration without requiring extra setup. The reading order is as follows:

~/.dsh/.ocg-state.json → ~/.dsh/.credentials.yaml → Environment variable

Operation Method

The Host side registers a DSH web server route to provide usage data to the Client:

GET /api/ocgo-usage

This route proxies requests to the OpenCode Go usage endpoint:

https://opencode.ai/zen/go/v1/usage

The Client side registers two UI locations:

sidebar.footer.action
shell.overlay

The Client side uses a custom-written __ModuleLoader__ bundle, while the Host side is pure Node ESM. Cross-platform support for Windows / macOS / Linux.

Installation and Enablement

Install the plugin first, then restart dsh web for it to take effect.

Execute the following installation command:

dsh plugin --profile web add @badai147/dsh-ocgo-usage

If the version remains old after upgrading, you can reinstall by explicitly specifying the version:

dsh plugin --profile web add @badai147/dsh-ocgo-usage@0.1.1

After the steps above, restart dsh web; you should see the “Go Usage” button in the bottom-left corner of the sidebar.

Typical Usage

  1. Configure the opencode-go provider in DSH settings, including the API key. The plugin will read this automatically without extra configuration.

  2. Restart dsh web.

  3. Hover over the “Go Usage” button in the bottom-left corner to view details.

  4. The persistent badge will show the percentage of remaining usage this month. For example, when 5% has been used this month, it displays:

95% (本月)
  1. Check peak hours in the hover card. The current moment falls within either peak or off-peak intervals, and it displays the remaining time until the next switch point.

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • Need to frequently check OpenCode Go usage in DSH Web.
  • Need to determine DeepSeek V4 Flash / Pro peak hours based on Beijing Time.
  • Do not want to manually open the external usage endpoint every time.

Notes before use:

  • The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license before installing.
  • The opencode-go API key is processed locally and is not sent to the browser.
  • The automatic reading order is:
~/.dsh/.ocg-state.json → ~/.dsh/.credentials.yaml → Environment variable
  • Since version 0.1.1, it is a pure Node implementation and does not require a system-wide installation of python3.
  • Version 0.1.0 might trigger shell sandbox checks on Windows; version 0.1.1 switched to Node’s built-in https and now works normally on Windows / macOS / Linux.

References

  • GitHub: https://github.com/badai147/dsh-ocgo-usage
  • Directory Page: The verified materials do not provide a confirmed directory page URL; if you need to use it, please refer to the link provided on the plugin’s source page.