Introduction¶
In the DeepSeek Harness (DSH) desktop version, when using OpenCode Go, a common practice is to keep only one OPENCODE_GO_API_KEY in the credential store, relying on external means to check usage, and manually changing configuration for multiple accounts. The dsh-go-quota plugin brings this into the Web UI: one quota card per subscription key, clickable to switch the current key, and linked with the Go quota panel in the bottom-left corner of DSH (dsh-cost-meter). Below is an introduction to what it is, how to install it, how to use it daily, and the limitations to be aware of.
What is this¶
dsh-go-quota is a client plugin running inside the DSH desktop Web UI (platform: web), released by community maintainer [EyuNO1] on [GitHub], with a local package name @local/dsh-go-quota (version 0.2.0, MIT license). One-sentence positioning: OpenCode Go Multi-Account Quota Card and Key Switcher. Quota data comes from OpenCode Go’s usage interface; this project has no affiliation with OpenCode or DeepSeek official.
Directory page: SkillHub - dsh-go-quota (Community plugin directory, no official affiliation with DeepSeek / Fangfang).
Core Features¶
Quota and Interface¶
- One card per Key: Displays 3 tiers of progress bars (5h / week / month), percentages, and reset countdowns; usage >=70% turns yellow, >=90% turns red.
- Current Active Account: Displayed as a thin top bar (Account Name + 3-tier usage + Star), not occupying a large card.
- Title Bar: Shows “Go Account · N Accounts”, supports layout switching, refresh, collapse; bottom allows “+ Add Account” and shows update time.
Switching and Security¶
- Switching: Clicking the card body (excluding star/delete) switches the Key: writes to
OPENCODE_GO_API_KEYin DSH credential store, refreshesdsh-cost-meter; the card shows “Switching…” during the process. - Security: When adding/removing accounts, full keys are not sent to the browser, only masked (first 4 + last 4); the current account does not provide a delete button.
- Storage: Keys are saved in the credential store; account list is in
$DSH_HOME/plugin-data/dsh-go-quota/accounts.json(permissions 0600). Plugin HTTP routes are same-origin as DSH and local only, with no telemetry or upload to third parties.
Interaction and Persistence¶
- Star to Top: Clicking the gray solid star turns it gold and pins it to the top of the list; clicking again cancels (preference saved in browser, not written to
accounts.json). - Layout: Single / Double column layout: toggle via title bar icon, spring transition; adapts to account count automatically if no manual selection on first load.
- Draggable Window: Draggable floating window (collapses to capsule or drag title bar), expands/collapses with animation, supports
prefers-reduced-motion. - Persistence: Position, layout, stars, collapsed state saved in cookie + localStorage, persists across restarts; top of panel reserved 84px safe area to avoid covering window title bar/drag area.
Installation and Usage¶
Prerequisites¶
- DSH desktop version with Web UI (plugin uses DSH Web client plugin API; differences may exist across DSH versions).
- At least one OpenCode Go subscription key (
oc_...). - First use requires DSH to access
https://opencode.ai/zen/go/v1/usage.
Local Bundle Installation¶
This plugin is a local bundle, not installed via remote one-click commands like dsh plugin add github:...; installation steps follow the repository README.
- Place the repository in a local directory (README example shows cloning; can also download zip and unzip):
git clone https://github.com/EyuNO1/dsh-go-quota
- Install this directory as a local bundle in DSH:
- Open the plugin management page, select “Install Local Bundle”, and select the repository directory; or
- Execute in DSH’s agent:
plugin_manager install_bundle target=<absolute path to repo>
-
Restart or refresh DSH. A “Go Account” overlay should appear in the top-right corner of the interface.
-
On first launch, existing
OPENCODE_GO_API_KEYin the credential store is imported as the “Default Account”; if not, click “+ Add Account” in the overlay.
The
@local/prefix is DSH’s local installation convention; modifyclient.jsand refresh the page to debug, reload plugin or restart DSH after changes toindex.js/cordis.patch.yml.
It is recommended to read the repository source code and LICENSE before installing, and remember: plugins run with the permissions of the current DSH process, will read/write credentials and accounts.json.
Typical Usage¶
After installation and initial import, daily use is as follows:
- Switch Account: Click the target account card body; current account moves to the top bar; previous current account returns to the card group.
- Star: Click the gray star on the right of the account name to pin; click the gold star to unpin.
- Layout: Click the layout icon in the title bar to switch between single and double column (no longer auto-follows account count after manual selection; clear
dsh_goq_layoutcookie to restore auto). - Drag: After collapsing, drag the capsule; or after expanding, drag the title bar; position is limited within the screen (cannot stick to the very top of the window due to 84px safe area).
- Refresh: Click the refresh icon in the title bar to force a re-check of all account quotas (Host side has ~20s cache, internally can use
?force=1to bypass).
Host plugin exposed same-origin routes include: GET /go-quota/state, POST /go-quota/accounts, /go-quota/accounts/remove, /go-quota/activate, /go-quota/refresh (see README for workflow diagram).
Use Cases and Notes¶
Who is it for: Developers who use OpenCode Go in DSH, hold multiple oc_... keys, need to view three-tier usage in the desktop environment and quickly switch the current key.
Known Limitations (as of README dated 2026-11):
- OpenCode Go’s
usageinterface is not a public stable API; requests require browser UA and may trigger Cloudflare restrictions. - DSH Web client plugin API is still evolving; plugin verified against desktop version as of 2026-11.
- When opened via
localhostand127.0.0.1, host-level cookies are treated as two separate ones, layout/position may be inconsistent. - In double-column layout, an empty space is left on the right of the last row when there is an odd number of cards.
Please do not paste full keys, accounts.json, or screenshots containing personal data in issues / PRs.
Conclusion¶
dsh-go-quota converges the viewing of multi-account OpenCode Go quotas and key switching into a DSH Web UI overlay, aligning with the credential store and dsh-cost-meter, suitable for local-first, multi-key rotation scenarios. For further information, follow the community directory page and source code repository.
- Directory page: https://www.skillhub.cn/plugins/EyuNO1/dsh-go-quota
- GitHub: https://github.com/EyuNO1/dsh-go-quota