Install and set up
Get Claude Code running
Setting up Claude Code takes about ten minutes. You will install it, log in, and open it inside a project folder.
What you need first
Think of this like packing before a trip. Get everything ready now, so nothing stops you halfway.
- A paid Claude plan or an Anthropic API account. Claude Code does not work on the free plan. Check the pricing page for current options.
- VS Code. A free code editor. We use it to watch files change.
- Git. It saves versions of your project. Claude Code can run Git commands for you.
- Node.js (LTS version). Node.js is a program that lets your computer run JavaScript apps. Most web apps that AI tools build need it. Download the LTS version from
nodejs.org.
Check Node.js and Git by typing these in your terminal:
node --version
git --versionIf both print a version number, you are ready. For Node.js, the first number should be 18 or higher.
Install Claude Code
Pick your operating system below. The installer downloads Claude Code and adds the claude command to your computer.
- Open the Terminal app.
- macOS: press
Cmd + Space, type "Terminal", and press Enter - Linux: press
Ctrl + Alt + Tor find Terminal in your apps menu
- macOS: press
- Paste this command and press Enter:
curl -fsSL https://claude.ai/install.sh | bash- Wait until it says the install is finished.
- Close the terminal and open a new one. This lets your computer find the new
claudecommand. - Check that it worked:
claude --versionYou should see a version number. Any number is fine.
npm install -g @anthropic-ai/claude-code. It needs Node.js 18 or newer. Use the installer above unless a guide tells you otherwise.Start Claude Code and log in
Claude Code always works inside one folder. That folder is its "workshop". Let's make a practice folder and start it there.
mkdir hello-claude
cd hello-claude
claudeLet's break this down:
mkdir hello-claudemakes a new folder calledhello-claudecd hello-claudemoves you into that folderclaudestarts Claude Code in this folder
The first time, Claude Code asks you to log in. It opens your browser. Sign in with your Claude account (or your Anthropic API account) and come back to the terminal.
It may also ask if you trust the files in this folder. For your own project folder, say yes.
Open the same folder in VS Code
Claude Code shows you what it does as text. VS Code shows you the actual files. Using both is like having a window into the workshop.
- Open VS Code.
- Choose File → Open Folder and pick
hello-claude. - Keep VS Code next to your terminal window.
Now when Claude Code creates a file, you see it pop up in the VS Code sidebar. You can also open VS Code's built-in terminal (Terminal → New Terminal) and run claude there.
What files are in this folder? and press Enter. In an empty folder, it should tell you there are none yet.Troubleshooting
Common mistakes
- Running
claudein your home folder. Claude Code would then see all your personal files. Alwayscdinto a project folder first. - Not reopening the terminal after install. The
claudecommand only works in a new terminal window. - Skipping Node.js. Claude Code may still start, but most web apps will not run without it.
Practice
Try these exercises to lock in what you just learned.
What's next?
Claude Code is installed and logged in. Next, let's run your first real session and ask it to build a small web page.