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-commandcode-subscription

v0.1.14

Published

Command Code Go models for DeepSeek Harness

Readme

DSH Command Code Subscription

中文 · English

在 DeepSeek Harness 中使用 Command Code Go 模型

通过 DSH 凭证服务管理 Command Code API Key,直接对接原生 NDJSON 生成接口,无需运行本地 HTTP 代理。

CI MIT

功能 · 安装 · 使用与限制 · 开发

实验性项目,非 Command Code 官方产品。 当前使用未公开文档的 /alpha/generate 接口;接口和 CLI 版本要求可能随时变化。使用前请核对服务条款、账号授权和实际计费。这里的 “Subscription” 是项目名称,不是 ChatGPT/Codex 订阅,也不表示支持 OAuth 登录。

功能

| 功能 | 当前实现 | | --- | --- | | 模型对话 | 从公开模型目录刷新列表;启动查询失败会后台重试,离线时暂时展示一个内置占位模型。目录不代表账号权限。 | | 模型设置 | 选择 Command Code 模型后,输入框右侧的齿轮弹层提供模型搜索、已核实模型的思考等级,以及目录中可用的标准/快速/极速模型变体。思考等级会随生成请求传给 Command Code。 | | 流式输出 | 将原生 NDJSON 转成 DSH 文本、推理、工具调用和工具结果事件;支持取消。 | | 图片理解 | 对已知支持图片的模型开放 DSH 图片附件,并将受限大小的图片转为原生请求内容。 | | 凭证与多账户 | 在 DSH 设置中单独的 Command Code 账户 页面添加多个 API Key、切换当前账户或登出。Key 保存在 DSH 宿主凭证记录中;原有 COMMANDCODE_API_KEY 首次作为账户导入。 | | 用量查询 | 在插件设置中打开用量对话框;选择 Command Code 模型时,输入框右侧显示 5h 额度小条,悬浮可查看 5h、1w、1m 额度和进度条,每 30 秒刷新。仅在服务商返回额度上限时计算百分比。 | | 语言 | 英文与简体中文的运行时提示词典;按请求提供的 locale 解析,未提供或不支持时回退英文。无需改动词典框架即可增加其他语言。 |

准备 DSH

使用兼容的 DeepSeek Harness(版本范围以 package.json 的 engines.dsh 为准)和 Command Code 提供的 user_... API Key。请勿将 ChatGPT OAuth token 当成 Command Code Key。使用命令行构建需 Node.js 22.19+ 与 pnpm。

安装

在 DSH 的 Plugins → Add plugin 页面,可选择以下任一来源并粘贴到 Package name or address:

  • GitHub(仓库源码):github:LingBrian/dsh-commandcode-subscription
  • npm(发布后):[email protected]

点击 Install 并按提示重启。GitHub 仓库包含预构建的插件入口,不需要安装时运行构建脚本;npm 方式安装已发布的预构建包。若安装新版本,可将 npm 地址中的版本号换成所需版本。

**Desktop 安装:**在 DSH Desktop 应用中打开 Plugins → Add plugin,粘贴上述任一地址并安装;按提示重启应用。桌面端和 Web 端使用各自的插件 profile,需分别安装。若已安装桌面版 CLI,也可显式安装到对应 profile:

dsh plugin --profile desktop add github:LingBrian/dsh-commandcode-subscription
# 或
dsh plugin --profile desktop add [email protected]

已有 CLI 的 Web profile 安装命令:

dsh plugin --profile web add [email protected]

从源码打包(开发或离线安装)时,在仓库根目录执行:

pnpm install --frozen-lockfile
pnpm run check
pnpm pack --pack-destination .artifacts

