Claude / Operating Manual · Setup

← All Operating Manual pages

Installation & Setup

Get Claude Code installed, authenticated, and ready to use in one sitting.

GA · updated 2026-06-07

Install Claude Code via whichever package manager you already use. On macOS/Linux/WSL the fastest path is the install script: curl -fsSL https://claude.ai/install.sh | bash. Homebrew works too: brew install --cask claude-code. On Windows use winget install Anthropic.ClaudeCode. If you need a portable install that follows your Node version, npm install -g @anthropic-ai/claude-code (Node 18+) does the same job.

After install, run claude and follow the auth prompts. The default flow authenticates against your Anthropic account. If you'd rather use a raw API key, set ANTHROPIC_API_KEY in your environment. Grab the key from platform.claude.com. Enterprise users on AWS Bedrock, Google Vertex, or Azure can set CLAUDE_CODE_USE_BEDROCK=1, CLAUDE_CODE_USE_VERTEX=1, or CLAUDE_CODE_USE_FOUNDRY=1 respectively, then configure credentials through their cloud provider's standard auth path.

How you use it day-to-day

  • Start a session. Run claude from any project root. It reads your local .claude/settings.json and any CLAUDE.md files it finds on the way up the directory tree.
  • Single-shot queries. claude "your question" or claude -p "query" runs, prints, and exits. Useful in scripts or when you just need one answer.
  • Continue where you left off. claude -c resumes the last session; claude -r <session-id> "message" jumps to a specific one.
  • Write CLAUDE.md early. Drop one in your repo root with your project's commands, key files, code style rules, and branch conventions. This context loads automatically every session. Press # inside a session to add a note and Claude will write it to CLAUDE.md for you.
  • Scope settings per project. Put team-shared config in .claude/settings.json and personal overrides (credentials, paths, local tool paths) in .claude/settings.local.json. Global defaults live in ~/.claude/settings.json.
  • Reference files with @. Type @./src/api.ts or @./src/ in any prompt to pull a file or directory into context without copy-pasting.

Gotchas

  • Auth order matters. If ANTHROPIC_API_KEY is set, it takes priority over interactive auth. Unset it if you want the account-based flow.
  • Node 18+ for npm install. Older Node versions will silently fail or produce confusing errors.
  • CLAUDE.md is cumulative. Files in parent directories are all loaded. A monorepo root CLAUDE.md stacks with module-level ones. Keep them non-redundant or they eat context fast.
  • Settings hierarchy. Local overrides project, project overrides user-global. A setting you can't change might be locked at a higher level.
  • /permissions is your friend on first run. Claude will ask to approve tools one-by-one by default. Run /permissions to bulk-configure what's always allowed so you're not interrupted mid-task.

Day-one CLAUDE.md tip: the three things that pay off immediately: your primary test command, your branch naming convention, and any "never touch" files or folders. Add those first; everything else can come later.