dsh-codex-subscription
消息通讯 活跃维护

dsh-codex-subscription

WSL043/dsh-codex-subscription

通过OAuth登录直接使用ChatGPT/Codex订阅模型,无需OpenAI API Key,支持订阅搜索与额度显示,免装额外客户端,登录即可开用。

17
Stars 标星
1
Forks 分支
17
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
2.4 MB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:WSL043/dsh-codex-subscription
git clone https://github.com/WSL043/dsh-codex-subscription.git
git clone git@github.com:WSL043/dsh-codex-subscription.git
README.md main

DSH Codex Subscription

**把 ChatGPT / Codex 订阅直接接入 DeepSeek Harness** 在 DeepSeek Harness 中直接登录 ChatGPT 并使用 Codex 订阅。无需 OpenAI API Key,也不依赖 Codex CLI; 模型、搜索、额度和图片生成都留在 DSH 里。 [![CI](https://cdnimage-cache.doubi.ren/?url=https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml/badge.svg)](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml) [![npm](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/npm/v/dsh-codex-subscription?logo=npm&label=npm)](https://www.npmjs.com/package/dsh-codex-subscription) [![npm downloads](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/npm/dt/dsh-codex-subscription?logo=npm&label=downloads)](https://www.npmjs.com/package/dsh-codex-subscription) [![MIT](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/license-MIT-111111.svg)](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/LICENSE) [![Star](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/github/stars/WSL043/dsh-codex-subscription?style=flat&logo=github&label=Star)](https://github.com/WSL043/dsh-codex-subscription/stargazers) [交给 Agent 安装](#交给-agent推荐) · [Windows 安装](#windows-手动安装) · [更新与卸载](#更新与卸载) · [English](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.en.md)

Codex 订阅直接用在 DSH:订阅模型、联网搜索、实时额度和图片生成

核心优势

能力 用户得到什么
Codex 图片生成 在 DSH 对话里直接描述画面,生成结果会显示在当前会话中
订阅模型直连 登录 ChatGPT 后直接使用 Codex,不需要 OpenAI API Key 或 Codex CLI
订阅搜索 可在 DSH 默认搜索与 Codex 订阅搜索之间明确切换
额度可见 普通 Codex、Spark 等服务端实际返回的额度分开显示
高速模式(Beta) 直接在输入框切换标准或高速,无需离开当前会话

这些能力共用同一份本机 ChatGPT 登录。订阅路由失败时会明确报错,不会静默切换到其他付费路由。

实际界面

DeepSeek Harness 中的 Codex 订阅设置

查看完整设置界面 ![DeepSeek Harness 的完整 Codex 订阅设置](https://cdnimage-cache.doubi.ren/?url=https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/settings.png)

准备 DSH

本插件适配 DeepSeek Harness 0.1.0-rc.60.1.0-rc.70.1.0-rc.8,并需要一个当前具有 Codex 使用资格的 ChatGPT 账户。

安装

想先体验输入框高速模式,可安装 Beta;它不会替换 npm 的稳定版:

dsh plugin --profile web add dsh-codex-subscription@1.1.0-beta.0

交给 Agent(推荐)

把这个链接直接发给 Agent:

Agent 安装、更新与卸载文档

https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md

Agent 文档包含安装、更新、卸载和验收步骤,并要求保留 DSH profile、登录信息和其他插件。

Windows 手动安装

打开 PowerShell,只需要复制这一行:

irm 'https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex-setup.ps1' | iex

这个轻量助手只在当前目录、系统命令和常见的
DSH-Portable 位置查找 DSH,然后调用一次官方
plugin add。它不会递归扫盘、安装 pnpm、创建常驻命令、保存 profile 快照或重复下载插件。
无需管理员权限,也不会擅自重启 DSH。

macOS、Linux,或已有 dsh 命令(通用安装) ```sh dsh plugin --profile web add dsh-codex-subscription dsh plugin --profile web list dsh-codex-subscription --depth 0 dsh --profile web --dump-config ``` 安装列表中应只有一个 `dsh-codex-subscription`,配置中应只有一个 `codex-subscription` 条目。

安装完成后手动重启 DSH,然后:

  1. 打开 设置 -> Codex 订阅
  2. 登录具有 Codex 使用资格的 ChatGPT 账户;
  3. 选择搜索来源;
  4. 在模型选择器中选择 Codex 模型。

功能

  • ChatGPT OAuth 登录,凭据保留在本机;
  • Codex 模型和图片生成直接出现在 DSH 会话中;
  • DSH 默认搜索与 Codex 订阅搜索可随时切换;
  • 设置页显示服务端返回的额度、重置时间和更新时间;
  • 普通 Codex、Codex-Spark、Credits 等独立额度分开显示;
  • 输入框可显示当前 Codex 模型的剩余额度(Beta,默认关闭);
  • 输入框可为支持的 Codex 模型切换标准或高速模式(Beta);
  • 订阅路由不可用时明确报错,不会静默切换到其他付费路由。

输入框额度

输入框内的 Codex 剩余额度

快捷百分比只在选择 Codex 模型时显示。普通 Codex 使用服务端返回窗口中剩余最少的一项,
Spark 使用独立额度。插件不会写死“5 小时 + 每周”,也不会虚构服务端没有返回的 Credits 或消费上限。

输入框速度(Beta)

选择支持的 Codex 模型后,模型名称左侧会显示 或闪电。点击即可切换标准与高速;
Spark 不显示这个入口。高速模式会提高速度,也会消耗更多 Credits;具体规则见
OpenAI Codex Speed 文档

更新与卸载

Windows 用户重新运行上面的单行助手即可更新。卸载使用 DSH 官方命令;两种操作都保留
DSH profile、其他插件和登录信息。

使用现有 dsh 命令更新或卸载 ```sh dsh plugin --profile web update dsh-codex-subscription dsh plugin --profile web list dsh-codex-subscription --depth 0 dsh --profile web --dump-config dsh plugin --profile web remove dsh-codex-subscription ``` 从 v0.2.1 手动迁移时,确认新包安装成功后再移除旧包名: ```sh dsh plugin --profile web remove @wsl043/dsh-codex-subscription ```

DSH-Portable 在其目录中把上述 dsh 换成 .\dsh.exe

常见问题

  • 找不到 DSH-Portable:进入它的目录后重新执行安装命令,或直接运行 .\dsh.exe plugin --profile web add dsh-codex-subscription
  • 电脑上有多个 DSH:进入要使用的那个 DSH-Portable 目录再运行助手;
  • 安装仍然失败:把上面的 Agent 文档链接发给 Agent,不要删除 profile 或随意修改系统 PATH。

边界与支持

ChatGPT Codex 后端和 DSH 可能独立变化;本项目为社区项目,与 DeepSeek、OpenAI 无隶属或背书关系。

本项目的问题反馈请使用 GitHub Issues
DSH 插件交流可前往 DeepSeek Harness Discussions
敏感问题请先阅读 SECURITY.md

如果这个项目对你有帮助,点一下 Star 可以让更多 DSH 用户发现它。

MIT