xAI on May 21, 2026 enabled SuperGrok and X Premium subscribers to use Grok Build, the company's terminal coding agent, directly inside OpenCode, an open-source coding agent that runs in the terminal, IDE, and desktop. The integration lets developers skip API key management and bill usage through their existing xAI consumer subscription instead of a separate developer account.
Try it: log into Grok Build inside OpenCode
If you already pay for SuperGrok or X Premium, the setup is one command and one browser tap. Install OpenCode with curl -fsSL https://opencode.ai/install | bash, launch it from a project directory, then run /connect and select xAI as the provider. OpenCode opens a browser tab, you sign in with the same account you use for grok.com, and the OAuth callback wires Grok Build into the terminal session. There is no API key to paste, no $5 minimum to fund, and no separate dashboard to monitor.
Why It Matters
Grok Build was xAI's first terminal-native coding agent, but until last week it was billed through the xAI developer API, which is a different funnel from the consumer Grok subscription. By letting the $30/month SuperGrok plan and the X Premium tier authenticate into OpenCode, xAI is pushing its coding model into a tool with 160K GitHub stars and a fast-growing user base, while collapsing the gap between consumer and developer billing. This mirrors how Anthropic moved Claude Code from API-only to Claude.ai subscriptions earlier this year, and it lowers the friction for solo developers who already pay for chat.
Key Details
OpenCode is maintained by SST and is open source on GitHub. It connects to 75+ language model providers, including Claude, GPT, and Gemini, and treats Grok Build as one more first-class option in the provider picker. Sessions persist locally, and the agent respects standard .gitignore and project-level config. Grok Build itself is described by xAI as a "high-speed agentic coding" model with deep codebase understanding, and remains accessible separately through the xAI API docs for users who prefer key-based auth. The integration also follows xAI's earlier consumer-subscription bridge into OpenClaw on May 19.
What to Do Next
If you already pay for SuperGrok or X Premium and want to test Grok Build on a real repo, install OpenCode, switch to a feature branch, and ask it to refactor or scaffold something you would normally hand off to Claude Code or Codex. If you do not subscribe yet, this integration is the cheapest path to Grok Build at $30/month for SuperGrok, since the same plan also covers grok.com chat and image generation. Either way, watch whether xAI adds Grok 4.20 Heavy to the OpenCode provider list next, which would put a 2M-token-context coding model behind the same one-click login.