New machine setup for Claude Code and Codex
A calm, step-by-step guide for anyone starting from zero: what to install, where to sign in, which command to paste, and what you should see when everything works.
- GitHub (free): github.com — needed in Step 3.
- Anthropic (paid subscription): claude.ai — needed in Step 5. Claude Code requires an active paid plan; a free account will not work with the CLI.
- OpenAI (paid subscription): platform.openai.com — only if you want Codex. It also requires a paid plan.
Budget-constrained? Cursor and Antigravity both have free tiers that let you start without a subscription. They are not identical to Claude Code, but they are a reasonable entry point. You can also run Claude Code on local models if you prefer to avoid cloud subscriptions entirely.
Learn what it is, how to open it, and how to run a command.
Editor, Git, GitHub CLI, and Node.js.
Claude Code, Codex, and Bun — install and verify each one.
Once the base is solid, open a repo and continue to Guide 3.
Terminal 101
A terminal is a text window for talking to your computer
Instead of clicking buttons, you type a line of text and press Enter. That line is called a command. The computer executes it and prints the result back to you.
Here is a useful mental model: every button click in a graphical app ultimately runs a command under the hood. The terminal just lets you reach those same commands directly, without the visual wrapper. It is not more dangerous than using software normally — as long as you understand what you are running.
For example, this command asks your computer which version of Node.js is installed:
node --version
If Node is installed, you will see something like v24.15.0. The exact number will differ and that is fine. If you see an error, it usually means the tool is not installed yet — not a problem, just continue to the install step for that tool.
Tools like Claude Code, Codex, and Git work primarily through the terminal. You do not need to be a developer — you just need to paste a command and read the response. This guide will walk you through exactly that.
How to open a terminal on Windows
- Press the Start button (Windows logo).
- Type
PowerShellin the search bar. - Open Windows PowerShell or Terminal.
- Do not choose "Run as Administrator" unless an official guide explicitly requires it.
You will see a dark window with a line ending in >. That is where you paste commands.
How to open a terminal on Mac
- Press
Command + Spaceto open Spotlight. - Type
Terminal. - Press Enter.
You will see a window with a line ending in $ or %. That is where you paste commands.
delete, remove, rm, reset, force, sudo, or asks for a password, an API key, or admin access — stop and find out what it does before running it. If an unfamiliar source told you to run it, don't. Tell your AI agent to explain before it acts.
The install checklist — 8 steps with verification
Install a code editor
A code editor is where you open and read project files. Even when an AI agent writes the code, you need somewhere to review it and occasionally make small manual edits. Think of it as a highly capable Notepad that understands code. This step has no terminal command — just download and install from the official site.
- VS Code — the simplest default choice. Completely free, and by far the most widely used editor. Fine for everything in this series.
- Cursor — a code editor with built-in AI features. It has a limited free tier and paid plans. If you are not ready to pay for Claude Code yet, Cursor is a practical alternative to start with — it can handle much of what this series covers.
After downloading and installing, open the application and confirm it launches — that is enough for this step. You should see a sidebar on the left and a large text area in the center. A "Get Started" or "Open Folder" prompt is a good sign.
Install Git
Git is a version control tool — it records a history of every change to your project and lets you roll back if something breaks. Think of it as a persistent Ctrl+Z that works even after you close the file or come back a week later. AI agents also depend on Git for tracking the work they do on your codebase.
Download Git from the official site and run the standard installer. On Windows, you will see several wizard screens — accepting defaults on each is fine.
After installation, open a new terminal window and run:
git --version
Success: a line beginning with git version 2. for example git version 2.49.0. The exact number does not matter.
Nothing appeared, or you see "not recognized"? Close the terminal completely, open a fresh one, and try again. Git is sometimes not detected in a terminal that was already open during installation. If it still fails, revisit the download page and confirm the install finished without errors.
Install GitHub CLI and sign in
GitHub CLI (gh) is the bridge between your terminal and your GitHub account. GitHub hosts your code repositories in the cloud; the CLI lets an AI agent create repos, open pull requests, and verify connectivity — all from the terminal without touching a browser.
Download GitHub CLI and run the standard installer.
Verify the install first:
gh --version
You should see a line like gh version 2.x.x.
Then sign in to your GitHub account:
gh auth login
You will be prompted with a few questions. Choose GitHub.com, then HTTPS, then Login with a web browser. A browser window will open — approve the connection there and return to the terminal.
If the browser does not open automatically, copy the URL from the terminal (something like https://github.com/login/device), open it manually in your browser, and enter the code shown next to the URL in the terminal.
Final check:
gh auth status
Success: you see your GitHub username and "Logged in to github.com". When you see this, the CLI is connected and ready for agent use.
Install Node.js
Node.js is a runtime that lets you execute JavaScript outside the browser. In plain terms: it runs code. Most AI developer tools — including Codex — are distributed as Node packages and require Node to be installed first. npm (Node Package Manager) comes bundled with Node and works like an app store for the terminal: one command installs any published tool.
Download Node.js LTS (LTS = Long Term Support — the stable, recommended track). Run the standard installer.
Open a new terminal window — critical, because a terminal already open at install time will not see the new install — and run:
node --version npm --version
Success: two lines showing version numbers, for example v24.2.0 and 10.9.2. Node should be v18 or higher.
npm not recognized on Windows? PowerShell may need permission to run scripts. Run the following, type Y when prompted, then retry:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Install Claude Code
Official Claude Code setup docs
Important: Claude Code requires a paid Anthropic subscription. Signing in with a free account will not work with the CLI.
Desktop app vs. CLI: If you download the Desktop app, it includes the CLI — no need to run the commands below. Install the CLI separately only if you specifically want the claude terminal command without the desktop application.
irm https://claude.ai/install.ps1 | iex
curl -fsSL https://claude.ai/install.sh | bash
irm (Windows) and curl (Mac) download an installer script from the internet; iex / bash run it immediately. It is the equivalent of downloading an installer and double-clicking it — in one line. These commands come from Anthropic's official site, so they are safe to run.
Verify the install:
claude --version claude doctor
Success: a version number from the first command, and a "healthy" status from claude doctor.
First launch and sign-in:
claude
The first run opens a browser sign-in prompt. Log in with your Anthropic account.
Claude Code interfaces, launch modes, and initial config
You can work with Claude Code in three ways:
- Terminal CLI: run
claudefrom inside a project folder. The most common workflow, and the one this series focuses on. - Desktop app: download from claude.com/download, sign in, and open the Code tab. The CLI is included — no separate install needed.
- Web: claude.ai/code for cloud-based Claude Code or Remote Control workflows.
Useful launch flags:
claude # standard launch claude --continue # resume a previous conversation claude --permission-mode plan # safe mode: plans but doesn't change files claude --permission-mode acceptEdits # auto-approve file edits
Two quick settings worth configuring now:
- Dark mode: run
claude config set --global theme darkor change it inside Claude Code by pressing/and choosing Settings. - Response language: Claude Code replies in whatever language you write to it. No configuration needed — write in English, get English back.
claude --dangerously-skip-permissions is equivalent to --permission-mode bypassPermissions. It skips all approval prompts and safety checks. Use only inside an isolated container, VM, or dev container — never on a beginner's primary machine.
Install Codex CLI
Official source: openai/codex on GitHub
What is Codex? Codex is OpenAI's AI coding agent, powered by GPT-5.5. As of 2026, Codex and Claude Code are roughly on par in capability — each has slightly different strengths, and knowing both is useful. Codex also requires a paid OpenAI subscription. There is no free CLI tier.
Installation goes through npm, which you installed in Step 4. The -g flag installs globally, making codex available from any folder in the terminal:
npm install -g @openai/codex
Verify:
codex --version
Success: a version number is displayed.
First launch:
codex
Codex will prompt you to sign in — either with a compatible ChatGPT account or an API key.
Codex interfaces and login options
Login commands:
codex login # first-time sign-in codex login status # check if you're signed in codex logout # sign out
If a browser cannot open (e.g., a remote server):
codex login --device-auth
If you are using an API key, do not paste it directly into a chat window. Pass it via an environment variable instead:
printenv OPENAI_API_KEY | codex login --with-api-key
Ways to work with Codex:
- Terminal CLI: run
codexfrom inside a project folder. - Desktop app: run
codex appto open or install Codex Desktop on macOS or Windows. - Web: chatgpt.com/codex when your plan includes Codex access.
codex codex --sandbox workspace-write --ask-for-approval on-request codex --search
codex --dangerously-bypass-approvals-and-sandbox (also codex --yolo) runs commands without approval prompts and without sandboxing. Use only inside a hardened external runner.
Install Bun
Bun is a JavaScript runtime built from scratch for speed. It runs code, installs packages, and runs tests — often ten times faster than Node for certain workloads. It is increasingly common in modern projects, and most AI agents expect it to be available. You do not need to understand how it works right now; installing it now saves a context-switch later when a project needs it.
Official Bun installation docs
powershell -c "irm bun.sh/install.ps1|iex"
curl -fsSL https://bun.com/install | bash
Verify:
bun --version
Success: a version number like 1.2.x is displayed.
Not recognized? On Windows, close and reopen the terminal. On Mac, run source ~/.zshrc (or source ~/.bashrc if you use bash) and try again. If it still fails, check the official docs for OS-specific troubleshooting.
Project-specific tools — install only when needed
The tools below do not need to be installed now. Add them only when a specific project requires them. If an AI agent needs one of them, it will tell you and walk you through the install.
- Supabase CLI — for projects using a database, authentication, or storage.
- Netlify CLI — for deploying sites and apps to Netlify.
- Playwright — for automated browser testing within a specific project.
Looking ahead: Google and xAI are entering the AI coding agent space. More tools will arrive — but the foundation you have set up today will serve you well with them too.
A starter prompt for your first agent session
What to give Claude Code or Codex after install
After installation you can ask an agent to independently verify that everything is working. Paste the following into Claude Code or Codex after you first launch it:
I am setting up this computer for AI coding work. Please help me verify the setup slowly and safely. I am not a developer, so explain every step in plain language. Do not install or change anything before showing me: 1. What you are checking 2. Why it matters 3. The exact command 4. What a successful result should look like 5. What could go wrong Check these tools in order: - Git - GitHub CLI (gh auth status) - Node and npm - Bun - Claude Code - Codex CLI After each check, wait for my confirmation before moving to the next step.
This prompt hands the verification work to the agent while keeping you in control — it must explain before it acts, and wait for your go-ahead. It is a good low-stakes way to build trust with a new tool on a new machine.
Final verification checklist
Open a fresh terminal and run these in order
Open a brand-new terminal window — not one that was open during installation — and run the following commands one by one. Each should return a version number or a confirmation message.
git --version gh auth status node --version npm --version bun --version claude --version claude doctor codex --version
What you should see:
git --version→ a line starting withgit versiongh auth status→ your GitHub username + "Logged in"node --version→ a number likev24.x.xnpm --version→ a number like10.x.xbun --version→ a number like1.x.xclaude --version→ a version numberclaude doctor→ all lines green or "healthy"codex --version→ a version number
All passing? Your machine is ready.
One failing? Stop and fix it before moving on. A broken tool now becomes a confusing error later. The claude doctor command is particularly useful — it actively diagnoses environment problems and suggests specific remediation steps.
What's next
agent-onboarding-wizard — explore without getting overwhelmed
You have installed everything. Now comes the genuinely hard question: where do you start? Claude Code supports dozens of plugins, skills, and MCP servers. An MCP server, for example, connects your agent to external services like Supabase, GitHub, or Notion. A skill is a set of instructions that teaches the agent how to approach a specific type of task. Trying to evaluate all of these at once is overwhelming and unnecessary.
The agent-onboarding-wizard skill is designed for this exact moment. It walks you through environment setup in a structured, low-risk way: which plugins are worth installing first, which skills match your project type, and how to connect MCP servers without misconfiguring anything. Every step is explained before it executes. It is the right entry point for any new Claude Code install.
To use it: open Claude Code in your project folder and type:
/agent-onboarding-wizard
This is the natural next step after completing the installs above.
Workspace architecture — seven folders and CLAUDE.md
The next guide covers how to organize projects so an AI agent can work in them efficiently and consistently. You will learn the recommended seven-folder structure, how to write a CLAUDE.md file that gives the agent context about the project (what it is, what is allowed, what to avoid), and how to build a workspace that scales as projects grow.
Without good structure, an agent spends a lot of time re-orienting itself at the start of every conversation. With a well-written CLAUDE.md, it arrives ready to work.
new-project-from-prd — from idea to working repo
If you already have a project in mind and want to go from "what I want to build" to a structured repository with an initial scaffold, the new-project-from-prd skill walks you through writing a Product Requirements Document (PRD) and generating the project structure from it. It is intended for use after completing Guide 3 and after the onboarding wizard has configured your environment — but it is useful to know it exists now.