Skip to main content

Claude Code: Installation and Getting Started

Install Claude Code safely, start it in a project, and complete tasks with clear outcomes, boundaries, and checks.

FHFinn Hillebrandt
AI Programming
Claude Code: Installation and Getting Started
Links marked with * are affiliate links. If a purchase is made through such links, we receive a commission.

Claude Code works directly with your project from the terminal. It can read and edit files, run commands, and check changes. Your task brief remains the decisive part. The clearer the outcome, boundaries, and verification are, the more dependable the result becomes.

Claude Code requires a paid Claude plan or a Console account with API credits. What it costs is covered in Claude Code pricing, and the free routes are in Is Claude Code free?.

TL;DRKey Takeaways
  • Install Claude Code through the official native installer, then check the version and installation with claude --version and claude doctor.
  • Start Claude Code inside the project directory and give every task an outcome, scope, boundaries, and a concrete verification step.
  • For longer work, CLAUDE.md, a short progress recap, and /compact preserve the thread. Use /clear only for genuinely unrelated work.

1. What Claude Code does in a project

Claude Code is an agentic coding assistant for the terminal. You describe a task in natural language. Claude then investigates relevant files, proposes changes, uses tools, and can run existing checks.

It does not remove product responsibility. Before you approve an action, read the affected files and commands. Data, credentials, infrastructure, payments, and external messages need a clear instruction and a reviewable verification path.

2. Requirements before installation

Anthropic’s official installation documentation lists macOS 13 or later, Windows 10 version 1809 or later or Windows Server 2019 or later, Ubuntu 20.04 or later, Debian 10 or later, and Alpine 3.19 or later. Anthropic also lists at least 4 GB of RAM and an x64 or ARM64 processor. You also need a terminal and a directory you trust.

To sign in, you need a Pro, Max, Ultra, Team, Enterprise, or Console account. The free Claude plan does not include Claude Code.

The native installer is the recommended option and does not require Node.js. It updates Claude Code automatically in the background. Anthropic also documents Homebrew and WinGet; you have to update those installations yourself. Open Anthropic’s official installation guide for the current option that matches your operating system.

Official Claude Code installation documentation

3. Install and check Claude Code

3.1 Use the native installer

Do not blindly pipe an installation script into a shell. On macOS and Linux, download it into a temporary directory and read it first. Run it only when you are comfortable with its source and contents.

macOS or Linux: download, inspect, run
curl -fsSL https://claude.ai/install.sh -o /tmp/claude-install.sh
less /tmp/claude-install.sh
bash /tmp/claude-install.sh

On Windows, use the current PowerShell or CMD option described on the official page. That avoids stale commands from posts or forums. For a step-by-step walkthrough, see the Claude Code for Windows guide. If you use WSL, follow the Linux instructions in the documentation. Git for Windows is optional: without Git Bash, Claude Code runs commands through PowerShell.

3.2 Check the installation

Open a new terminal and first check whether the command is available. claude doctor runs read-only installation and settings diagnostics in the terminal without starting a session.

Check the installation
claude --version
claude doctor

3.3 Start in the right project and sign in

Change to the directory where Claude should work, then start claude. In the first interactive session, you choose a display style and sign in. The access options available depend on your account.

First session in a project
cd /path/to/your/project
claude

The first launch in VS Code’s integrated terminal shows the text-style selection:

Actual first launch of Claude Code in the VS Code terminal with text-style selection

4. How to write your first task

A request such as “fix the bug” leaves too much open. Describe the result so you can check it at the end. Claude Code then does not have to guess what matters or what must stay untouched.

Example of a precise first task
Outcome:
The sign-in flow shows a clear error message after invalid credentials.

Scope:
Inspect the existing sign-in flow first. Change only the sign-in code and its tests.

Do not change:
No database migration, dependency update, or copy outside the form.

Done when:
The failure case is tested, existing checks pass, and you summarize the changed files.

4.1 Step 1: Read first, change nothing

In an unfamiliar project, start with a request that makes no changes. It shows whether Claude found the right files, commands, and risks.

First request to understand the project
> What does this project do?
> Do not edit files or run commands.
> Name the entry point, important directories, and existing checks.

4.2 Step 2: Make one small, verifiable change

Next, choose something small that you can see in a browser or test. Ask Claude to identify the file and verification step before it edits anything.

Example of a first change
> Add a short welcome sentence below the heading on the homepage.
> Change only the relevant page.
> Then show the changed file and tell me how to verify the result.

4.3 Step 3: Review the Git diff and prepare a commit

Ask for an explanation of the diff before you create a commit. A commit changes the repository history and should happen only when both the content and message are right.

Finish a Git change with a reviewable prompt
> Summarize the current Git diff.
> Do not create a commit yet.
> Suggest a short commit message.

> The diff is correct. Create a commit with the suggested message.

5. Choose permissions deliberately

In the default Manual mode, Claude Code asks before most file edits, shell commands, and network access. Other permission modes can reduce those prompts for a particular workflow. That speeds up routine work, but increases the risk of a wrong action.

