# 在OpenCode中使用Grok

- 来源：xAI：News（网页）
- 发布时间：2026-05-21 08:00
- AIHOT 分数：67
- AIHOT 标记：精选
- AIHOT 链接：https://aihot.virxact.com/items/cmpft1pi009fusljwl6sy69na
- 原文链接：https://x.ai/news/grok-opencode

## 精选理由

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

## AI 摘要

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

## 正文

Use Grok in OpenCode | xAI

Back to news

May 21, 2026

Use Grok in OpenCode

Use your SuperGrok or X Premium subscription inside OpenCode.

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

Setup

Install OpenCode:

Copy

curl -fsSL https://opencode.ai/install | bash

bash

Launch OpenCode:

Copy

opencode

bash

Inside OpenCode, run /connect and pick xAI:

Copy

/connect

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.

Copy dark SVG

Copy light SVG
