vinyumao/dsh-opencode-usage ↗★ 0
@chen-001/dsh-opencode-usage
OpenCode Go 套餐用量显示插件:滚动/每周/每月用量百分比与重置倒计时,输入框下方常驻徽章 + 展开卡片,Agent 可经工具查询。
AI 分析
核心用途是实时监控和查询 OpenCode Go 套餐的用量。适合使用 OpenCode Go 服务并需要防止超额用量的用户。必要条件是需配置 OpenCode Go API 密钥。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:vinyumao/dsh-opencode-usage說明文件
閱讀完整 README ↗Configuration
API key resolution order: plugin config file → OPENCODE_GO_API_KEY environment variable → none.
| Config | Default | Description |
|---|---|---|
apiKey | env var | Stored to ~/.dsh/dsh-opencode-usage.json (mode 0600) when filled in via the card's config form |
baseUrl | https://opencode.ai/zen/go | Upstream gateway base; /v1/usage is appended automatically |
refreshSeconds | 300 | Badge auto-refresh interval (seconds, min 10) |
enabled / announceToAgent | true | Master switch / whether to announce the plugin to agents |
Optional file-based config:
// ~/.dsh/dsh-opencode-usage.json
{ "apiKey": "sk-…", "baseUrl": "https://opencode.ai/zen/go", "refreshSeconds": 300 }