AmaTsumeAkira/opencode-usage ↗★ 1

opencode-usage

在网页界面显示OpenCode Go订阅额度徽章与重置倒计时。 适合使用OpenCode Go订阅的用户;展示滚动、周、月额度用量。

包名
opencode-usage
兼容性
待验证
版本
1.0.0
许可证
MIT
最近更新
2026年8月14日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AmaTsumeAkira/opencode-usage

opencode-usage

English | 中文

OpenCode Go quota badge plugin (bundle) — shows rolling / weekly / monthly quota usage and reset times for OpenCode Go right in the dsh Web UI.

Screenshot

OpenCode Go quota badge in the composer dock

OpenCode Go quota badge in the composer dock

Features

  • Renders the three quota windows (rolling / weekly / monthly) as colored percentages (green → amber → red by usage) with reset countdowns in the composer dock
  • Shows the last fetch time ("updated M/D HH:mm"), switching to "updating…" while a refresh is in flight
  • Click the "OpenCode Go" label to refresh the quota manually
  • Auto-refreshes every 5 minutes
  • The API key lives only inside the harness process: resolved per request through the credentials service, passed to curl via an environment variable, never serialized to the browser or logs

Install

This package follows the official dsh bundle format: it ships prebuilt artifacts (lib/ is committed to the repo) and has no install scripts, so a git install needs no pnpm allowBuilds grant.

dsh plugin --profile web add github:AmaTsumeAkira/opencode-usage

Or install from a local directory:

dsh plugin --profile web add ./opencode-usage

Uninstall:

dsh plugin --profile web remove opencode-usage

Credentials

The plugin reads OPENCODE_GO_API_KEY through the official credentials service (either the environment or ~/.dsh/.credentials.yaml):