Set up Grok Build (Mac and Windows)

Video 2 min 25 secAbout 20 min to do
Not startedSession 7 of 7, 0 done · Last session in this course

Chapters

Shortcuts
  • Space or Kplay and pause
  • Left and Rightback and forward 5 seconds
  • J and Lback and forward 10 seconds
  • , and .step one frame
  • Shift + , and .slower and faster
  • 0 to 9jump to that tenth
  • Ffullscreen
  • Mmute
  • Ccaptions

Shortcuts stay out of the way while you are typing a note.

Lesson notes and steps

The written version of this session, with the commands and templates to copy.

Optional alternative. This academy teaches Claude Code by default. This session is here for readers who already work in xAI's tools and would rather not add a second subscription.

Grok Build is xAI's coding agent, and the install is one line pasted into a terminal. You do not need IT. You need a terminal window, an active Grok account, and twenty minutes.

This lesson covers Grok Build only. If you have not picked a tool yet, see the general install lesson first, which compares Grok Build against Codex and Claude Code.

What you will use

  • A Mac (macOS 13 or later) or a Windows 10/11 PC
  • An internet connection
  • A Grok / xAI account that can use Grok Build

Step 1: Confirm access

Sign in at grok.com or x.ai. Grok Build is not automatically included on every plan, so before you install anything, check the install page at x.ai/cli. It lists current access for your account. If it does not show you as eligible, that is your answer: upgrade first, then come back to Step 2. Keep that browser tab logged in. The first time you launch the tool, it opens a browser to finish login.

Step 2: Open the right window

Mac: press Command + Space, type Terminal, press Enter. A window opens with a blinking cursor. Lines usually start with % or $.

Windows: click Start, type PowerShell, and open Windows PowerShell, not Command Prompt. The prompt should read PS C:\Users\.... If you see C:\Users\... with no PS in front, you are in Command Prompt. Close it and open PowerShell instead.

Leave this window open. You are about to paste one command into it.

Step 3: Read before you run

Do not paste an install command into a terminal just because it showed up somewhere. Before you run anything below, read the exact line and check the domain yourself. It has to be x.ai. Every command and link in this academy for AI coding agents points to one of three places: claude.ai, chatgpt.com, or x.ai. Nowhere else. If a command you were given points anywhere else, stop and do not run it.

This is the one command you run before Grok Build exists to explain itself. Once it is installed, keep its permission prompts turned on, read what it is about to do, and ask Grok Build itself if a step is ever unclear.

Step 4: Install

Copy the line for your operating system. Paste it into the window from Step 2. Press Enter. Text will scroll. Wait until it stops.

Mac:

curl -fsSL https://x.ai/cli/install.sh | bash

Windows (PowerShell):

irm https://x.ai/cli/install.ps1 | iex

When it finishes, close the terminal window completely and open a new one. Then check that the command exists:

grok --version

If the new window says the command is not found, the installer added itself to PATH but this window was opened before that happened. A fresh window almost always fixes it.

Step 5: First run

  1. Make a folder on your Desktop called ai-setup-test (Finder or File Explorer is fine).
  2. In your new terminal, go there.

Mac:

cd ~/Desktop/ai-setup-test

Windows:

cd $HOME\Desktop\ai-setup-test
  1. Type grok and press Enter.
  2. The first launch opens your browser. Approve the login there, then return to the terminal.
  3. When you see a prompt, type this exactly and press Enter:

Create a file named hello.txt in this folder. The file should contain the sentence: I am set up.

Approve the file write if it asks.

Open the folder in Finder or File Explorer. You should see hello.txt. Open it. You should see that sentence. You did not type the file by hand. Grok Build did.

Step 6: If it fails

  • "Access denied" or the install page says you are not eligible: Grok Build is not enabled on your current plan. Go back to x.ai/cli, check what your account needs, upgrade if you decide to, then repeat Step 4.
  • "Command not found" after installing: you are almost always in the same terminal window the installer ran in. Close it completely, open a brand new window, and run grok --version again.

You are done when...

You can open a new terminal, cd into any folder, run grok, and get a reply. The hello.txt file exists on disk with the sentence you asked for. That is a working Grok Build install, verified by a file it created, not by you taking the install script's word for it.


Template included: Members get a one-page Grok Build setup card: both OS install commands, the verify-before-you-run checklist, and the first prompt to confirm the install worked. Find it in your member dashboard under Templates.

Want it done for you?

Short on time? Agentic Quarks will implement this end to end, wired into your stack, and hand you the keys.

Implementation engagements from $2,500
Narration transcript (what the video says)

Grok Build is xAI's coding agent, and the install is one line pasted into a terminal. You do not need IT. You need a terminal window, an active Grok account, and twenty minutes. This lesson walks you through it, on Mac or Windows.

Before you install anything, sign in at grok dot com or x dot ai. Then open the install page at x dot ai slash cli. It shows whether your account has access. If it does not, upgrade first, then come back and continue.

Open the right window for your system. On a Mac, press Command Space and type Terminal, where lines start with percent or dollar. On Windows, open PowerShell, not Command Prompt, where the prompt starts with P S. Leave that window open.

Do not run a command just because someone gave it to you. Read it first and check what domain it downloads from. The domain has to read x dot ai. Anywhere else, stop. Once Grok Build is installed, keep its permission prompts on and read what it is about to do.

Copy the Mac install line and paste it into your terminal. Press Enter and wait for it to finish. Then close the window completely, open a new one, and type grok dash dash version to confirm the command exists.

In your new terminal, go to your test folder and type grok. The first launch opens your browser to approve login. Then type this exactly: create a file named hello dot t x t containing the sentence, I am set up.

Open the folder on your desktop. hello dot t x t is sitting there, holding the exact sentence you asked for. You did not type it by hand. Grok Build read the prompt, wrote the file, and saved it, on your machine.

You are done when you can open a brand new terminal, run grok from any folder, and get a reply. Check that hello dot t x t still holds your sentence. Members get the full one-page setup card in the template vault.

Grok Build is installed and it already did real work on your machine. That is the last step in Start Here. From here, every lesson assumes this is already running. Next, the Your AI Coding Agent course puts it to work for real.

The course this session belongs to

What you will build in Start Here

Who this is for, what you need, and your first AI agent installed

7 sessions, 17 min of video, about 1.9 hours to do, 7 free.

  1. 01Start here: who this is for and what you needFree2:23 video
  2. 02What you will be able to do when you finishFree2:17 video
  3. 03What is AI, in plain English (skip if you know this)Free2:32 video
  4. 04Know your computer: Mac or Windows, and what the terminal isFree2:29 video
  5. 05Set up Claude Code (Mac and Windows)Free2:35 video
  6. 06Set up Codex (Mac and Windows)Free2:40 video
  7. 07Set up Grok Build (Mac and Windows)Free2:25 videoYou are here
About Start Here

Cancel anytime from your account page, and a 14-day money back on your first month that you trigger yourself. Prefer to pay once? Lifetime All-Access is $399.

By purchasing you agree to the Terms and the Refund Policy.

Members share their results from this session in the community. See what is included.