yoke233/dsh-openai-codex-auth 预览 preview

yoke233/dsh-openai-codex-auth

Plugin插件 Native原生 ⭐ 12 MIT Models & Routing模型与路由

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 的本机完成授权操作。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 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

dsh-openai-codex-auth:在 DeepSeek Harness 中完成 OpenAI Codex 订阅登录、用量查看与本地凭据接入

把 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

然后完成首次连接:

  1. 打开 DSH Web,进入 设置 → OpenAI Codex。
  2. 点击 登录 OpenAI,在弹出的 OpenAI 官方授权页完成登录。
  3. 返回 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 可选模型
设置页管理 支持查看状态、刷新用量、重新登录和退出登录

工作方式

OpenAI OAuth 授权经本机回调写入受保护凭据,再供 openai-codex 提供方和 DSH 用量面板使用

  1. 插件生成 PKCE verifier、challenge 和随机 state,再打开 OpenAI 授权页。
  2. OpenAI 将授权结果返回到本机 localhost:1455;插件校验 state 并交换令牌。
  3. 凭据继续原子写入 $DSH_HOME/openai-codex-auth.json(版本 1 格式);升级不会要求重新登录。访问令牌同时通过 DSH credentials 中的 DSH_OPENAI_CODEX_TOKEN 引用交给 openai-codex provider。
  4. 设置页操作会先通过 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 →

← 上一个 Prev dsh-client-ui-skins 下一个 Next dsh-plannotator →