Installation & Setup

Beginner Guide ยท 8 min read

โœ“Verified for all platforms

Prerequisites

  • Node.js v18+ or Bun runtime
  • npm or bun package manager
  • Anthropic account with Pro/Max/Team subscription

Installation Methods

Method 1: Using npm

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

Bun is faster and has better compatibility with Claude Code.

Method 3: Using yarn

yarn global add @anthropic-ai/claude-code

Platform-Specific Instructions

macOS

# Install Bun if not installed
curl -fsSL https://bun.sh/install | bash

# Install Claude Code
bun install -g @anthropic-ai/claude-code

# Verify
claude --version

Linux

# Install Bun
curl -fsSL https://bun.sh/install | bash

# Install Claude Code
bun install -g @anthropic-ai/claude-code

# If permission errors, use:
sudo bun install -g @anthropic-ai/claude-code
# In WSL2 Ubuntu
curl -fsSL https://bun.sh/install | bash
bun install -g @anthropic-ai/claude-code

# Or using PowerShell (limited support)
npm install -g @anthropic-ai/claude-code

Verify Installation

claude --version
# Expected: Claude Code v2.1.88 (or similar)

Authentication

claude login

Opens browser for OAuth authentication. Provides access to KAIROS mode and Bridge.

API Key Login

export ANTHROPIC_API_KEY="sk-ant-..."
# Add to ~/.bashrc or ~/.zshrc for persistence

Configuration

Settings Location

  • macOS: ~/Library/Application Support/Claude/settings.json
  • Linux: ~/.config/Claude/settings.json
  • Windows: %APPDATA%\Claude\settings.json

Basic Configuration

{
  "theme": "dark",
  "outputStyle": "default",
  "permissions": {
    "alwaysAllow": [],
    "alwaysDeny": []
  }
}
๐Ÿ’ก Tip: After installation, see Getting Started for your first session.