Introduction

When using OpenCode Go in the DSH Web GUI, quota windows, used amounts, reset times, and refresh status are usually not directly displayed on the current interface. dsh-opencodego-quota is a DSH Web GUI plugin that places OpenCode Go’s quota information in a persistent card in the left sidebar, reducing the cost of switching back and forth to check.

Below is an introduction to its functions, installation methods, typical usage, and important limitations to note.

What is this

wellcover/dsh-opencodego-quota is a quota usage plugin for OpenCode Go in the DSH Web GUI. It displays quota progress, used amount, quota, and reset time for three windows (Day [last 5 hours], Week, Month) in the left sidebar, and shows the refresh time.

The plugin is maintained by wellcover with an MIT license. package.json declares version 1.0.5, engines.node >=18.

Data comes from the OpenCode official usage interface, not local estimation:

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

Core Features

Persistent Card in Left Sidebar

The plugin displays a persistent card in the DSH Web GUI left sidebar. It automatically hides in narrow (icon) bar mode; the card also automatically hides if the sidebar width is less than 110px.

The card resets automatically following DSH shell rendering.

Three-Window Quota Progress

The card displays quota usage progress for the following three windows:

  1. Day (last 5 hours)
  2. Week
  3. Month

Each window displays:

  • Quota usage progress bar
  • Used Amount / Quota
  • Reset time

The quota progress bar color gradients from green to red as the used quota goes from 0% to 100%.

Billing Periods and Refresh Time

The card displays DS peak/off-peak billing periods, 24-hour color bands, and current time markers in Beijing Time, refreshing locally every 30 seconds.

The card displays the refresh time and supports automatic refresh interval settings:

  • Interval range: 5–3600 seconds
  • Persistence location: Browser localStorage
  • Manual refresh: Supported

API Key Reading

The plugin automatically reads the Key from the DSH credential OPENCODE_GO_API_KEY; on failure, it falls back to environment variables and the OpenCode CLI auth.json.

Key parsing order:

  1. DSH credential OPENCODE_GO_API_KEY
  2. Environment variable OPENCODE_GO_API_KEY / OPENCODE_API_KEY
  3. ~/.local/share/opencode/auth.json

The Key is sent to the OpenCode official interface only via HTTPS, using Authorization: Bearer and x-api-key.

Installation and Enablement

First, confirm that a web profile exists in the DSH environment and that you can select the opencode-go provider in “Settings → Models”.

Then run:

dsh plugin --profile web add github:wellcover/dsh-opencodego-quota

No additional configuration is required. After installation, the card should be visible in the left sidebar; if the card does not appear, confirm that the profile’s package.json dsh.profile.bundles contains dsh-opencodego-quota, and refresh the page after restarting.

Typical Usage

Below is a reproducible usage workflow.

  1. Install the plugin:
dsh plugin --profile web add github:wellcover/dsh-opencodego-quota
  1. Confirm that the OpenCode Go API Key has been configured and that you can select the opencode-go provider in “Settings → Models”.

  2. Open the DSH Web GUI and view the Day (last 5 hours), Week, Month quota progress, used amount, quota, and reset time in the left sidebar card.

  3. If you need to adjust the automatic refresh interval, click the in the title bar or the seconds at the bottom of the card, enter 5–3600 seconds, and press Enter or save to apply.

  4. If you need to update data immediately, click the button to manually refresh quota data.

Suitable Scenarios and Notes

Suitable for developers using OpenCode Go in the DSH Web GUI. It is recommended to check the source code and the MIT license before installing; the plugin runs with the current dsh process permissions.

Notes:

  • The card is only displayed in wide bars; the narrow icon bar mode (sidebar width less than 110px) automatically hides the card.
  • The automatic refresh interval is 5–3600 seconds, persisted to browser localStorage.
  • Key parsing relies on OPENCODE_GO_API_KEY, OPENCODE_API_KEY, or ~/.local/share/opencode/auth.json configuration.
  • If the card does not appear, confirm that the profile’s package.json dsh.profile.bundles contains dsh-opencodego-quota, and refresh the page after restarting.

Related Links

GitHub:

https://github.com/wellcover/dsh-opencodego-quota

Directory page link:

https://www.skillhub.cn/plugins/wellcover/dsh-opencodego-quota