---
title: Getting started with Claude Code
---

Getting Claude Code running takes a couple of minutes. The first session teaches the core loop: describe a task, watch Claude work, verify the result.

## Install

The native installer is the recommended path — it auto-updates in the background:

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

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

Or use a package manager (these don't auto-update):

```bash
brew install --cask claude-code           # Homebrew
npm install -g @anthropic-ai/claude-code  # npm (needs Node 18+)
```

On Windows, `winget install Anthropic.ClaudeCode` also works. Verify with `claude --version`, and run `claude doctor` if anything looks off.

## Sign in

Claude Code needs a Claude **Pro, Max, Team, Enterprise, or Console (API)** account — the free plan doesn't include it. You can also point it at Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. Start a session in your project and follow the browser prompt:

```bash
cd path/to/your/project
claude
```

Credentials are stored locally, so you sign in once.

## The core loop

Everything in Claude Code is the same loop:

1. **You describe** a task in plain language.
2. **Claude gathers context** — reads files, searches, runs commands.
3. **Claude acts** — edits code, runs tests, makes commits.
4. **You verify** — review the diff, run it, confirm it actually works.

Try it on something small:

```
explain the folder structure, then add a /health endpoint that returns 200
```

Claude reads what it needs on its own (no manually attaching files), proposes edits, and shows you a diff to approve.

## Permission modes

By default Claude asks before editing files or running commands. Press **Shift+Tab** to cycle modes:

- **default** — ask before edits and commands.
- **acceptEdits** — apply edits and safe file commands without asking; still confirms riskier ones.
- **plan** — read-only: Claude explores and proposes a plan but changes nothing until you approve.

Plan mode is the one I reach for most on anything non-trivial — more on that in the workflow notes.

## Commands and keys I use constantly

Type `/` at any time to see everything available. The essentials:

| Command / key | What it does |
| --- | --- |
| `/init` | generate a starting CLAUDE.md for the repo |
| `/clear` | start fresh — drop the current conversation |
| `/compact` | summarize the conversation to reclaim context |
| `/resume` (or `claude --resume`) | pick up an earlier session |
| `/doctor` | diagnose install / config problems |
| `Esc` | interrupt Claude mid-action and redirect it |
| `!` prefix | run a shell command directly, e.g. `! npm test` |
| `@` | mention a file path, with autocomplete |

<Callout type="info">
  `claude -p "…"` runs a single task and exits — handy for scripting or piping Claude into other commands. `claude -c` continues your most recent session.
</Callout>

## Where it runs

The terminal CLI is the full experience, but the same engine powers the VS Code and JetBrains extensions (inline diffs in your editor), the desktop app (visual review, parallel sessions), and the web app at `claude.ai/code`. Your CLAUDE.md, settings, and connected tools apply everywhere.

## Next

<PageRef space="notes" slug="claude-code-workflow" />

<PageRef space="notes" slug="customizing-claude-code" />
