Grok Build Installation Guide for China: From Zero to Working (July 2026)
In one sentence: This article solves one specific problem — getting Grok Build installed, connected, and running in China's network environment. Includes SuperGrok subscription options and hands-on Plan Mode experience. If you haven't registered a Grok account or sorted out payments yet, start with the Grok Usage Tutorial.
Target audience: Developers who want to use Grok Build in China / those who've installed it but can't connect / those still on the fence about whether to try it.
Quick navigation:
- Can't install? Start with network config
- Haven't installed yet? Jump to installation steps
- Installed and want advanced usage? Jump to Plan Mode
- Not sure which subscription to choose? Read here
- FAQ quick reference
Zero. Network Configuration in China (Read This First)
This is the most important section in the entire article. If you've already installed Grok Build but can't connect, can't log in, or it keeps timing out — stop scrolling. The problem is right here.
Why You Can't Connect
Grok Build is a terminal application. The network requests it sends go through your terminal's environment variables, not your browser's proxy settings. Just because you can open x.ai in Chrome doesn't mean the grok command in your terminal can reach xAI's servers.
Temporary Solution (Effective for the Current Terminal Window)
If you already have a proxy running locally (e.g., Clash, V2Ray, Surge), just route your terminal traffic to it.
Windows PowerShell (current session):
$env:http_proxy="http://127.0.0.1:7890"
$env:https_proxy="http://127.0.0.1:7890"macOS / Linux Terminal (current shell):
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
7890is the default port for Clash. If you're using a different proxy tool, replace it with the corresponding port number (V2Ray is typically10809, Surge is typically6152).
After configuring, run grok --version. If it works, your proxy is taking effect.
Permanent Solution (Automatically Effective Every Time You Open a Terminal)
Add the two lines above to your shell configuration file:
- macOS / Linux: Write to
~/.zshrcor~/.bashrc - Windows PowerShell: Write to your PowerShell Profile (
$PROFILEfile)
If you don't want all traffic going through the proxy, you can wrap it into an alias and only enable it when needed.
No-Proxy Environments (Servers / Cloud Dev Machines)
If you're using Grok Build on a domestic cloud server like Alibaba Cloud or Tencent Cloud and don't have a local proxy, you have two options:
- Apply for an xAI API Key and authenticate via the
XAI_API_KEYenvironment variable (see Chapter Three). The API channel is somewhat more stable than CLI login. - Install a proxy client on the server too, but we won't elaborate on that — everyone's network setup is different.
One. Installation
Once you've confirmed your network is working, the installation itself is very lightweight.
macOS / Linux:
curl -fsSL https://x.ai/cli/install.sh | bashWindows PowerShell (run as Administrator):
irm https://x.ai/cli/install.ps1 | iexVerify the installation:
grok --versionIf it outputs a version number, the installation step is done.


It works best from the root directory of a Git repository. Grok Build automatically reads the repository structure and configuration files like
.gitignore. Its ability to understand project context is noticeably better than in an empty directory.
Platform compatibility: macOS has the most complete experience, Linux is second, and Windows works too but occasionally has minor issues (path handling, permission-related).
Two. What Is Grok Build?
xAI's official terminal AI coding agent (Coding Agent CLI), which entered early Beta in May 2026.
Unlike code completion plugins like GitHub Copilot, Grok Build is more like an engineer that lives in your terminal. You tell it what to do, and it plans the steps itself, reads project code, writes new features, runs tests, and even does the git commit for you.
A few noteworthy features:
- Full-screen interactive TUI, supports mouse clicks
- Plan Mode: presents a plan first, takes action only after you approve
- Automatically splits large tasks into multiple sub-agents for parallel processing
- Supports headless mode, can be plugged into CI/CD pipelines
- Supports the ACP protocol, can integrate with IDEs and other agent frameworks
In terms of positioning, it directly competes with Claude Code and Aider. As of July 2026, Grok Build's iteration speed is very fast, with feature updates every week.
Three. First Launch and Login
After entering your project directory, simply run:
cd /path/to/your/project
grokOn first launch, a browser window will pop up for you to authorize your xAI account — just click allow.

For headless environments (servers), manually set your API Key:
export XAI_API_KEY="xai-your-key-here"API Key application page: console.x.ai/team/default/api-keys

