鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-commandcode-usage

DSH 的 CommandCode 用量与余额面板:在侧边栏底部显示 API 用量、信用额度、5小时/每周窗口。

用量计费
访问 GitHub
文档README

dsh-commandcode-usage

CommandCode 用量与余额面板 — 在 DSH(DeepSeek Harness)侧边栏底部显示 CommandCode API 用量、信用额度、5小时/每周窗口。

A CommandCode usage & balance panel for DeepSeek Harness — shows API usage, credit balance, and 5-hour/weekly windows from the sidebar footer.

usage panel

Features · 功能

  • CommandCode 用量:请求次数、成功率、Token 消耗、总花费
  • 信用额度:月额度、5小时窗口、每周窗口,进度条可视化
  • ⏱ 重置时间显示:每个周期下方标明截止/重置时刻(「重置 今天/明天/N天后 HH:mm」),一眼知道额度何时刷新
  • 余额与订阅:套餐信息、订阅状态、计费周期
  • 精致卡片 UI:渐变 header + 套餐徽章、统计三卡、图标渐变动画进度条、彩色百分比胶囊(≥85% 红 / ≥60% 黄 / 其余绿)
  • 主题自适应:跟随 DSH 的浅色/深色主题自动切换
  • 侧边栏入口:在 codex-ui 侧边栏底部提供"⚡ 用量"按钮,点击弹出面板

Install · 安装

方式一:插件市场(推荐)

打开 DSH 设置 → 插件市场,搜索 dsh-commandcode-usage,一键安装。

方式二:npm

▼
bash
复制代码
dsh plugin --profile web add dsh-commandcode-usage

方式三:手动(双半包)

▼
bash
复制代码
# 1. 安装 npm 包 npm install dsh-commandcode-usage # 2. 在 cordis.patch.yml 注册 # - id: dsh-commandcode-usage # name: 'dsh-commandcode-usage'

Configuration · 配置

插件通过 cordis.patch.yml 的 config 字段配置:

▼
yaml
复制代码
- id: dsh-commandcode-usage name: 'dsh-commandcode-usage' config: # API key(可选,默认自动从环境变量/配置文件读取) apiKey: 'your-commandcode-api-key' # API 基础地址(可选,默认官方) apiBase: 'https://api.commandcode.ai' # 环境变量名(可选,默认 COMMANDCODE_API_KEY) apiKeyEnv: 'COMMANDCODE_API_KEY'

API key 解析顺序

  1. 插件 config.apiKey
  2. 环境变量 COMMANDCODE_API_KEY
  3. ~/.dsh/.credentials.yaml 中的 COMMANDCODE_API_KEY
  4. launchctl getenv COMMANDCODE_API_KEY
  5. 其他常见配置文件(~/.config/commandcode/ 等)

Usage · 使用

安装并重启后,在 codex-ui 侧边栏底部点击 "⚡ 用量" 按钮即可查看:

  • 请求次数 / 成功率 / 总花费(概览卡片)
  • 5小时窗口 / 每周窗口用量(进度条)
  • 月额度剩余(进度条)
  • 账号、套餐、更新时间(页脚)

同时注册了 commandcode_usage 工具,agent 可在对话中查询:

▼
text
复制代码
查询我的 CommandCode 用量

Development · 开发

▼
bash
复制代码
git clone https://github.com/zouxiaoyang/dsh-commandcode-usage.git cd dsh-commandcode-usage npm install # 本地开发:软链到 profile ln -sfn $PWD ~/.dsh/profiles/web/node_modules/dsh-commandcode-usage

License

MIT

用量计费

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:zouxiaoyang/dsh-commandcode-usage

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-token-plan-quota
跟随当前模型供应商的额度徽标:DeepSeek、千问 Token Plan、阿里云费用中心取官方真值,Moonshot / OpenRouter 已接官方端点但字段未用真 Key 核对;其余只报本实例实测。
dsh-usage-stats
在侧边栏按模型、会话与日期统计 token 用量,并监控 OpenCode Go 额度、DeepSeek 余额与 Z.ai 额度。
dsh-usage-dashboard
DSH 用量分析坞:输入框峰谷计费坞(周末全天谷时)、实时余额、跨会话历史、按日期下钻与图表。
dsh-smart-scenario-router
根据对话场景选择模型,并在请求失败时按候选链进行回退。
dsh-token-usage-ledger
为 DeepSeek Harness 提供持久化 token 用量账本和 Web Usage 仪表盘。