All Guides

Claude Code Setup

Install Anthropic Claude Code CLI on your server or PC. API key configuration and basic commands.

Intermediate15 min

Setup Steps

1. Node.js 18+ must be installed. Check:

node --version

2. Install Claude Code globally via npm:

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

3. Set your API key as an environment variable:

export ANTHROPIC_API_KEY="sk-ant-api03-..."

4. Make it persistent by adding to .bashrc or .zshrc:

echo 'export ANTHROPIC_API_KEY="sk-ant-api03-..."' >> ~/.bashrc
source ~/.bashrc

5. Launch Claude Code:

claude

6. Run in a project directory:

cd /project/directory
claude

7. One-shot command execution:

claude -p "Is there a bug in this code?"