dsh-xai
by mirdie
DeepSeek Harness 的 xAI Grok SuperGrok / X Premium OAuth
xAI Grok SuperGrok / X Premium OAuth for DeepSeek Harness
安装
dsh plugin --profile web add github:mirdie/dsh-xaiGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
English | 中文
在 DeepSeek Harness 里用 SuperGrok / X Premium 订阅登录 xAI,调用 Grok。不需要 XAI_API_KEY,也不需要改 dsh 源码。
这是一个独立的 dsh bundle,会提供:
- Settings 或 CLI 里的 SuperGrok / X Premium OAuth,并自动刷新 token
- 一次性导入
~/.grok/auth.json(Grok CLI)。不会改写那个文件 - 登录或导入后请求
GET https://api.x.ai/v1/models,模型列表按当前账号收窄;拉失败则用安装目录兜底 - 流式、工具调用、reasoning、compaction 走 dsh 原有 LLM 服务
内置目录里的 xai(API Key)路由不会被动。本插件注册的是 xai-oauth,两条路可以并存。
安装
不用先自己 clone。 dsh plugin add 会按 GitHub 地址把包装进当前 profile。
dsh plugin --profile web add github:MirDie/dsh-xai
dsh web
用 npx 起的 Web、PATH 里没有 dsh 时,把前面的 dsh 换成 npx @deepseek-ai/dsh:
npx @deepseek-ai/dsh plugin --profile web add github:MirDie/dsh-xai
npx @deepseek-ai/dsh web
不要写 npm dsh 或在家目录里写 pnpm dsh。npx 只是临时跑一次,不会安装全局 dsh 命令。
打开 设置 → xAI Grok → 使用 SuperGrok 登录。插件会走 device-code,打开验证链接,你在浏览器里批准即可。无头 / SSH 可以用 CLI:
dsh plugin --profile web exec dsh-xai login
dsh plugin --profile web exec dsh-xai import
dsh plugin --profile web exec dsh-xai status
dsh plugin --profile web exec dsh-xai logout
新会话默认选 xai-oauth / grok-4.5。dsh 里已经存过的默认模型仍然优先。
设置页可以勾选要出现在模型选择器里的模型。名称形如 xai-oauth / grok-4.5。登录后如果选择器还是空的,更新插件并重启 dsh web。
只有在改这个插件本身时,才需要把仓库拉到本地,再用路径安装:
git clone https://github.com/MirDie/dsh-xai.git
dsh plugin --profile web add ./dsh-xai
凭证
dsh 的登录和 Grok CLI 是分开的:
- 凭证写在
$DSH_HOME/.xai-oauth-auth.json(默认~/.dsh) - 写入是原子的,refresh 会跨本机 dsh 进程加锁
- 浏览器状态和报错里不会带回 token
import只复制一次~/.grok/auth.json,从不写回那个文件
xAI 的 refresh token 会轮换。导入之后,dsh 下一次刷新可能让 Grok CLI 掉线,需要再跑一次 grok login。卸掉插件不会删除 dsh 凭证;要删请用设置页或 logout。
兼容说明
- 对话、工具、reasoning 走 pi-ai 的 xAI 提供商(
openai-completions/openai-responses)。 - 部分 SuperGrok 档位会出现「浏览器登录成功,推理 HTTP 403」。这是 xAI 侧权限,不是 token 过期。这种情况请改用目录里的
xai+XAI_API_KEY。 - 文件系统、shell、skills、MCP、子代理、权限、附件、compaction 仍由当前 dsh profile 提供。
开发
npm install
npm run check
许可证
Apache-2.0
原始 README: https://github.com/MirDie/dsh-xai/blob/main/README.zh.md ↗
同类插件
查看全部 →
agent-vision-toolkit
为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod