yoke233/dsh-openai-codex-auth
DeepSeek Harness 的 OpenAI Codex OAuth 登录与使用卡片插件
Project Overview项目介绍
This is a native DSH plugin built exclusively to integrate OpenAI Codex subscriptions with DeepSeek Harness. To install the plugin, users run a single CLI command: dsh plugin --profile web add github:yoke233/dsh-openai-codex-auth, then restart the DSH web profile to activate it. After installation is complete, users can open the DSH web interface, navigate to Settings > OpenAI Codex, and click the "Login OpenAI" button to start the OAuth flow on OpenAI's official authorization site. Once authorization is finished, users just return to DSH and select openai-codex as their model provider in the model settings. It supports both the DSH web interface and terminal UI (TUI), so users can manage their login and settings through whichever interface they prefer.
This plugin is intended for any DeepSeek Harness user who wants to use their existing OpenAI Codex subscription inside the DSH environment instead of connecting through OpenAI's official site. After initial login, the plugin automatically refreshes credentials when they are close to expiring, so users do not have to manually re-login every time their token expires. It also pulls the latest list of available Codex models from OpenAI using the authenticated credentials, and users can trigger a manual refresh via the TUI command /refresh-codex-models any time they want. The plugin will not automatically poll for model updates on a schedule, which helps reduce unnecessary API calls.
The plugin requires no extra configuration by default, and it stores all credentials locally on the user's machine. By default, credentials are stored in $DSH_HOME/openai-codex-auth.json, but users can set a custom storage path in their Cordis configuration if they need to store credentials in a different location. The plugin follows strict security practices: it uses PKCE for OAuth, stores all credentials with owner-only file permissions, and all callback services only listen on the 127.0.0.1 loopback address. Users must complete the authorization flow on the same machine that is running the DSH web profile, and the plugin is released under the open source MIT license, and it is completely free to use and modify.
这是一个专为 DeepSeek Harness 开发的原生插件,核心功能是帮助用户通过 OAuth 授权将个人或企业的 OpenAI Codex 订阅接入 DSH。它负责完成 OpenAI 账号登录、凭据自动续期、用量查询展示,并将有效令牌注入 DSH 的 openai-codex 模型提供方,同时支持 DSH 的 Web 界面和 TUI 两种交互模式。
面向需要在 DSH 中使用 OpenAI Codex 模型的用户,安装流程十分简便,只需通过 DSH CLI 将插件添加到目标 web 配置文件,重启配置后即可开始使用。用户可在 DSH Web 的设置页完成 OAuth 登录,TUI 模式下也能通过指令刷新已同步的 Codex 模型列表,插件默认仅在首次登录成功时同步一次模型。
插件默认无需额外配置,凭据默认存储在 DSH 根目录下的 openai-codex-auth.json,也可自定义存储路径。所有凭据仅保存在本地,严格遵循最小权限和安全校验规则,所有回调服务仅监听本地回环地址。插件采用 MIT 许可证开源,完全免费使用,要求用户在运行 DSH 的本机完成授权操作。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-openai-codex-auth(yoke233/dsh-openai-codex-auth)
仓库:https://github.com/yoke233/dsh-openai-codex-auth
本站详情页:https://www.yhbd.top/plugins/yoke233-dsh-openai-codex-auth/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 12 · 最近提交 2026-09-28 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 12 stars - an early-stage project星标 12,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:yoke233/dsh-openai-codex-auth
把 yoke233/dsh-openai-codex-auth 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
把 ChatGPT 订阅登录接入 DeepSeek Harness。
在 DSH 设置页完成 OpenAI OAuth 登录、查看 Codex 用量,并自动向 openai-codex 模型提供方提供有效凭据。
快速开始 · 功能一览 · 工作方式 · 配置 · 凭据处理边界
快速开始
需要 DeepSeek Harness 0.1.7-rc.2。该版本内置的 @deepseek-ai/dsh-llm-pi-ai 已提供 openai-codex provider;本插件把续期后的 OAuth access token 通过 credentials 引用交给该 provider,不会把令牌写入 profile 配置。
将插件安装到 DSH 的 web profile:
dsh plugin --profile web add github:yoke233/dsh-openai-codex-auth
启动或重启该 profile:
dsh --profile web
然后完成首次连接:
- 打开 DSH Web,进入 设置 → OpenAI Codex。
- 点击 登录 OpenAI,在弹出的 OpenAI 官方授权页完成登录。
- 返回 DSH,在 设置 → 模型提供方 中选择
openai-codex。
TUI 也可以直接开始登录或同步当前账号的可用模型:
/login-codex
/refresh-codex-models
插件仅在登录成功后自动同步一次;之后只会在执行同步命令或点击 Web 设置页的 同步模型 时再次请求,不会定时轮询模型目录。每次同步会先从官方 npm registry 读取 @openai/codex 最新版本,再用该版本请求账号模型目录;并发触发会合并为同一次同步。同步使用 Settings 的路径修改,只替换 llm-pi-ai 下 openai-codex.models,不会覆盖该 provider 的凭据引用等其他配置。
[!IMPORTANT] 登录管理接口只监听
127.0.0.1。请在运行 DSH Web profile 的同一台电脑上打开设置页并完成授权。
功能一览
| 能力 | 说明 |
|---|---|
| OpenAI 订阅登录 | 通过 OAuth 连接 ChatGPT Plus、Pro、Team 或 Enterprise 账号 |
| Codex 用量面板 | 展示短周期与周用量、剩余额度和重置时间 |
| 自动凭据续期 | 在令牌接近过期时刷新,并更新本地凭据 |
| DSH 模型接入 | 将有效令牌提供给 openai-codex 模型提供方 |
| 账号模型同步 | 使用当前 OAuth 凭据读取 Codex 模型目录,并更新 DSH 可选模型 |
| 设置页管理 | 支持查看状态、刷新用量、重新登录和退出登录 |
工作方式
- 插件生成 PKCE verifier、challenge 和随机
state,再打开 OpenAI 授权页。 - OpenAI 将授权结果返回到本机
localhost:1455;插件校验state并交换令牌。 - 凭据继续原子写入
$DSH_HOME/openai-codex-auth.json(版本 1 格式);升级不会要求重新登录。访问令牌同时通过 DSH credentials 中的DSH_OPENAI_CODEX_TOKEN引用交给openai-codexprovider。 - 设置页操作会先通过 DSH Web Host 唤醒
127.0.0.1:1456,完成单次状态、刷新或退出请求后立即关闭。
控制服务 127.0.0.1:1456 不常驻:Web 设置页操作时按需启动,单次请求完成后关闭;登录期间保持到授权成功、失败或取消。TUI 的 /login-codex 直接启动临时 OAuth 回调端口 localhost:1455,流程结束或取消时关闭。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Q00/ouroboros
crafter-station/petdex
whiteguo233/OpenBiliClaw
anywhere-labs/Agents-Anywhere
agentrq/agentrq
freestylefly/wesight