After successful login, you'll enter the full-screen TUI interface, which looks like this:

Four. Plan Mode Hands-On
Plan Mode is currently the single most worthwhile feature of Grok Build. Nothing else comes close.
Anyone who has used other AI coding tools has probably had this experience: you ask it to change something, it jumps right in without a word, and ends up messing things up — wrong dependencies installed, tests failing, a pain to even roll back. Plan Mode is designed precisely to avoid this situation.
When enabled, Grok Build first outputs a complete execution plan — what steps it intends to take, which files it'll touch, what approach it'll use. You can:
- Approve directly and let it proceed
- Suggest modifications to a particular step
- Tell it to scrap the plan and start over
After confirmation, every file change is shown as a diff, crystal clear.
Three Ways to Enter
Shortcut key: Press Shift + Tab in the interface to toggle. When the status bar shows "Plan," it's enabled.

Slash command: Type /plan.

Launch argument:
grok --planTo exit, press Shift + Tab again, or type /plan off.
My personal habit is to keep Plan Mode on by default, only switching back to normal mode for trivial things like renaming a variable or adding a comment. The rollback time saved by keeping Plan Mode on far exceeds the extra time it takes to confirm.
Five. Common Commands
You can type your requests directly in the interface in Chinese or English, just like chatting. Below are some frequently used slash commands:
| Command | Purpose |
|---|---|
| /help | Open the help panel |
| /plan | Enter planning mode |
| /yolo | Auto-approve mode (use with caution) |
| /model <model_name> | Switch model |
| /inspect | View current config and loaded skills |
| /feedback | Send feedback to xAI |
| /clear | Clear the session |
When you're just starting out, run /help first — it's more useful than any tutorial.
Six. How to Choose a Subscription Plan
Grok Build requires a SuperGrok or X Premium Plus membership to use.
Quick recommendation:
| Plan | Who It's For | Notes |
|---|---|---|
| SuperGrok | Only want Grok Build + Grok chat | Lower price, simple subscription process |
| X Premium Plus | Already using X (Twitter) paid features | Includes X blue checkmark verification, Grok access, etc. |
SuperGrok can be subscribed to via the one-click upgrade system at grokng.com. The in-app purchase pricing at grokm.com is currently quite competitive — you can compare both before committing. If you run into payment issues in China, this site's SuperGrok Top-Up Tutorial offers an ID-based direct top-up solution that doesn't require a virtual card.
If you also need to use Grok for generating image or video assets, SuperGrok's current content generation speed and quality are both solid — one subscription covers both coding and content creation.
Seven. FAQ
Can Grok Build Be Used in China?
Yes. But you need to configure a proxy — the terminal does not use your browser's proxy settings by default. See the network configuration section for detailed steps.
What Should I Do If I Get a Network Error During Installation?
First check whether curl or PowerShell can access the internet normally. If yes, configure the terminal proxy and re-run the install command. If not, check whether your proxy client is running and whether the port number is correct.
SuperGrok vs X Premium Plus — Which One to Choose?
For most developers, SuperGrok is sufficient — it's cheaper and covers all the features needed for Grok Build. What X Premium Plus adds is mostly X platform social features (blue checkmark, ad revenue sharing, etc.), which don't help with coding.
Grok Build vs Claude Code — Which One Is Better?
Both are positioned the same way, but as of July 2026, the differences are clear:
- Grok Build: More restrained Plan Mode design, friendlier UI interaction, fast iteration speed
- Claude Code: More mature ecosystem, richer third-party tools and community plugins
If you value the safety of "plan first, execute later," Grok Build's Plan Mode offers a better experience. If you already have an established Claude Code workflow, the migration cost may not be worth it.
Can I Use It Without a Proxy?
If only using the API Key method (XAI_API_KEY environment variable), some domestic servers can connect directly, but it's unstable. Direct terminal connections to the x.ai domain generally require a proxy. Just set it up properly.
Why Can't I Connect Even After Configuring the Proxy?

Check three things:
- Is the proxy port number correct? (Common: Clash
7890, V2Ray10809, Surge6152) - Have you set both
http_proxyandhttps_proxy? (Many people only set one) - Did you set environment variables in PowerShell but run the command in cmd? — they don't share settings.
