ben7am1n / dsh-deepseek-usage

已收录

DeepSeek balance and token usage tools for DeepSeek Harness

main工具 查看源代码

安装

npx -y @deepseek-ai/dsh plugin --profile web add github:ben7am1n/dsh-deepseek-usage

此安装命令根据 GitHub 仓库地址生成,是未经验证的安装起点。

README

维护者编写的文档快照。

在 GitHub 查看 ↗
提交版本 244fb45同步于 2026年8月18日

dsh-deepseek-usage

DeepSeek usage monitor for DeepSeek Harness: account balance query and live token usage summary as model-callable tools.

Install

dsh plugin --profile <name> add dsh-deepseek-usage

Requires a DeepSeek API key available as DEEPSEEK_API_KEY (env or credential).

Tools

deepseek_balance

Queries GET https://api.deepseek.com/user/balance and returns availability and per-currency balances (total / granted / topped-up). When lowBalanceThreshold is configured, appends a warning when the primary currency balance drops below it.

usage_summary

Aggregates per-session token usage from the harness token meter across live sessions, sorted by total tokens descending. Use it to estimate context usage and spot runaway sessions.

Configuration

FieldDefaultMeaning
apiKeyEnvDEEPSEEK_API_KEYEnv var or credential reference for the API key
baseURLhttps://api.deepseek.comDeepSeek API base URL
lowBalanceThresholdOptional low-balance warning threshold
# profile cordis.patch.yml
- id: deepseek-usage
  config:
    apiKeyEnv: DEEPSEEK_API_KEY
    lowBalanceThreshold: 20

License

MIT

仓库信息

开发语言
TypeScript
许可证
MIT
最后更新
2026年8月13日 16:28

谨慎安装

请检查源代码、权限、生命周期脚本、依赖与网络访问;不受信任的插件应先在隔离环境中测试。