dsh-codex-auth
Use the local Codex CLI ChatGPT login as a DeepSeek Harness LLM route, with a native GPT Auth settings card
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:suntianc/dsh-codex-auth说明文档
阅读完整 README ↗dsh-codex-auth
English | 中文
这是一个自包含的 DeepSeek Harness
插件:复用官方 Codex CLI 维护的 ChatGPT 登录态(~/.codex/auth.json,或
$CODEX_HOME/auth.json),注册 openai-codex LLM 路由,并在 Harness 设置中增加
原生风格的独立 GPT Auth 分区。
⚠️ 非官方通道——仅限个人开发。 pi-ai 的 Codex provider 使用非官方
chatgpt.com/backend-api,可能随时被限流、撤销或变更,不得用于生产。
功能
- 使用已安装的 pi-ai provider 注册
openai-codex路由。 - 仅在需要时读取 Codex access token,并在到期前通过官方 OAuth token 端点刷新。
- 启动官方
codex login浏览器登录或设备码登录流程。 - 使用 DSH 原生按钮、状态点和语义 token,提供独立
GPT Auth设置分区;菜单使用 DSH 默认齿轮图标。 - 使用插件自有、仅允许 loopback 的
/codex-authConnection RPC。 - token 值不会发送到浏览器、Harness 设置或日志。
- 不修改 Harness Web shell、apiproxy 或源码。
环境要求
- DeepSeek Harness
0.1.0-rc.6或兼容的后续0.1.x版本。 - Node.js
^22.19.0或>=24.0.0。 codexCLI 已加入PATH。- 可提前执行
codex login,也可在 GPT Auth 卡片中启动登录。
从 GitHub 安装
安装到实际运行的 profile:
dsh plugin --profile web add github:suntianc/dsh-codex-auth
Git 依赖会通过包内 prepare 脚本从源码构建。pnpm 10+ 默认阻止该脚本,因此第一次
安装可能打印 allowBuilds 键并停止。把 dsh 输出的完整键 加到
~/.dsh/profiles/web/pnpm-workspace.yaml 的 allowBuilds 下,再重新执行安装。只应在
审查并信任源码后授权。
需要可复现安装时,固定 release tag 或 commit:
dsh plugin --profile web add github:suntianc/dsh-codex-auth#v0.1.0
重启 dsh web,打开设置并选择 GPT Auth。
从 tarball 安装
Tarball 已包含 Host 与浏览器构建产物,不需要安装期构建权限:
git clone https://github.com/suntianc/dsh-codex-auth.git
cd dsh-codex-auth
pnpm install
pnpm pack
dsh plugin --profile web add ./dsh-codex-auth-0.1.0.tgz
以后发布到 npm 后,可直接执行:
dsh plugin --profile web add dsh-codex-auth
配置
插件行字段全部可选: