sxwer001/dsh-coding-plan-quota ↗★ 0
dsh-coding-plan-quota
Coding-plan quota ring next to the DSH model selector. Reads the quota windows or balances of every configured coding plan (OpenCode Go, GLM, Kimi, MiniMax, Claude, Codex, Gemini, Copilot and more), cycles 5-hour/weekly/monthly on click, colours the ring by urgency, and lets the hover card switch the displayed source. 适合使用多种商业代码助手并需要实时监控剩余额度的开发者。
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:sxwer001/dsh-coding-plan-quotaConfiguration
apply(ctx, config) merges the config over these defaults:
| Key | Default | Meaning |
|---|---|---|
cacheMs | 60000 | host-side cache lifetime per source |
timeoutMs | 12000 | upstream request timeout |
thresholds | [50, 75, 90] | green → blue → orange → red boundaries |
defaultProvider | "opencode-go" | what to show before you pick one |
hideUnconfigured | false | hide sources with no credential |
insecureTls | false | skip certificate verification |
providers | {} | per-source overrides, keyed by id |
Per-source overrides:
| Key | Meaning |
|---|---|
enabled | false removes the source from the card |
endpoint | replace the built-in URL (this is how you enable ark) |
apiKey | a literal key, which beats every other credential source |
apiKeyEnv | read the key from this environment variable instead |
region | "cn" switches to the vendor's mainland endpoint |
insecureTls | per-source override of the global flag |
- insert:
- id: coding-plan-quota
name: dsh-coding-plan-quota
config:
thresholds: [50, 75, 90]
defaultProvider: opencode-go
providers:
ark:
endpoint: "https://"
Credentials
For each source, the first hit wins: providers..apiKey → the environment variable named by
providers..apiKeyEnv (or the built-in name) → DSH's credentials service →
$DSH_HOME/.credentials.yaml → the vendor's own CLI file, where one exists (OpenCode, Claude, Codex,
Gemini, Copilot).
Credentials are read on the node half and never sent to the browser.