Get Claude Code Running in 5 Minutes
Video walkthrough + written guide. Install VS Code and Claude Code on your Mac from scratch.
What You’ll End Up With
- Visual Studio Code (VS Code) — a free, lightweight code editor from Microsoft
- Claude Code — Anthropic’s AI coding assistant that runs in your terminal and integrates with VS Code
- A working development environment ready for AI-assisted coding
Prerequisites
- A Mac running macOS 10.15 (Catalina) or newer
- An internet connection
- An Anthropic account with one of these:
- A Claude Pro ($20/month) or Claude Max ($100+/month) subscription at claude.ai, OR
- An Anthropic API key with active billing at console.anthropic.com
Install Visual Studio Code
Step 1 — Download VS Code
- Open your web browser and go to code.visualstudio.com
- Click the large “Download for Mac” button. The site auto-detects whether your Mac has an Apple Silicon (M1/M2/M3/M4) or Intel chip.
- A
.zipfile will download (usually to your Downloads folder).
Step 2 — Install VS Code
- Open Finder and navigate to your Downloads folder.
- Double-click the downloaded
.zipfile to unzip it. You’ll see a file called “Visual Studio Code”. - Drag “Visual Studio Code” into your Applications folder.
- Open Applications and double-click “Visual Studio Code” to launch it.
- If macOS asks “Are you sure you want to open it?”, click Open.
Step 3 — Install the “code” command for Terminal
This lets you open VS Code from the command line by typing code.
- In VS Code, press ⌘ + Shift + P to open the Command Palette.
- Type:
shell command - Select “Shell Command: Install ‘code’ command in PATH”
- If prompted for your password, enter it.
Verify it works later from Terminal by typing code --version.
Open Terminal
Terminal is the built-in command-line app on your Mac. You’ll use it for the rest of this guide.
How to open Terminal:
- Press ⌘ + Space to open Spotlight Search
- Type Terminal
- Press Enter
A window will appear with a blinking cursor — this is where you’ll paste the commands in the following steps.
Install Claude Code
Claude Code has a native installer that doesn’t require Node.js or any other dependencies. This is the recommended approach from Anthropic.
Option A — Native Installer (Recommended)
Paste this command into Terminal and press Enter:
curl -fsSL https://claude.ai/install.sh | bashThat’s it. The script downloads and installs everything automatically.
Option B — Install with Homebrew
If you already have (or prefer) Homebrew:
brew install --cask claude-codebrew upgrade claude-code periodically.Verify the Installation
Confirm it worked:
claude --versionYou should see a version number (e.g., 2.0.30). If you see command not found, close Terminal and open a new window, then try again.
Run the Health Check
Claude Code includes a built-in diagnostic tool:
claude doctorThis checks your installation and reports any issues.
Authenticate Claude Code
Step 1 — Launch Claude Code
In Terminal, type:
claudeStep 2 — Choose Your Login Method
Claude Code will present authentication options:
- Claude App (Pro/Max plan): Choose this if you have a Claude Pro or Max subscription. It opens your browser to sign in with your claude.ai account.
- Claude Console (API key): Choose this if you’re using the Anthropic API to authenticate through the developer console.
Step 3 — Complete the Browser Sign-In
- Claude Code will either open your browser automatically, or display a URL.
- If the browser doesn’t open, hold ⌘ and click the URL in Terminal to open it.
- Sign in to your Anthropic/Claude account.
- Approve the authorization when prompted.
- Return to Terminal — you should see a confirmation that you’re authenticated.
Install the Claude Code Extension in VS Code
- Open Visual Studio Code.
- Click the Extensions icon in the left sidebar (it looks like four small squares), or press ⌘ + Shift + X.
- In the search bar, type: Claude Code
- Find the extension published by Anthropic and click Install.
- After installing, you’ll see a Claude icon in your left sidebar. Click it to open the Claude panel.
- Sign in if prompted (same account you used in Part 4).
Test Your Setup
Test Claude Code in Terminal
- Create a test folder and navigate to it:
mkdir ~/claude-test
cd ~/claude-test- Start Claude Code:
claude- Try a simple prompt like:
Create a hello world Python scriptClaude will generate a file and show you a diff of the proposed changes. Type y to accept.
- To exit Claude Code, type:
/exitTest Claude Code in VS Code
- Open the test folder in VS Code:
code ~/claude-test- Click the Claude icon in the sidebar.
- Ask Claude a question like: “Explain the files in this project”
Quick Reference
| Action | Command |
|---|---|
| Start Claude Code in Terminal | claude |
| Exit Claude Code | /exit |
| Check version | claude --version |
| Run diagnostics | claude doctor |
| Update Claude Code (native) | claude update |
| Update Claude Code (Homebrew) | brew upgrade claude-code |
| Open VS Code from Terminal | code . |
| Open VS Code Command Palette | ⌘ + Shift + P |
| Open VS Code Extensions | ⌘ + Shift + X |
Troubleshooting
“command not found” after installing Claude Code
Close your Terminal window and open a new one. The install script updates your shell profile, but it only takes effect in new Terminal sessions.
Browser doesn’t open during authentication
Hold ⌘ and click the URL that Claude Code displays in Terminal. Or copy the URL and paste it into your browser manually.
Claude Code feels slow or unresponsive
Run claude doctor to check for issues. Make sure you have a stable internet connection.
Permission errors during install
Do not use sudo with the install commands. The native installer (Option A) is the cleanest approach.
Need to completely uninstall and start fresh
# Remove Claude Code binary
rm -rf ~/.local/bin/claude
rm -rf ~/.local/share/claude
# Remove settings and cache
rm -rf ~/.claude
rm ~/.claude.jsonThen re-run the install command from Part 3.