Installation & Setup

Get Claude Code installed and configured on your machine.

Prerequisites

  • Node.js 18+ — Claude Code requires Node.js 18 or later
  • An Anthropic account — You'll need an API key or a Claude Pro/Team subscription

Install Claude Code

Install globally via npm:

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

Or use it directly with npx:

npx @anthropic-ai/claude-code

Authentication

On first run, Claude Code will prompt you to authenticate:

claude
# Follow the browser-based authentication flow

You can also set your API key directly:

export ANTHROPIC_API_KEY=your-key-here

Verify Installation

Check that everything is working:

claude --version
claude --help

Configuration

Claude Code stores its configuration in ~/.claude/. Key files include:

FilePurpose
~/.claude/settings.jsonGlobal settings
~/.claude/credentials.jsonAuthentication tokens
.claude/settings.jsonProject-level settings

Next Steps

Now that you're set up, try Your First Session to see Claude Code in action.