Review the command, affected files, and external consequences before you approve. Choose a mode with fewer prompts only when the scope and working environment are clearly bounded.

6. The most useful commands

claude
Use
Start an interactive session in the current directory
Example
claude
claude "task"
Use
Start an interactive session with an initial task
Example
claude "analyze this codebase"
claude -p "query"
Use
Print one response and exit
Example
claude -p "explain this function"
claude -c
Use
Continue the most recent conversation in the current directory
Example
claude -c
claude -r "session"
Use
Select or resume a saved conversation
Example
claude -r "session"
/init
Use
Generate a project-memory draft
Example
> /init
/context
Use
Inspect the active context
Example
> /context
/compact
Use
Compact the conversation and preserve its working thread
Example
> /compact
/doctor
Use
Run a setup checkup in the session, with fixes after you confirm
Example
> /doctor

The Claude Code commands guide covers more commands. You can also run /help in your installed version to see what is currently available. For recurring tasks, our directory of 400+ ready-made Claude Code Skills is worth a look too.

7. When Claude loses the thread

Long sessions can be compacted. The broad working state remains, but early details from the conversation may no longer be as reliable. Do not rely on an important constraint that appeared only once in a chat.

  1. Put durable project rules in CLAUDE.md.
  2. Before a major handoff, ask for a short recap of completed work, remaining work, changed files, and the next check.
  3. Use /compact when a conversation gets long and you need to preserve the active focus.
  4. When continuing, restate the outcome, boundaries, completed steps, and next concrete test.

/clear is not a cleanup tool for an ongoing task. It starts a new context. Use it only when you really move to another topic. claude -c and claude -r are the better choices for interrupted work.

8. CLAUDE.md as a shared working foundation

CLAUDE.md captures what a compacted chat must not lose: reliable commands, architecture, boundaries, and verification criteria. Keep it short, specific, and easy to find at the project root.

A small, dependable starting point
# Project name

## Run and verify
```bash
npm run lint
npm run test
```

## Rules
- Check existing components before creating new ones.
- Validate input at API boundaries.

## Boundaries
- Do not print or store secrets.
- Do not run data migrations without a confirmed plan.

## Done when
- Affected tests and checks pass.

The CLAUDE.md guide explains the complete structure for global, local, and folder-specific rules.

9. Using Claude Code in VS Code

The official extension brings Claude Code into VS Code. It requires VS Code 1.94 or later and suitable Claude access. The extension includes its own Claude Code installation for editor use. Install Claude Code separately if you also want to use the terminal.

You can open the extension next to a project file. It shows the active permission mode at the bottom:

Native Claude Code extension in VS Code beside a CLAUDE.md file with Manual permissions

Frequently Asked Questions

Not strictly. You can describe a task in natural language, and Claude Code can inspect files, make changes, and run existing checks. You still need to understand and review the affected files and commands before approving them.

The terminal for most work. Use the terminal for direct work in a project directory, the official VS Code extension for an editor workflow, or the Claude desktop app if you prefer a graphical interface. The extension requires VS Code 1.94 or later and suitable Claude access.

For the CLI, you need a supported operating system, a terminal, a project directory, and a Pro, Max, Ultra, Team, Enterprise, or Console account. The free Claude plan does not include Claude Code. You can use Claude Code in the Code tab of the Claude desktop app without opening a separate terminal. The native CLI installer does not require Node.js.

Yes. Claude Code supports Windows 10 version 1809 or later and Windows Server 2019 or later. Anthropic documents native Windows and WSL setups, as well as macOS and Linux. For setup details, see our Claude Code for Windows guide.

No, not for every action. In the default Manual mode, Claude Code asks before most file edits, shell commands, and network access. Reading files in your working directories and read-only Bash commands run without approval. In acceptEdits mode, file edits can be allowed automatically; other actions depend on the active mode and permission rules. The full rules are in the Claude Code documentation.

Use claude -c for the most recent conversation in the current directory, or select a saved session with claude -r. Before making the next change, restate the outcome, boundaries, completed work, and the open check.

Yes. The official VS Code extension requires VS Code 1.94 or later and suitable Claude access. It includes its own Claude Code installation for the editor. Install Claude Code separately if you also want terminal access.

Include reliable commands, important paths, technical rules, boundaries, and verification criteria. Project facts that exist only in a chat can disappear from view in a long session or after compaction. Our CLAUDE.md guide includes examples and a template.
FH

Finn Hillebrandt

AI Expert & Blogger

Finn Hillebrandt is the founder of Gradually AI, an SEO and AI expert. He helps online entrepreneurs simplify and automate their processes and marketing with AI. Finn shares his knowledge here on the blog in 50+ articles as well as through the AI Business Club.

Learn more about Finn and the team, follow Finn on LinkedIn, join his Facebook group for ChatGPT, OpenAI & AI Tools or do like 17,500+ others and subscribe to his AI Newsletter with tips, news and offers about AI tools and online business. Also visit his other blog, Blogmojo, which is about WordPress, blogging and SEO.