Installing Claude Code
Claude Code is an AI coding assistant that can read your files, write code, run commands, and iterate on your project directly. It comes in a few different forms:
- Terminal (CLI) — you run
claudein your terminal and interact with it through text. This is the most commonly used version and the one with the best support. - Desktop app (GUI) — a graphical application that does the same thing but with a visual interface.
- Web (claude.ai) — the chat interface at claude.ai can help with code questions, but it can't directly read or write files on your computer.
All three can help you write code, but this guide uses the terminal version. It's the standard for developers, the most well-supported, and all the prompts in this tutorial are written for it.
Prerequisites
Before installing Claude Code, make sure you have:
- A Claude Pro or Max subscription (we did this in the previous step)
Installation
For full installation instructions and troubleshooting, see the official Claude Code setup guide.
- Mac / Linux
- Windows
Open your terminal and run:
curl -fsSL https://claude.ai/install.sh | bash
This downloads and runs the official installer for Mac and Linux.
After the installer finishes, your terminal may display a warning that claude is not in your PATH, along with a command you need to run. It will start with something like echo 'export PATH=... followed by a file path.
Do not ignore this! Look at your terminal output carefully — if you see a message like this, copy and paste that exact command from your terminal into your terminal and run it. Then close and reopen your terminal before continuing.
Open PowerShell and run:
irm https://claude.ai/install.ps1 | iex
This downloads and runs the official installer for Windows.
If you get an error about execution policies when trying to run claude, you need to allow scripts to run on your machine. Run this command in PowerShell:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Then try running claude again.
Verify the installation
claude --version
You should see a version number printed. If you see "command not found", close your terminal and open a new one, then try again.
First-time setup
The first time you use Claude Code, you need to authenticate:
-
Navigate to any folder in your terminal:
cd ~ -
Launch Claude Code:
claude -
Claude Code will open a browser window asking you to log in to your Anthropic account. Log in and authorize the connection.
-
Once authenticated, you'll see Claude Code's interactive prompt in your terminal. Type
/exitto quit for now.
How we'll use Claude Code
Throughout this guide, the workflow will look like this:
- Navigate to your project folder in the terminal
- Run
claudeto start Claude Code - Describe what you want to build or change in plain English
- Review what Claude writes and approve the changes
- Repeat until the feature is done
Claude Code can:
- Create and edit files
- Run terminal commands (with your approval)
- Debug errors by reading error messages and fixing code
- Explain what it's doing and why
You don't need to write code yourself — but you should read what Claude produces so you understand your own project.
Alternatives to Claude Code
This guide is built around Claude Code, but it's not the only AI coding tool out there. OpenAI Codex is a similar tool that can read your project, write code, and run commands. If you prefer OpenAI's ecosystem, the general workflow in this guide — describe what you want, review the output, test, iterate — still applies. The specific commands and prompts will differ, but the concepts are the same.
What's next?
Next up: set up your Cloudflare account — this is where your finished site will live on the internet.