How to Set Up Claude Code: Install, Login, First Run (2026)

How to Set Up Claude Code: A Step-by-Step Guide for 2026

Zero to First Session in Minutes

The short answer: run Anthropic’s native installer, sign in with a paid Claude account, and start claude inside a project folder. You do not need Node.js for that path, and the free claude.ai plan does not include Claude Code. Most people go from zero to a first session in a few minutes.

Claude Code is a terminal-based AI coding agent from Anthropic. It reads your project, plans changes, edits files, and runs commands from the command line.

What You Need First

Before You Start
  • ● A terminal you are comfortable with
  • ● A supported OS and 4 GB of RAM
  • ● A paid Claude or Console account
  • ● A project folder to test

Before you install anything, make sure you have a few basics ready. The checklist below covers the essentials.

  • A terminal you are comfortable with. Anthropic lists Bash, Zsh, PowerShell, or CMD as supported shells.
  • A supported system: macOS 13.0+, Windows 10 1809+, Ubuntu 20.04+, or Debian 10+, with 4 GB of RAM or more.
  • A paid Claude account (Pro, Max, Team, or Enterprise) or a Console account.
  • A code project folder to test against.

You no longer need Node.js for the recommended install. The native installer ships a standalone binary, and Node.js 22 or later only matters if you choose the npm route.

Step 1: Check Your Plan

Anthropic’s setup docs say the free claude.ai plan does not include Claude Code. As of October 2026, Claude Pro costs $20 per month billed monthly, or $17 per month with annual billing. Max plans start at $100 per month for heavier use.

If your company already pays for Team or Enterprise seats, those include Claude Code too. A Console account with API billing also works, as do Amazon Bedrock, Google Cloud, and Microsoft Foundry.

Step 2: Install Claude Code

Anthropic recommends its native installer. Open a terminal and run the command for your system.

# macOS, Linux, or WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Confirm the install (in a new terminal window)
claude --version

If the version prints, the install worked. If your terminal cannot find the command, open a new window so the path updates. Native installs update themselves in the background.

Homebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) work too, but they do not auto-update. The older npm install -g @anthropic-ai/claude-code route still exists and needs Node.js 22 or later.

Step 3: Authenticate

The first time you launch Claude Code, it guides you through signing in. Move into a project folder, then start the tool.

cd my-project
claude

On the first run, follow the browser prompt to log in with your Claude or Console account. This links the tool to your plan so it can work on your behalf. You only do this once per machine.

Step 4: Your First Session

Now you can give Claude Code a real task. Describe what you want in plain English, and it will read the relevant files before making changes.

Start with something small and safe, such as:

“Explain what main.py does, then add a short docstring to each function.”

Claude Code will show a plan and the edits it intends to make. You review the changes, approve them, and it applies them. Starting small builds trust before you hand it larger jobs.

Useful First Commands

A few patterns help you get value quickly. Try these once you are set up.

  • Ask for an explanation of a file or folder before changing it.
  • Request one focused change at a time, then review the diff.
  • Ask it to run your tests after a change and report the result.
  • Have it write or update tests alongside any refactor.

These habits keep sessions predictable and easy to review.

Understanding How Claude Code Works

It helps to picture the loop the tool follows. Claude Code reads the relevant files, forms a plan, proposes edits, and waits for your approval.

This read-plan-edit cycle is why results improve when your request is specific. The clearer the goal, the better the plan it can form.

You stay in control at each step. Nothing changes on disk until you accept the proposed edits, so you can always review first.

Working on Larger Tasks Safely

Once you trust the basics, you can hand over bigger jobs, such as a refactor across several modules. A little structure keeps these safe.

Start by committing your current work, so you have a clean restore point. Then describe the task and any constraints, like which files to leave alone.

Ask the tool to run your tests after it finishes. If something breaks, you can review the diff, request a fix, or roll back to your last commit. This pattern lets you take on ambitious changes without losing control.

A Simple First-Week Plan

Your First Week: Day 1: explain code, add docstrings; Day 2-3: small single-file edits; Day 4-5: multi-file change on a branch; After: fold into your workflow

A gentle ramp builds confidence. This short plan works well for new users.

  • Day 1: Use it only to explain code and add docstrings.
  • Day 2 to 3: Make small, single-file edits and review each diff.
  • Day 4 to 5: Try a multi-file change with tests, on a branch.
  • After that: Fold it into your normal workflow as you see fit.

By the end of the week, you will have a clear sense of where the tool helps most.

Setup Paths Compared

The install command differs slightly by platform, and the environment around it differs more. The table below shows what to expect on each common setup.

Environment How you install What to watch for
macOS Terminal Native installer or Homebrew cask Homebrew installs need manual upgrades
Linux shell Native installer, or the signed apt, dnf, or apk repository Package manager installs do not auto-update
Windows (PowerShell or CMD) Native installer or WinGet Git for Windows lets it use Git Bash
WSL on Windows Linux installer inside the WSL terminal Launch claude in WSL, not PowerShell
Dev container or remote SSH Install in the image or on the host The install vanishes unless it lives in the image

Pick the row that matches your machine before you start. Most setup complaints trace back to a mismatch between where the tool was installed and where you run the command.

