songoao25/dsh-chatgpt-sub

ChatGPT Subscription - a DeepSeek Harness plugin: bind your ChatGPT account via official OAuth and chat with ChatGPT models inside DSH, using your Plus/Pro subscription quota

Project Overview项目介绍

dsh-chatgpt-sub is an official plugin built for the DeepSeek Harness (DSH) desktop app and CLI profile (web), and its only job is to bind a personal ChatGPT account to DSH through OpenAI's official OAuth flow. The sign-in uses the full PKCE plus state sequence against auth.openai.com, the same mechanism used by Codex CLI and OpenCode, and the plugin page is reached through Plugins -> ChatGPT Subscription -> Sign in with ChatGPT. Tokens are written to ~/.codex/auth.json with 0600 permissions in the standard Codex CLI location and into DSH's credential store, never into logs or the repository itself, and the local OAuth callback server binds 127.0.0.1 only, validates state for CSRF, and times out after five minutes.

Once bound, ChatGPT models such as gpt-5.6-terra, gpt-5.5 and gpt-5.4 surface in the DSH model switcher under provider ChatGPT, and selecting one consumes the user's ChatGPT Plus or Pro subscription quota rather than a separately billed API key. A token guardian refreshes the access token before expiry with JWT awareness and a forty-five-minute threshold, runs at startup and every thirty minutes, and on failure keeps the last known good state instead of crashing. The status page shows the bound account, sign-in validity and remaining time, with Sign in / Sign in again / Unbind actions, while unbinding preserves the existing ~/.codex/auth.json so the Codex CLI login stays intact.

Installation requires DSH (desktop or a CLI profile booted via dsh web), pnpm, and an active ChatGPT Plus or Pro subscription. The desktop app manages its own desktop profile, so dsh plugin --profile desktop is refused by design and Plugins -> Add plugin is the only path there, accepting the npm name dsh-chatgpt-sub or the repository address (lib/ is committed, so no build step or build-script approval runs); the CLI equivalent is dsh plugin --profile web add dsh-chatgpt-sub, and the companion dsh-bottom-info-bar can be added to display the 5-hour, weekly and monthly quota windows with reset times. The package is MIT-licensed, ships zero runtime dependencies with react only as a peer, and the first-run caveat is that DSH must be fully restarted because plugins are composed when the host process starts.

dsh-chatgpt-sub 是面向 DeepSeek Harness(DSH)桌面端与 CLI 的官方插件,让用户通过 OpenAI 官方 OAuth(PKCE+state)流程绑定 ChatGPT 账户,把 ChatGPT Plus / Pro 订阅配额中的模型(例如 gpt-5.6-terra、gpt-5.5、gpt-5.4)以 provider "ChatGPT" 形式注入到 DSH 模型切换器。安装方式包括 DSH 内"插件 → 添加插件"输入包名或仓库地址(lib/ 已提交,无需构建),以及 CLI 的 dsh plugin --profile web add dsh-chatgpt-sub;桌面端由 dsh 自管 desktop profile,CLI 拒绝 --profile desktop。令牌写入 ~/.codex/auth.json(0600,与 Codex CLI 共享位置),仅本机与 auth.openai.com、chatgpt.com 通信,绝不外泄或写入日志。

绑定后用户在 DSH 中选择 ChatGPT 模型即直接调用,消耗的是订阅配额而非单独 API key。插件启动时与每 30 分钟做一次令牌自动刷新,JWT 感知且阈值 45 分钟,刷新失败保留最近可用状态而不崩溃;状态页显示绑定账号、登录有效性、剩余时间,并提供"登录/重新登录/解绑"操作。Codex CLI 已有登录保持原状,不会被静默复用;解绑只清除本插件写入的绑定标记、openai-codex 路由与 OPENAI_CODEX_API_KEY 凭据,不动 ~/.codex/auth.json。可选配合 dsh-bottom-info-bar 显示 5 小时/周/月窗口配额与重置时间。

依赖方面需要 DSH 桌面端或带 web 界面的 CLI(dsh web)、包管理器 pnpm,以及 ChatGPT Plus 或 Pro 订阅;运行期零依赖,react 仅作为 peer。许可证 MIT,免费使用,仅在官方 openai 端点发起网络调用,回调服务器绑定 127.0.0.1、校验 state、5 分钟超时。首次运行需重启 DSH 让插件在宿主进程启动时组装,仅刷新页面不够;老仓库地址 dsh-chatgpt-subscription 已重定向,包名标准化到 dsh-chatgpt-sub 后绑定数据自动迁移,无需重新登录。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 dsh-chatgpt-sub

把 songoao25/dsh-chatgpt-sub 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

ChatGPT Subscription

English | 中文

License: MIT Release CI Last Commit Stars Dependabot

A DeepSeek Harness plugin: sign in with your ChatGPT account through OpenAI's official OAuth flow, then use ChatGPT models inside DSH. Model calls use your ChatGPT Plus / Pro subscription quota.

Official sign-in — Open Plugins, then ChatGPT Subscription, and click Sign in with ChatGPT. Approve in the browser and the account is bound. No API keys, no config files.

Features

  • Official OAuth binding — Full PKCE + state flow against auth.openai.com, the same official mechanism used by Codex CLI and OpenCode. Your tokens are exchanged directly with OpenAI; the plugin never sees or stores your password.
  • Strict official mode — Only an authorization completed through this plugin's page counts as bound. Your existing codex CLI login is left alone and is never silently reused.
  • ChatGPT models in DSH — After binding, ChatGPT models (e.g. gpt-5.6-terra, gpt-5.5, gpt-5.4) appear in the DSH model switcher as provider ChatGPT. Selecting one talks to ChatGPT directly and consumes your subscription quota.
  • Token guardian — The access token is auto-refreshed before expiry (JWT-aware, refresh threshold 45 min) and injected into DSH credentials. Runs once at startup and every 30 minutes; on failure it keeps the last known good state instead of crashing.
  • Status page — The plugin page shows the bound account, sign-in validity and time remaining, with Sign in with ChatGPT / Sign in again / Unbind actions.
  • Companion to Bottom Info Bar — This plugin owns binding and token maintenance; the Bottom Info Bar reads the token to display your ChatGPT quota (5-hour / weekly / monthly windows and reset times). You can use this plugin without the info bar, but the info bar's ChatGPT quota display requires this plugin.

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-search-index 下一个 Next dsh-usage-suite →