npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-opencodex-usage

v0.1.0

Published

Draggable OpenCodex quota & rate-limit floating monitor plugin for DeepSeek Harness (DSH) Web GUI

Readme

dsh-opencodex-usage

DeepSeek Harness (DSH) Web GUI 插件:可拖拽 OpenCodex 额度与速率监控悬浮卡片

Draggable OpenCodex Quota, Rate Limit & Usage Floating Monitor for DeepSeek Harness

license dsh opencodex

简体中文 | English


简体中文

🌟 核心特性

  • 🎯 自由拖拽与位置记忆(Draggable Floating Pill)
    • 常驻在聊天主界面,按住悬浮胶囊即可在屏幕任意位置自由拖拽;
    • 位置坐标自动保存至浏览器的 localStorage,刷新页面或重启后依然保持你摆放的位置;
    • 智能防误触:微小移动识别为点击打开面板,大幅拖拽不触发误弹窗。
  • 📊 全量接入 5 大提供方速率与配额监控(Multi-Provider Rate Limits)
    • 直连本地 OpenCodex 官方 /api/provider-quotas 接口;
    • OpenCode Go:5小时滚动限额、每周限额(高消耗自动橙黄预警)、30天限额 + 重置倒计时;
    • Google Antigravity:Gem / Cla 独立用量百分比与重置时间;
    • OpenAI (Codex login):每周限额、有效账户状态、账户池容量恢复提示(+6% 账户池容量);
    • xAI Grok:每周限额与重置时间;
    • DeepSeek:实时 API 余额(Balance)。
  • 📈 用量与费用统计(Usage & Top Models)
    • 7天 / 30天 周期切换;
    • 总请求数、总 Tokens、Cache 缓存命中率、API 等效估算费用;
    • 前几名活跃模型排行榜(如 deepseek-v4-flashgpt-5.6-terragrok-4.6gemini-3.7-flash)。
  • 零配置自动探测
    • 自动读取 ~/.opencodex/runtime-port.json 获取动态运行端口(默认 10100);
    • 自动读取 ~/.opencodex/admin-api-token 完成接口鉴权;
    • 完美适配 DSH Design Tokens(--dsw-alias-*),自适应深色/浅色及自定义皮肤(如 Maid-Atelier)。

📦 安装方式

方式 1:通过 GitHub 依赖安装

在你的 ~/.dsh/profiles/web/package.jsondependencies 中添加:

{
  "dependencies": {
    "dsh-opencodex-usage": "github:Walvez/dsh-opencodex-usage"
  },
  "dsh": {
    "profile": {
      "bundles": [
        "dsh-opencodex-usage"
      ]
    }
  }
}

方式 2:本地 Link 方式引入(推荐本地开发者)

cd ~/.dsh/profiles/web/plugins
git clone https://github.com/Walvez/dsh-opencodex-usage.git

然后在 ~/.dsh/profiles/web/package.jsondependencies 添加 "dsh-opencodex-usage": "link:plugins/dsh-opencodex-usage" 并加入 dsh.profile.bundles

⚠️ 注意:安装后需重启一次 dsh web 服务生效。


English

🌟 Features

  • 🎯 Draggable Floating Pill with Position Persistence:
    • Drag the pill anywhere on your screen. The coordinates are saved in localStorage and restored across page refreshes.
    • Smart click vs drag detection: drag without accidental panel popups.
  • 📊 Full Multi-Provider Rate Limit & Quota Monitoring:
    • Directly pulls from OpenCodex's /api/provider-quotas endpoint.
    • OpenCode Go: 5h-rolling, weekly, monthly quota & reset countdowns.
    • Google Antigravity: Gem and Cla quota windows & reset times.
    • OpenAI (Codex login): Weekly quota, active account tier, pool capacity recovery.
    • xAI Grok: Weekly quota and reset schedule.
    • DeepSeek: Real-time API balance readout.
  • 📈 Usage & Cost Analytics:
    • Toggle between 7-day and 30-day windows.
    • Total requests, total tokens, cache hit tokens, estimated USD cost.
    • Top active models and provider usage breakdown.
  • Zero-config Auto-detection:
    • Automatically discovers dynamic port from ~/.opencodex/runtime-port.json (fallback: 10100).
    • Automatically authenticates via ~/.opencodex/admin-api-token.
    • Built with DSH CSS Design Tokens (--dsw-alias-*), perfectly adapting to light, dark, and custom themes.

📄 License

MIT © Walvez