Skip to main content

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 claude in 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.

Open your terminal and run:

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

This downloads and runs the official installer for Mac and Linux.

PATH Warning After Install

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.

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:

  1. Navigate to any folder in your terminal:

    cd ~
  2. Launch Claude Code:

    claude
  3. Claude Code will open a browser window asking you to log in to your Anthropic account. Log in and authorize the connection.

  4. Once authenticated, you'll see Claude Code's interactive prompt in your terminal. Type /exit to quit for now.

How we'll use Claude Code

Throughout this guide, the workflow will look like this:

  1. Navigate to your project folder in the terminal
  2. Run claude to start Claude Code
  3. Describe what you want to build or change in plain English
  4. Review what Claude writes and approve the changes
  5. 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.