Skip to content

SOP-001: Installation & Setup

DOCUMENT CONTROL

FieldValue
SOP IDSOP-001
Version1.0
StatusActive

Purpose

This procedure covers the complete installation and initial setup of Claude Code, Anthropic's official AI coding assistant.

Prerequisites

  • Node.js 18+ installed
  • npm or compatible package manager
  • Terminal access
  • Anthropic account (or OAuth provider)

Installation Flow

┌─────────────────────────────────────────────────────────────────────┐
│                     INSTALLATION PROCEDURE                           │
└─────────────────────────────────────────────────────────────────────┘

    ┌─────────────┐     ┌─────────────┐     ┌─────────────┐
    │  INSTALL    │────►│ AUTHENTICATE│────►│  CONFIGURE  │
    │   CLI       │     │             │     │             │
    └─────────────┘     └─────────────┘     └─────────────┘
          │                   │                   │
          ▼                   ▼                   ▼
    npm install -g      Browser OAuth       /config menu
    @anthropic-ai/      or API key
    claude-code

Step-by-Step Procedure

Step 1: Install Claude Code CLI

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

macOS/Linux Note

You may need to use sudo depending on your npm configuration:

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

Step 2: Verify Installation

bash
claude --version

Expected output: Version number (e.g., 1.0.34)

Step 3: Navigate to Project Directory

bash
cd /path/to/your/project

Step 4: Start Claude Code

bash
claude

Step 5: Complete Authentication

On first run, you'll be prompted to authenticate:

┌─────────────────────────────────────────────────────────────────────┐
│                     AUTHENTICATION OPTIONS                           │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   Option 1: OAuth (Recommended)                                     │
│   ─────────────────────────────                                     │
│   • Browser opens automatically                                     │
│   • Sign in with Google, GitHub, or email                          │
│   • Free tier: $5 credit included                                  │
│                                                                     │
│   Option 2: API Key                                                 │
│   ─────────────────                                                 │
│   • Set ANTHROPIC_API_KEY environment variable                     │
│   • Usage billed to your Anthropic account                         │
│                                                                     │
│   Option 3: Enterprise (Claude for Enterprise)                      │
│   ──────────────────────────────────────────────                    │
│   • Use your organization's Claude for Enterprise account          │
│   • Requires prior enterprise setup                                │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Step 6: Verify Connection

After authentication, you should see the Claude Code prompt:

╭─────────────────────────────────────────────╮
│ Claude Code                                  │
│ /path/to/your/project                       │
╰─────────────────────────────────────────────╯

>

Environment Variables

VariablePurposeRequired
ANTHROPIC_API_KEYAPI authenticationOnly if not using OAuth
CLAUDE_CODE_USE_BEDROCKUse AWS BedrockOptional
CLAUDE_CODE_USE_VERTEXUse Google VertexOptional

Verification Checklist

  • [ ] Claude Code CLI installed successfully
  • [ ] claude --version returns version number
  • [ ] Authentication completed (OAuth or API key)
  • [ ] Claude Code prompt appears in project directory
  • [ ] First prompt/response works correctly

Troubleshooting

IssueSolution
"command not found"Ensure npm global bin is in PATH
Authentication failsCheck internet connection, try again
Permission deniedUse sudo for installation (macOS/Linux)
Old Node.js versionUpgrade to Node.js 18+

Next Steps

Based on Official Claude Code Documentation