Guide

How to use Claude Code in 2026: install, first session, VS Code, phone and Windows

Install it in one line, sign in with a paid Claude plan, and start in your project folder. The commands that matter, and where else it runs.

To use Claude Code, Anthropic's coding agent, install it with one command (curl -fsSL https://claude.ai/install.sh | bash on Mac, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell), open a terminal in your project folder, run claude and sign in. It needs a Pro, Max, Team or Enterprise plan or an API account: Anthropic's docs say the free Claude plan "does not include Claude Code access." It also runs in VS Code and Cursor, the Claude desktop app, the browser at claude.ai/code and the Claude phone app.

Key takeaways

  • Install: one line on every system, or Homebrew, WinGet or npm. The native installer updates itself.
  • Plan: Pro at $20 a month is the cheapest way in; the free plan doesn't include it.
  • First session: run claude in your project, then /init to write a CLAUDE.md with your project's commands and conventions.
  • Permissions: since v2.1.283 new sessions start in auto mode; Shift+Tab switches to Manual, Accept edits or Plan.
  • Other places: the VS Code extension (Cursor too), the desktop app's Code tab, claude.ai/code and the Code tab in the Claude app for iOS and Android.
Where you can use Claude Code, from Anthropic's docs, October 7, 2026.
SurfaceHow to startGood for
Terminal (Mac, Linux, Windows)Install, then run claude in your projectEverything; every command
VS Code and CursorInstall the Claude Code extensionDiffs and plans next to your code
Desktop appThe Code tab in the Claude appNo command line
Browserclaude.ai/codeCloud sessions on a GitHub repository
PhoneThe Code tab in the Claude appCloud sessions and Remote Control

How do you install Claude Code?

From Anthropic's setup guide (Anthropic):

  • Mac, Linux or WSL: curl -fsSL https://claude.ai/install.sh | bash
  • Windows PowerShell: irm https://claude.ai/install.ps1 | iex
  • Windows CMD: curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
  • Homebrew: brew install --cask claude-code. WinGet: winget install Anthropic.ClaudeCode. Neither updates itself; upgrade with brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
  • npm: npm install -g @anthropic-ai/claude-code, with Node.js 22 or later. Never use sudo.

Open a new terminal and run claude --version to check. The native install updates itself in the background; claude update updates it now. You need macOS 13, Windows 10 (1809) or Ubuntu 20.04 or later, and 4 GB of memory.

How do you install Claude Code on Windows?

Press Win+X, open PowerShell (not as Administrator), and run irm https://claude.ai/install.ps1 | iex. You can also install inside WSL with the Mac and Linux command.

  • Git for Windows is optional. With it, Claude runs commands in Git Bash; without it, in PowerShell.
  • Sandboxing works only in WSL 2, not on native Windows.
  • The common errors mean the wrong shell: 'irm' is not recognized means you're in CMD, and an -fsSL error means you ran the Mac command in PowerShell. If 'claude' is not recognized, add %USERPROFILE%\.local\bin to your PATH and open a new terminal (Anthropic).

Can you use Claude Code for free?

Not officially. You need Pro ($20 a month, or $17 billed annually), Max, Team, Enterprise, or an API account with prepaid credits (Anthropic). Anthropic also doesn't support pointing Claude Code at other labs' models. More in Is Claude Code free? and Claude Code pricing.

Your first session in the terminal

  1. Open a terminal, go to your project with cd, and run claude. The first run opens a browser to sign in; /login switches accounts later.
  2. Ask about the project: "what does this project do?" or "where is the main entry point?" Claude reads files as it needs them.
  3. Run /init. It writes a CLAUDE.md with your build and test commands and conventions, which Claude reads at the start of every session (CLAUDE.md vs AGENTS.md).
  4. Ask for a change: "add input validation to the signup form." Claude edits the files and shows what changed.
  5. Then: "commit my changes with a descriptive message."

The commands you'll use most (Anthropic):

  • /model picks the model. On paid plans the default is Opus 5.5; /model sonnet switches to Sonnet 5.5.
  • /clear starts a fresh conversation, /compact summarizes it to free up room, and /resume or claude -c picks up an earlier one.
  • Esc stops Claude mid-step and keeps the work; Esc twice opens rewind.
  • @ points at a file. Paste images with Ctrl+V (Alt+V on Windows).
  • /usage shows how much of your plan's limit you've used (Claude Code usage limits), and /context how full the conversation is (context window).

What are the permission modes?

Since v2.1.283, interactive sessions start in auto mode: a classifier reviews each action instead of asking you (Anthropic). Shift+Tab cycles the others:

  • Manual asks before every edit and command.
  • Accept edits makes file changes without asking but still asks before commands.
  • Plan reads and proposes a plan without changing anything (Claude Code plan mode).

To always start in Manual, set defaultMode to default in your settings. Anthropic's tips for working well with it are in Claude Code best practices.

How do you use Claude Code in VS Code or Cursor?

Search "Claude Code" in the Extensions view (anthropic.claude-code), install it, open a file, and click the spark icon in the editor toolbar (Anthropic). It needs VS Code 1.94 or later, and Anthropic's page has an install link for Cursor too.

  • What it adds: side-by-side diffs you accept or reject, plans you can comment on, and Claude sees the file and the lines you have selected.
  • Change the model: click the model name under the prompt box, or type /model.
  • The terminal too: the extension doesn't add claude to your PATH; install the CLI to use it in the editor's terminal. Both share history, so claude --resume opens extension chats.

Can you use Claude Code without the terminal?

  • The desktop app: the Claude app for Mac, Windows and Linux (beta) has a Code tab. Pick a folder and a model; no Node.js or command line needed (Claude Code vs Claude desktop).
  • The browser: claude.ai/code runs sessions on Anthropic's machines against a GitHub repository, and they keep going after you close your laptop (Claude Code on the web).
  • Your phone: the Code tab in the Claude app for iOS and Android starts cloud sessions or drives a session on your own computer through Remote Control (Claude Code on your phone).

What if Claude Code isn't working?

  • Run /doctor in a session; it checks the install, PATH and settings and offers fixes. If claude won't start at all, run claude doctor from your shell (Anthropic).
  • VS Code never responds: check your connection, start a new conversation, then run claude in a terminal to see the real error.
  • It hangs: Ctrl+C, then claude --resume.

Using Claude Code as a team

A Claude Code session belongs to the person who started it. Poly (usepoly.co) runs Claude Code and Codex in a shared browser room: a team works with one agent, everyone sees each step live, and any member can approve a change before it happens. Free to start. What is Poly?

Common questions

How do I install Claude Code?

On Mac, Linux or WSL run curl -fsSL https://claude.ai/install.sh | bash. On Windows run irm https://claude.ai/install.ps1 | iex in PowerShell. Homebrew, WinGet and npm work too. Then run claude in your project folder and sign in.

Can I use Claude Code for free?

No. Anthropic's docs say the free Claude plan does not include Claude Code. The cheapest way in is Pro at $20 a month, or an API account with prepaid credits.

How do I use Claude Code in VS Code?

Install the Claude Code extension (anthropic.claude-code), open a file and click the spark icon in the editor toolbar. It needs VS Code 1.94 or later and also installs in Cursor.

How do I change the model in Claude Code?

Type /model and pick one, or start with claude --model sonnet. In VS Code, click the model name under the prompt box. On paid plans the default is Opus 5.5.

Does Claude Code work on Windows?

Yes, natively or in WSL. Install it from PowerShell with irm https://claude.ai/install.ps1 | iex; no Administrator rights are needed. Git for Windows is optional, and sandboxing needs WSL 2.