CyBerKitTen0009/dsh-quota-dashboard ↗★ 1
dsh-quota-dashboard
dsh-cost-meter 的 fork:会话费用/Token 缓存统计 + 统一额度看板(DeepSeek 余额 / OpenCode GO / Kimi For Coding / GLM Coding Plan / 火山方舟)。Fork of dsh-cost-meter with a unified multi-provider quota dashboard.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CyBerKitTen0009/dsh-quota-dashboard说明文档
阅读完整 README ↗配置
额度看板配置存于账本配置(设置页可改),默认即含上述 5 个 Provider,可按需启用/禁用或修改。配置形如:
quotaDashboard: {
enabled: true, refreshMinutes: 5, timeoutMs: 15000,
providers: [
{ id: 'deepseek', label: 'DeepSeek 余额', kind: 'deepseek-balance', credential: 'DEEPSEEK_API_KEY', endpoint: 'https://api.deepseek.com/user/balance', enabled: true },
{ id: 'opencode-go', label: 'OpenCode GO', kind: 'opencode-go', credential: 'OPENCODE_GO_API_KEY', endpoint: 'https://opencode.ai/zen/go/v1/usage', enabled: true },
{ id: 'kimi-coding', label: 'Kimi For Coding', kind: 'kimi-usage', credential: 'KIMI_CODING_API_KEY', endpoint: 'https://api.kimi.com/coding/v1/usages', enabled: true },
{ id: 'glm-coding', label: 'GLM Coding Plan', kind: 'glm-usage', credential: 'ZAI_CODING_CN_API_KEY', endpoint: 'https://open.bigmodel.cn', enabled: true },
{ id: 'ark', label: '火山方舟', kind: 'ark-quota', credential: '', endpoint: '', enabled: true, extra: { accessKeyIdRef: 'ARK_ACCESS_KEY_ID', secretAccessKeyRef: 'ARK_SECRET_ACCESS_KEY', region: 'cn-beijing', version: '2024-01-01' } },
],
},
凭证解析优先序:DSH 凭据库(ctx.credentials)→ 环境变量;OpenCode GO 额外支持 OPENCODE_API_KEY 旧名与 opencode CLI 登录态自动发现。