vinyumao/dsh-opencode-usage
OpenCode Go plan usage display for the DSH web GUI: a persistent badge under the composer shows rolling/weekly/monthly usage percents with reset countdowns; click to expand a card; agents can query the balance via the opencode_go_usage tool.
Displays OpenCode Go plan usage in the DSH Web GUI: a persistent badge under the composer shows rolling / weekly / monthly usage percents and reset countdowns, clicking it expands a card with progress bars, per-second reset countdowns, instant refresh and an opencode link to the web usage dashboard, and agents can query the balance with the opencode_go_usage tool. The config form lets you set API key, base URL, refresh interval and the web usage URL, saved immediately; the UI is bilingual and follows the global DSH locale, and the API key defaults to the OPENCODE_GO_API_KEY environment variable (the same one the opencode-go model provider config uses) so it can work with zero configuration. The README warns the usage endpoint is not part of official public documentation and that parsing is defensive.
Install
dsh plugin --profile web add github:vinyumao/dsh-opencode-usage#<ref>README one-command install block quoted verbatim (pin <ref> to a commit SHA for reproducible installs, as the README advises; then restart dsh web). The README notes the plugin is pure source with no build step, so no prepare script runs, and that a pnpm allowBuilds prompt should be answered with the package key it prints.
Compatibility
README: an official DSH bundle plugin whose package.json declares dsh.bundle.patch, so the install joins the profile's dsh.profile.bundles layer stack and mounts cordis.patch.yml automatically. The Host half imports no @deepseek-ai/* packages at runtime (the tool is written in the raw registrable shape ctx.tools.register accepts), which is what makes a git vendoring install work without resolving the SDK from the plugin's own node_modules.
Details
- Repo: vinyumao/dsh-opencode-usage
- Category: Usage & Billing
- Stars: 0
- Version: Source/git install (repo 3★, last push 2026-08-15; pin a commit SHA as the README advises)
- Last push: 2026-08-15
- First seen: 2026-08-14
Recent updates
The README documents the capability surface, the Host/browser split and the endpoint caveat rather than a release-by-release table.
FAQ
- How do I install it?
- The README's one-command install is dsh plugin --profile web add github:vinyumao/dsh-opencode-usage#<ref> with a pinned ref, then restart dsh web.
- Do I need to configure the API key?
- Usually not — per the README the key defaults to the OPENCODE_GO_API_KEY environment variable, the same one the DSH opencode-go provider uses, and it can also be set in the card's config form.
- Does the browser see my API key?
- No — the README says every request goes through the Host's /api/dsh-opencode-usage/* routes, so the API key never enters the browser.