Library/Your AI Coding Agent·Session 1 of 7

Install your AI coding agent (Mac or Windows)

30 minSaves $25/mo

You do not need a developer on retainer to start using an AI coding agent. You pick one tool, install it on your Mac or Windows PC, sign in, and send it a first prompt. Codex, Claude Code, and Grok Build all do the same job. Any of them works. Do not install all three today.

By the end of this lesson you have a working agent on your machine and a file it created for you.

What you will use

  • A Mac (macOS 13 or later) or a Windows 10/11 PC
  • An internet connection
  • One paid (or trial) account, matched to the tool you pick:
    • Codex: ChatGPT Plus, Pro, Business, Edu, or Enterprise (chatgpt.com)
    • Claude Code: Claude Pro, Max, Team, or Enterprise. The free Claude.ai plan does not include Claude Code (claude.com/pricing)
    • Grok Build: a Grok / xAI account. Check the current plan at grok.com or x.ai/cli

Step 1: Pick one tool

Choose the one that matches an account you already pay for. If you pay for none of them yet, pick the one you are willing to subscribe to and stop. You can switch later.

| You already have | Install this | Command you will run | | --- | --- | --- | | ChatGPT Plus or higher | Codex | codex | | Claude Pro or higher | Claude Code | claude | | Grok / SuperGrok / xAI | Grok Build | grok |

Write the tool name on a sticky note. The rest of this lesson uses only that one.

Step 2: Open the right window (Terminal or PowerShell)

You are not installing an app from the App Store. You paste one command into a terminal.

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, open Windows PowerShell (not Command Prompt). The line should start with PS C:\Users\.... If you only see C:\Users\... with no PS, you are in Command Prompt. Close it and open PowerShell.

Leave this window open. You will paste one command into it.

Step 3: Sign up before you install

Create or confirm the account that matches your tool. Installing first and then discovering you are on a free plan that does not include the CLI wastes time.

  • Codex: sign in at chatgpt.com. Confirm the plan is Plus or higher (Settings, then your plan name).
  • Claude Code: sign in at claude.com. Confirm Pro, Max, Team, or Enterprise. Free Claude.ai is not enough.
  • Grok Build: sign in at grok.com or x.ai. Confirm you can use Grok Build (the install page at x.ai/cli lists current access).

Keep that browser tab logged in. The first time you run the tool, it will open a browser to finish login.

Step 4: Paste the install command for your OS

Copy only the line for your tool and your operating system. Paste it into Terminal (Mac) or PowerShell (Windows). Press Enter. Text will scroll. Wait until it finishes.

Codex

Mac:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

Claude Code

Mac:

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

Windows (PowerShell):

irm https://claude.ai/install.ps1 | iex

On native Windows, Git for Windows is recommended so Claude Code can use Bash. If you skip it, Claude Code still runs and uses PowerShell instead.

Grok Build

Mac:

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

Windows (PowerShell):

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

After any install: close the terminal window completely, open a new one, then check that the command exists:

  • Codex: codex --version
  • Claude Code: claude --version
  • Grok Build: 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. A fresh window almost always fixes it.

Step 5: Sign in and send one prompt

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

Mac:

cd ~/Desktop/ai-setup-test

Windows:

cd $HOME\Desktop\ai-setup-test
  1. Start the tool you installed: type codex, claude, or grok, then Enter.
  2. The first launch opens your browser. Approve the login. 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 the tool 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. The agent did.

You are done when...

You can open a new terminal, cd into a folder, run codex or claude or grok, and get a reply. The hello.txt file exists on disk. That is a complete, working AI coding agent on your computer.

If the login page errors, you are usually on the wrong plan (free Claude.ai for Claude Code is the most common). Fix the plan, run the tool again, and type /login if it offers that command.


Template included: Members get a printable Mac/Windows setup checklist, the three official install commands, and a first-prompt pack (explain this folder, make a hello file, list what you can do). Find it in your member dashboard under Templates.

Want it done for you?

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

Implementation engagements from $2,500
Next session: Talk to your agent: voice in, spoken pings out