Use Grok in OpenCode

x.ai · 2026-06-16 · by Long Nguyen ·generic
Use your SuperGrok or X Premium subscription inside OpenCode.

Use Grok in OpenCode

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.

x.ai · 47 links

Comments (0)

No comments yet