Common Setup Problems and Fixes

Most setup issues come from the environment rather than the tool itself. Here are quick fixes for the usual ones.

Command not found. Open a new terminal so the path refreshes. If it still fails, the install directory is not on your PATH yet, and claude doctor reports install health once the command runs.

Permission errors on install. These mostly hit global npm installs. Anthropic warns against sudo npm install -g, and the native installer avoids the problem because it does not need admin rights.

Login not completing. Make sure your default browser can open, and that you finish the sign-in prompt before returning to the terminal.

Nothing happens in a folder. Confirm you started claude inside the correct project directory, since it works on the current folder.

Three Workflows Worth Trying

Three Workflows: Guided refactoring; Test generation; Guided debugging

Once the setup is done, a few repeatable workflows show the tool at its best. Each one is safe to try on a small project.

The first is guided refactoring. You ask Claude Code to rename a function or extract a helper, then review the diff and run the tests. Because it edits across files, it keeps related code in sync.

The second is test generation. You point it at a module and ask for unit tests that cover the main cases. You then read the tests, adjust any that miss the intent, and commit them. To weigh dedicated options, see the best AI tools for writing unit tests.

The third is guided debugging. You paste an error message or a failing test, and ask the tool to find the cause. It traces the problem across files and proposes a fix, which you review before applying.

Each workflow follows the same rhythm: describe the goal, review the plan, check the diff, and run the tests. Practicing these three builds a reliable habit you can apply to almost any task. They also make it clear where the tool saves you the most time, which helps you decide how far to lean on it.

Tips for a Smooth Workflow

Keep your work in version control. Commit before large AI changes so you can review and roll back easily.

Be specific in your requests. Naming the exact file or function leads to better results than a vague instruction.

For a broader look at the category, see our guide to the best AI coding assistants. If you are weighing tools, our Claude Code vs Cursor comparison covers the trade-offs for Python.

Which Setup Fits You

A first install on a personal machine. Use the native installer, then run the tool inside one small project. Keep the first week to explanations and single-file edits.

A locked-down work laptop. The native installer puts the binary in your home directory, and on Windows it does not need Administrator rights. If IT blocks scripts, ask whether Homebrew, WinGet, or a Linux package repository is allowed instead.

A Windows developer. Native Windows works for Windows-native projects, and Git for Windows lets the agent use Git Bash. WSL 2 suits Linux toolchains and is the only Windows option that supports sandboxing.

A team standardizing setup. Write the four steps into your repository README and agree on a release channel. Admins can enforce a channel and a minimum version through managed settings.

Working in an unfamiliar codebase. Start the session in the subdirectory you actually need. A narrower starting folder keeps the context small, cheap, and easier to review.

Four Steps, Then Small Tasks First

Setting up Claude Code takes only four steps: check your plan, install the tool, authenticate, and start a session.

Begin with small, low-risk tasks to learn how it plans and edits. Once you trust the flow, you can move on to larger, repository-wide changes with confidence.

If you get stuck during setup, revisit the requirements and the fixes above, since most issues trace back to your plan or your terminal path. With the basics in place, you are ready to let an AI agent handle the repetitive parts of your day while you focus on the work that matters.

Claude Code is not the only terminal agent worth a look. Claude Code vs Gemini CLI compares the two on context handling, permissions, and cost, which is usually what decides it for a given repository.

Windows setups hit a few edges the install steps do not mention. Our writeup of six Windows traps covers the encoding and file lock problems that follow.

FAQ

What do I need before installing Claude Code?

You need a supported system with at least 4 GB of RAM, a terminal, and a paid Claude account (Pro, Max, Team, Enterprise) or a Console account. Node.js is only needed if you choose the npm install route. A project folder to work in is also helpful.

Does Claude Code work on Windows, macOS, and Linux?

Yes. It runs in the terminal on all three. On Windows, you can run it natively from PowerShell or CMD, or inside WSL.

Is Claude Code free to use?

No. Anthropic's setup docs say the free claude.ai plan does not include Claude Code. You need a Pro, Max, Team, Enterprise, or Console account, or a supported third-party API provider. Check the official pricing page for current details.

Should I install Claude Code globally or per project?

One install per machine is the normal path, since the claude command then works in any directory you open. The tool takes its context from your current folder, so one install serves every project. Anthropic recommends its native installer, which updates itself in the background. Installing separately per project offers no real benefit.

How do I stop Claude Code from touching files I do not want changed?

Say so directly in the request, naming the folders or files that must stay untouched. The agent shows a plan and a diff before writing anything, so you can reject an edit that strays outside the scope you asked for. Committing your work first gives you a clean rollback point if something slips through. Starting the session in a narrower subdirectory also limits what it reads.

Sources

About the author. Jay Lim is the pen name of the independent operator who runs ToolVersus. No professional credentials are claimed. Articles are drafted with AI assistance and checked against the official documentation, pricing pages and regulators listed under Sources, rather than hands-on lab testing. How we research · Report an error


Some links may be affiliate links. We may earn a commission at no extra cost to you.

How this article was made: it was drafted with AI assistance from the official sources listed above, and its figures were checked against those pages on the dates shown. It is not based on personal hands-on testing.

Comments