再将生成的 .artifacts/*.tgz 作为插件地址安装。npm 安装地址使用已发布的版本号。

在 DSH 凭证管理器中配置 COMMANDCODE_API_KEY;或在启动 DSH 的进程环境中设置同名变量(由宿主凭证服务解析环境回退)。不要把 Key 填入插件配置、聊天消息或其他网站。模型加载后选择 commandcode-go 提供者的模型。没有 Key 时不会向上游发起生成请求。

**多账户:**打开 DSH 设置中的 Command Code 账户 独立页面。点击 登录,输入 Command Code API Key 并保存;插件会先向 Command Code 验证,再将 Key 写入 DSH 凭证记录。每张账户卡第一行显示账号与订阅类型,第二行显示 5h、1w、1m 的剩余额度进度条。点击卡片左侧复选框切换当前对话账户;顶部 登出 会移除当前账户,并在尚有其他账户时自动选择下一账户。页面可手动刷新,且在可见时每 30 秒查询一次。原有 COMMANDCODE_API_KEY 在首次添加新账户时一并导入;登出所有账户后不会自动重新启用该旧 Key。新输入的 Key 只经由 DSH 连接提交给宿主,不会写入浏览器持久存储。一个插件配置最多保存 10 个账户。

**查看用量:**在插件设置中找到 Command Code 用量,点击 查看用量。对话框按需通过 DSH 宿主读取 Command Code 账户接口;API Key 不会发送到浏览器。可刷新当前用量。部分接口失败时仍显示已获得的数据,并标注数据不完整。额度单位和计费以 Command Code 账户页面为准。

**模型设置:**选中 Command Code 模型后,点击输入框右侧的齿轮,可在同一弹层切换模型、思考等级和速度。思考等级只对已核实支持该参数的模型显示,选“模型默认”则不发送 reasoning_effort。速度通过切换 Command Code 目录中的独立模型 ID 实现;只有当前目录同时提供同一系列的多个变体时才显示“速度”。切换模型或速度后,请按新模型重新选择可用的思考等级。

若网络或宿主连接长时间无响应,用量对话框会在 35 秒后提示超时;可点击 刷新 重试。模型目录在启动时查询失败后也会自动重试,成功后更新 DSH 模型列表。

**图片理解:**选择目录中标有图片输入能力的模型(例如 deepseek/deepseek-v4.1-flash 或 deepseek/deepseek-v4-flash-vision-exp),在 DSH 输入框添加图片后发送。视觉能力名单依据 Command Code 官方模型表维护,并与当前目录交集显示。图片由 DSH 附件服务处理,单张请求图片最大 1 MiB、尺寸预算约 2048 × 2048 像素,单次请求的编码图片总量最大 20 MiB。模型是否可用仍取决于 Command Code 账号权限;公开目录并不保证权限。

使用与限制

0.1.4 修复

  • 将 DSH 历史中的开发者指令并入上游系统提示词,修复对话开始前的请求构造错误。

  • 接受 Command Code 多步骤响应、复用事件 ID 和省略文本结束事件的流,修复输出部分内容后中断的问题。

  • 失败信息按请求构造、网络请求和响应解析阶段区分;不回显上游错误正文或 API Key。

  • 仅向固定的 https://api.commandcode.ai HTTPS 源站发送生成请求和凭证。模型目录请求无需 Key。网络或流失败后不自动重放生成请求;缺少终止事件会报错。

  • 尚不支持 OAuth、账户管理、多 Key 轮换或 OpenAI/Anthropic 兼容代理;不承诺某个公开模型一定可用。图片能力仅对已知模型开放,不代表目录中所有模型都支持视觉输入。

  • 模型描述符中的零美元成本只是 pi-ai 必需的占位数值,并不意味着免费。请以服务商实际计费为准。

  • 运行时错误支持中英词典,但本插件没有单独的语言切换界面;未收到有效 locale 时显示英文,不保证自动跟随 DSH 网页语言。

  • 测试使用模拟上游和 DSH 适配器包,尚未使用真实账号或在运行中的 DSH Web / 桌面界面做端到端验收。

开发

pnpm install --frozen-lockfile
pnpm run check

源代码在 src/,lib/ 是随仓库提交的构建产物,供 GitHub 安装来源直接使用;修改源码后运行 pnpm run build 并提交对应的 lib/ 更新。测试在 tests/。新增语言时增加词典并登记语言代码,保持键和占位符一致,运行测试验证回退。不要提交密钥、日志或包含真实账号数据的 fixture。

参考项目

各项目许可证和上游服务条款独立。本项目使用 MIT 许可证。