跳到正文
原文
xAI:News(网页)· xAI:News(网页)·· 2026-05-21精选AI 评分67

在OpenCode中使用Grok

AI 导读

xAI宣布,其SuperGrok或X Premium订阅用户现可在开源编程工具OpenCode中使用Grok模型。OpenCode提供终端或独立桌面应用两种形式,用户连接Grok账户后,即可调用驱动xAI终端编程代理的Grok Build模型进行开发。该集成通过xAI Grok OAuth实现认证接入,官方表示未来将推出更多开源代理及集成方案。

推荐理由

把 Grok 搬进 OpenCode 不是啥大新闻,但如果你正好有 SuperGrok 或 X Premium,直接就能在终端里用,算是个挺干净的集成。

正文

After connecting your Grok account, start coding with Grok Build, the same model that powers xAI's terminal-based coding agent.

Setup

Install OpenCode:

bash

Launch OpenCode:

bash

Inside OpenCode, run /connect and pick xAI:

txt

Pick the sign-in method that fits your setup — both use your Grok subscription:

  • xAI Grok OAuth (SuperGrok Subscription) — opens your browser to sign in.
  • xAI Grok OAuth (Headless / Remote / VPS) — prints a code and URL for SSH or remote hosts.

More open-source agents and integrations are coming soon.

来源:xAI:News(网页) · x.ai