Setup

Install, configure, and get Claude Code running everywhere.

Install & first run

Install Claude Code and run it for the first time.

Install via npm

Claude Code is a Node.js CLI. Install it globally with npm.

npm install -g @anthropic-ai/claude-code

Authenticate

On first run, Claude Code will open a browser window to authenticate with your Anthropic account.

claude
  • ·You need an Anthropic account. Sign up at console.anthropic.com.
  • ·Authentication is stored locally — you only do this once per machine.

Verify installation

Check that Claude Code is installed and get the version.

claude --version

Update to latest

Keep Claude Code up to date to get new features and fixes.

npm update -g @anthropic-ai/claude-code

Related commands

Windows setup

Get Claude Code running well on Windows.

Use Git Bash or WSL

Claude Code works best in a Unix-like shell environment. On Windows, use Git Bash (ships with Git for Windows) or WSL (Windows Subsystem for Linux).

  • ·PowerShell and CMD work but have known quirks with path handling and piping.
  • ·WSL gives the most Linux-compatible experience.

Install Git for Windows

Git for Windows includes Git Bash, which is the easiest way to get a good shell environment.

winget install Git.Git
  • ·Or download from git-scm.com. During install, choose "Git Bash Here" and "Use Git from command line and 3rd-party software".

Install Node.js

Claude Code requires Node.js 18+. Use winget, nvm-windows, or the official installer.

winget install OpenJS.NodeJS.LTS

Install Claude Code

Once Node is installed, install Claude Code globally.

npm install -g @anthropic-ai/claude-code

Run in Git Bash

Open Git Bash (or WSL) and run Claude from there for the best experience.

claude
  • ·Avoid running in PowerShell if you encounter issues with interactive mode.

Related commands

PowerShell vs Git Bash

Understand which shell to use on Windows and why it matters.

The short answer

Use Git Bash for Claude Code on Windows. It behaves more like a Unix terminal and avoids the most common pain points.

PowerShell quirks

PowerShell has different quoting rules, path separators, and piping behavior that can cause unexpected results with Claude Code.

  • ·Single quotes and double quotes behave differently in PowerShell.
  • ·Piping (|) works but can have encoding issues.
  • ·Path separators (backslash vs forward slash) can cause problems.

Git Bash advantages

Git Bash uses bash syntax and Unix-style paths, which Claude Code is optimized for.

# This works naturally in Git Bash:
cat error.log | claude -p "what is wrong here?"

WSL is even better

If you do a lot of development on Windows, WSL gives you a full Linux environment. Claude Code runs perfectly in WSL.

wsl --install
  • ·Restart required after WSL install. Then install Node.js inside WSL.

Mobile & SSH usage

Use Claude Code from your phone or a remote server over SSH.

SSH into your dev machine

Claude Code runs in any terminal. SSH into your dev machine or server and use it as normal.

ssh user@your-dev-machine
cd your-project
claude

Use a mobile SSH client

Apps like Termius, Blink Shell (iOS), or JuiceSSH (Android) give you a good mobile terminal experience.

  • ·Blink Shell on iOS is particularly good — supports mosh for unstable connections.
  • ·Use /compact frequently to keep context tight on slower connections.

Keep sessions alive with tmux

Use tmux so your Claude session survives connection drops.

tmux new -s claude
claude -c  # resume last session
  • ·If you lose connection, SSH back in and run: tmux attach -t claude

iPhone home screen web app

ClaudeCodeKit is optimized as a home screen web app. Add it to your iPhone home screen for fast command reference while coding on mobile.

  • ·In Safari, tap Share → Add to Home Screen.
  • ·The app loads instantly and works without internet once cached.

Related commands

Claude Code surfaces

Understand where and how you can use Claude Code.

Terminal CLI

The primary interface. Full feature set, best for deep work. Run claude in any terminal.

  • ·Best for: long sessions, complex tasks, piping, scripting.

VS Code extension

The Claude Code extension for VS Code brings the agent into your editor. Available from the VS Code marketplace.

  • ·Best for: editing-focused workflows, inline suggestions, staying in your editor.

JetBrains extension

Available for IntelliJ, WebStorm, PyCharm, and other JetBrains IDEs.

  • ·Best for: Java/Kotlin/Python developers who live in JetBrains IDEs.

claude.ai/code (web)

Access Claude Code from the browser at claude.ai/code.

  • ·Best for: quick questions, trying Claude Code without installing, reference lookups.

Desktop app

Native desktop application for Mac and Windows.

  • ·Best for: users who prefer a dedicated app over a terminal.