Home › Grok Build tutorial for beginners
Grok Build tutorial for beginners
The best first job for a coding agent is reading, not writing: ask Grok Build to explain the code you already have before you let it change anything.
Sign up and log in
- On macOS, Linux or WSL, install it with: curl -fsSL https://x.ai/cli/install.sh | bash
- On Windows (PowerShell): irm https://x.ai/cli/install.ps1 | iex
- Open a terminal in your project folder and run: grok
- On first launch it opens a browser so you can sign in.
- On a server with no browser, set XAI_API_KEY to an API key instead, then run grok.
Step by step
- Install Grok Build with the command for your system (see Sign up and log in).
- cd into a project you know well and run grok.
- Sign in in the browser window that opens.
- Ask it to explain the repo, then point it at one file with @, for example @src/main.rs.
- Ask follow-up questions until its summary matches what you know about the code.
Try it: examples
- First prompt
Explain this repo.
- One file
@src/main.rs Walk me through this file.
Good to know
- Use a project under version control so every change can be reviewed or undone.
- grok inspect shows what it found in the folder: config, instructions, skills, plugins, hooks and MCP servers.
- You can switch models inside the session with /model <name>.
Prices (US$)
x.ai/build says Grok Build is available to try for free. On x.ai/pricing, Free lists limited Grok Build use, and Grok Build is included from the Plus plan (US$8/month) with a shared usage pool.
Sources (official pages, read Nov 8, 2026)
Written from SpaceXSI's official documentation and product pages; we don't run hands-on tests. Features and limits vary by plan and country.