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-ai-wallet

v0.1.0

Published

DSH plugin: one-click account balance & quota panel for multiple AI providers (DeepSeek, Zhipu GLM, Z.ai, Moonshot, MiniMax, StepFun, SiliconFlow, OpenRouter, xAI).

Readme

dsh-ai-wallet

DSH(DeepSeek Harness)AI 钱包插件——可拖动悬浮球实时显示当前使用模型的余额 / 配额,点击展开多供应商余额面板。

功能

悬浮球(Floating Ball)

  • 固定悬浮于界面任意位置,自由拖动,位置自动记忆
  • 球面实时显示当前对话正在使用的模型对应的余额 / 配额(从最近一次模型调用推断,每 60 秒自动刷新)
  • 点击展开完整余额面板(Esc / 点击遮罩关闭)

余额面板

  • 一屏查看所有已配置供应商的金额余额或配额余量
  • 配额型供应商展示进度条 + 重置时间
  • 手动刷新 + 错误 / 未配置 Key 的友好提示

8 套内置主题

液态玻璃(默认)/ 浅色玻璃 / 磷光绿 / 赛博青 / Dracula / Nord 冰蓝 / 琥珀 / 羊皮纸——面板底部一键切换,主题与悬浮球位置持久化到服务端文件(~/.dsh/dsh-ai-wallet.prefs.json),不随 DSH 端口变化丢失。

支持的供应商

| ID | 名称 | 类型 | 需要的 Key | | --- | --- | --- | --- | | deepseek | DeepSeek | 金额余额 | DEEPSEEK_API_KEY | | zhipu | 智谱 GLM | 配额 | ZP_API_KEY / ZHIPU_API_KEY | | zai | Z.ai (GLM 国际) | 配额 | Z_AI_API_KEY | | moonshot | Moonshot Kimi | 金额余额 | MOONSHOT_API_KEY | | minimax | MiniMax | 配额 | MINIMAX_API_KEY | | stepfun | StepFun 阶跃星辰 | 金额余额 | STEP_API_KEY | | siliconflow | SiliconFlow 硅基流动 | 金额余额 | SILICONFLOW_API_KEY | | openrouter | OpenRouter | 金额余额 | OPENROUTER_API_KEY | | xai | xAI / Grok | 金额余额 | XAI_API_KEY |

说明:

  • 供应商 API 以官方文档为准,字段可能随版本调整。
  • xai 使用社区维护的非官方 credits 端点(xAI 预付费 credits 无公开 API),若失效会显示错误。
  • 仅控制台查询、无公开余额 API 的供应商(通义千问、百川、Groq)暂不支持;OpenAI / Anthropic 普通 key 查不了用量,故未内置。

安装

dsh plugin --profile desktop add dsh-ai-wallet

重启 DSH 后生效。

配置(可选)

默认启用 deepseek + zhipu。在 profile 的 cordis.patch.yml 中覆盖:

- update:
    - id: dsh-ai-wallet
      config:
        providers:
          - deepseek
          - moonshot
          - zhipu

providers 数组顺序即面板展示顺序,支持全部供应商 ID 中的任意子集。

开发

  • lib/index.js — 服务端:/ds-balance/v1 余额聚合路由、/ds-balance/v1/prefs 偏好读写路由;PROVIDERS 注册表 + collect() 汇总
  • lib/client.js — 客户端:悬浮球 + 面板渲染、主题系统、拖拽、当前模型推断(usage-stats 最近调用 → 供应商映射)

新增供应商:在 lib/index.js 的 PROVIDERS 中加一项 { name, kind, keyNames, fetch(key) } 即可,客户端无需改动。

许可

MIT