Install Claude Code
Get Claude Code running in your terminal in under 5 minutes
What is Claude Code?
Claude Code is a terminal-based AI agent that reads, writes, and runs code in your projects. It operates directly in your shell, not inside an editor.
Install
Requires Node.js 18+. If you need Node.js:
# macOS (Homebrew) brew install node # Or use a version manager (nvm) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash nvm install 22
Then install Claude Code:
npm install -g @anthropic-ai/claude-code
Source: docs.anthropic.com/en/docs/claude-code/overview
Authenticate
Personal account (fastest)
claude login
Opens your browser to sign in. Your session persists across terminal restarts. Requires a Max or Team plan.
API key
export ANTHROPIC_API_KEY="sk-ant-api03-..."
Add to ~/.zshrc or ~/.bashrc to persist. Get keys at console.anthropic.com/settings/keys.
AWS Bedrock
Route through your AWS account. Add these exports to ~/.zshrc:
export CLAUDE_CODE_USE_BEDROCK=1 export ANTHROPIC_MODEL="us.anthropic.claude-sonnet-4-20250514-v1:0"
Requires AWS credentials configured via aws configure. Costs appear in AWS Cost Explorer, not the Anthropic console.
Source: docs.anthropic.com/en/docs/claude-code/bedrock-vertex
Initialize a project
claude /init
This scans your codebase and generates a CLAUDE.md with structure, commands, and conventions pre-filled. Customize from there.
Verify
claude --version claude "say hello"
First session tips
- Start in your project root so Claude can see your files
- Use
claude --resumeto continue where you left off - Type
/helpinside a session for available commands