songoao25/dsh-chatgpt-subscription
ChatGPT 订阅 - 一个 DeepSeek Harness 插件:通过官方 OAuth 绑定您的 ChatGPT 账户,在 DSH 内使用您的 Plus/Pro 订阅配额与 ChatGPT 模型对话。
项目介绍Project Overview
DSH 插件,通过 OpenAI 官方 OAuth 流程绑定 ChatGPT 账户,让用户在 DSH Web 界面直接调用 gpt-5、codex 等模型,并按 Plus/Pro 订阅配额计费,无需 API Key。核心能力包括 PKCE 授权、自动刷新令牌、绑定状态页及一键解绑。适用于想用既有订阅在 DSH 内聊天、又不想手动配置密钥的用户。注意:需有效 ChatGPT Plus 或 Pro 订阅,且部分模型仅对高阶套餐开放。
A DSH plugin that binds a ChatGPT account via OpenAI's official OAuth flow, letting users chat with gpt-5 and codex models inside the DSH web UI using their Plus/Pro subscription quota, with no API key required. Capabilities include PKCE-based sign-in, automatic token refresh, a bind status page, and one-click unbind. It suits users who want to use an existing subscription inside DSH without manual key configuration. Note: an active ChatGPT Plus or Pro plan is required, and certain models are restricted to higher tiers.
请帮我了解并安装插件:【dsh-chatgpt-subscription】【https://github.com/songoao25/dsh-chatgpt-subscription】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:songoao25/dsh-chatgpt-subscription
把 songoao25/dsh-chatgpt-subscription 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-chatgpt-subscription
English | 中文
A DeepSeek Harness plugin that lets you sign in with your ChatGPT account using the official OAuth flow and chat with ChatGPT models inside DSH, consuming your ChatGPT Plus / Pro subscription quota.
One-click official sign-in — Click 授权登录 on the new 「订阅」page in DSH Settings → your browser opens OpenAI's official authorization page → approve → you're bound. No API keys, no command line, no config file editing.
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 settings page counts as bound. Your existing
codexCLI 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.
- Bind status page — The Settings → 订阅 page shows bound/unbound status, token expiry and remaining time, with 授权登录 / 重新授权 / 解绑 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.
Requirements
- DeepSeek Harness (
dshCLI) running the web interface (dsh web) - pnpm (used by
dsh plugin) - A ChatGPT Plus or Pro subscription (or a plan that includes Codex quota)
Installation
Option 1 — One-command script (recommended)
git clone https://github.com/songoao25/dsh-chatgpt-subscription.git
cd dsh-chatgpt-subscription
./install.sh # installs to the "web" profile; use --profile <name> to override
Option 2 — dsh plugin command
git clone https://github.com/songoao25/dsh-chatgpt-subscription.git
cd dsh-chatgpt-subscription
npm run build # build lib/ from src/
dsh plugin --profile web add .
Restart
dsh webafter installing. Plugins are composed when the host process starts; a page refresh alone is not enough.
Usage
- Restart
dsh web, then open Settings (⚙️) in the sidebar. - Click 订阅 (right below 模型).
- Click 授权登录 — your browser opens the official OpenAI sign-in page.
- Sign in with your ChatGPT account and approve. The page shows 已绑定 when done.
- Open a new conversation, switch the model to a ChatGPT model (provider ChatGPT, e.g.
gpt-5.6-terra) and chat — usage counts against your subscription.
If the browser tab doesn't open automatically, the page also calls
window.openas a fallback; allow pop-ups for DSH if prompted.
Security
- Tokens are stored only in
~/.codex/auth.json(0600, the standard location shared with Codex CLI) and in DSH's credential store — never in logs, never in this repository. - The local OAuth callback server binds 127.0.0.1 only, validates
state(CSRF protection), and times out after 5 minutes. - Unbinding removes the binding flag and the injected credential, but keeps
~/.codex/auth.jsonuntouched — your Codex CLI login stays intact. - Zero runtime dependencies (only
reactas a peer for the client half); no network calls except the official OpenAI endpoints.
Uninstall
cd dsh-chatgpt-subscription
./uninstall.sh # removes the plugin and the injected route/credential
Uninstall keeps ~/.codex/auth.json (your Codex CLI login) and only cleans what this plugin added: the binding flag, the openai-codex provider route, and the OPENAI_CODEX_API_KEY credential.
FAQ
Q: Do I need a ChatGPT Plus subscription?
Yes — the plugin connects your ChatGPT account; chatting with ChatGPT models consumes your subscription quota (models available depend on your plan, e.g. gpt-5.3-codex-spark requires a higher plan).
Q: Does this share my tokens?
No. Everything happens between your machine and auth.openai.com / chatgpt.com. Tokens never leave your machine and are never logged.
Q: What if the token expires? The plugin auto-refreshes it before expiry. If refresh fails (e.g. revoked), the settings page shows a clear hint to re-authorize.
Q: Does this affect my Codex CLI login?
No. The plugin writes to the same standard ~/.codex/auth.json location and preserves its structure; unbinding doesn't delete it.
Q: Can I see my quota? Install the companion Bottom Info Bar plugin — it reads the token this plugin maintains and displays your ChatGPT quota (remaining percent and reset time) in the bottom info bar.
License
MIT © 2026 songoao25
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
esengine/DeepSeek-Reasonix
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/distilly
titanwings/colleague-skill