Skip to main content
Chapter 1 Getting Started

Claude Code Setup

5 min read Lesson 3 / 44 Preview

Claude Code Setup

Requirements

Requirement Minimum
Node.js v18 or higher
npm / npx bundled with Node
Anthropic API key Required
OS macOS, Linux, or Windows (WSL2)

Step 1 — Install Claude Code

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

Verify the installation:

claude --version

Step 2 — Set your API key

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

Make this permanent by adding it to your shell profile (~/.zshrc, ~/.bashrc, etc.):

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

Step 3 — First run

Navigate to any project folder and run:

cd ~/my-project
claude

On first run, Claude Code prompts you to accept the terms and selects a default model. You can change the model at any time.

Step 4 — Global configuration

Claude Code stores global settings at:

~/.claude/settings.json

You can edit this manually or through the /config command inside the REPL.

Troubleshooting

claude: command not found — npm global bin directory isn't in your PATH. Add $(npm bin -g) to your PATH.

API key errors — Make sure the key starts with sk-ant- and has billing enabled on your Anthropic account.

Slow startup — Check your internet connection; Claude Code pings the Anthropic API on start.

Previous Course Overview
Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support