Bundle
dsh-claude-subscription
Claude Pro/Max subscription for DeepSeek Harness with official Anthropic OAuth login and automatic token refresh
- Source
- x5427876
- License
- MIT
- Updated
- Updated yesterday
Readme
# DSH Claude Subscription [](https://www.npmjs.com/package/dsh-claude-subscription) [](LICENSE) [English](README.en.md) 在 DeepSeek Harness 中直接登入 Claude Pro / Max 訂閱並使用 Claude 模型, 不需要 Anthropic API Key。登入與 token 續期走 Anthropic 官方 OAuth 流程 (與 Claude Code 相同),憑證保留在 DSH 本機 credential service, 不抽取、不轉售、不額外計費。 [交給 Agent 安裝](#交給-agent推薦) · [手動安裝](#手動安裝) · [更新與解除安裝](#更新與解除安裝) ## 能做什麼 - 在 DSH 中直接使用 Claude Pro / Max 訂閱,不需要 Anthropic API Key; - 在**設定 → 模型**的 Anthropic 卡片或**設定 → Claude 訂閱**中,以官方 OAuth 流程登入 claude.ai,憑證保留在 DSH 本機; - access token 過期時自動以 refresh token 續期,不需手動處理; - 顯示登入狀態; - 顯示**訂閱額度**:5 小時、7 天、Opus 與 Sonnet 的剩餘百分比與重置時間; - **輸入框額度**開關(預設關閉):開啟後在對話輸入框右側顯示目前模型的剩餘額度; - 訂閱路由不可用時明確報錯,不會靜默切換到其他付費路由。 ## 準備 DSH 本插件目前僅適配 DeepSeek Harness `0.1.2-alpha.5`,需要一個 Claude Pro、 Max、Team 或 Enterprise 訂閱帳號。DSH 仍在 developer preview;npm 的 `latest` / `next` 通道若不是 `0.1.2-alpha.5`,不在本版本的支援範圍。 安裝前請先以 `dsh --version` 確認版本;不要只忽略 peer dependency 警告。 ## 安裝 ### 交給 Agent(推薦) 把下面的連結直接發給 Agent。文件包含安裝、更新、解除安裝與驗收步驟; 它不會刪除 DSH profile、登入資訊,也不會未經許可重啟 DSH。 [開啟 Agent 安裝文件](https://raw.githubusercontent.com/x5427876/dsh-claude-subscription/main/AGENTS.md) ```text https://raw.githubusercontent.com/x5427876/dsh-claude-subscription/main/AGENTS.md ``` ### 手動安裝 已有 `dsh` 指令時: ```sh dsh plugin --profile web add dsh-claude-subscription dsh plugin --profile web list dsh-claude-subscription --depth 0 dsh --profile web --dump-config ``` DSH Desktop(桌面版)時,把 `pnpm pack` 產出的 tarball 放進 `~/.dsh/profiles/<profile>/`,在該 profile 的 `package.json` 加入 `file:` 依賴與 `dsh.profile.bundles` 條目,然後在該目錄執行 `pnpm install`,最後重啟 DSH。安裝後: 1. 開啟 DSH 的**設定 → 模型**,找到 Anthropic;完整額度資訊仍位於 **設定 → Claude 訂閱**。 2. 若尚未登入,按**瀏覽器登入**,在 claude.ai 完成授權。 3. 在模型選單選擇 `anthropic` provider 下的 Claude 模型。 4. 需要時,在同一頁打開**輸入框額度**開關。 ## 額度顯示 模型選單只顯示 Anthropic Models API 回傳的模型。**設定 → Claude 訂閱**的 **訂閱額度**卡片只顯示 Anthropic usage API 回傳的額度視窗與名稱。 資料由 host 端讀取,access token 不會離開本機。結果快取 60 秒, 按**重新整理**可立即重新讀取。 打開**輸入框額度**後,輸入框右側顯示 API 明確標示為全域或適用於目前模型的 最緊額度視窗。API 未提供適用範圍時,該視窗不會用於輸入框額度。 ## 更新與解除安裝 ```sh dsh plugin --profile web update dsh-claude-subscription dsh plugin --profile web remove dsh-claude-subscription ``` ## 使用注意 - 訂閱方案僅供訂閱者本人使用;本插件產生的用量會計入你的訂閱額度。 - Anthropic 條款允許「Anthropic 自行決定」是否讓訂閱者透過第三方工具 存取服務,並保留改從使用額度扣款的權利。請遵守 [Anthropic 的使用條款](https://support.claude.com/zh-TW/articles/13189465-登入您的-claude-帳戶)。 - 本插件不抽取 Claude Code 本機的 OAuth token;登入一律透過瀏覽器授權。 ## 授權 MIT License
Install
dsh plugin --profile web add github:x5427876/dsh-claude-subscription#fc1903a6b72ecc6910ab69c46776b16a7cef02f0
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-claude-subscription from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.