ChrisZhangWG/dsh-codex-meter0

dsh-codex-meter

Codex-style compact meter for the DSH web GUI: a tiny status pill showing live token usage, session cost and remaining DeepSeek API balance.

包名
dsh-codex-meter
版本
1.0.7
许可证
MIT
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ChrisZhangWG/dsh-codex-meter

配置

  • 余额读取复用 DEEPSEEK_API_KEY(设置 → 模型,或 ~/.dsh/.credentials.yaml)。

  • 「今日已消费」官方来源(推荐):配置 DEEPSEEK_PLATFORM_TOKEN (登录 platform.deepseek.com → DevTools → Console → JSON.parse(localStorage.getItem('userToken')).value), 存到 ~/.dsh/.credentials.yaml

    DEEPSEEK_PLATFORM_TOKEN: 
    

    配置后 Today 显示官方精确数据;token 会随平台会话过期,失效时 Today 行显示 Today (refresh needed) 并自动退回 估算(数据落 ~/.dsh/storages/codex-meter-day.json), 重新按上述步骤取新 token 即可恢复。

改 lib/index.js(宿主)/ lib/client.js(浏览器端 Usage 页面)