← Back to Lessons
macOS Installer

Install Claude Code in VS Code (Mac)

One terminal command sets up Homebrew, VS Code, and Claude Code (CLI + VS Code extension). No prior coding experience required.
⏱ About 5 minutes

What this does. You'll paste one command into Terminal. It installs everything Claude Code needs on macOS, skipping anything you already have. After that, you open VS Code, sign into Claude, and start using it.

Safe to re-run. Every step checks for existing installs before doing anything. If something fails partway through, just run it again.

Requirements: macOS 13.0 or later, 4 GB RAM, and a paid Claude account (Pro, Max, Team, Enterprise, or Console with credits).

1
Run the installer

Open Terminal (press +Space, type Terminal, hit Enter). Paste this command and press Enter:

curl -fsSL https://aiserviceengine.com/claude-code-install/setup.sh | bash
What to expect

The script will ask for your Mac password (for Homebrew) and may open your browser. Anything already installed is skipped. Takes 3-7 minutes depending on what you already have.

2
What the script installs

Four things, in order. If any are already installed, that step is skipped:

1 / 4 — Homebrew

The package manager for macOS. Lets us install everything else cleanly.

2 / 4 — VS Code

Microsoft's free code editor. Adds the code command to your terminal too.

3 / 4 — Claude Code CLI

The official native binary from Anthropic. Auto-updates in the background.

4 / 4 — VS Code Extension

Anthropic's Claude Code panel for VS Code — graphical chat, inline diffs, plan review.

3
Open VS Code & pick a folder to work in

Open VS Code via Spotlight: press +Space, type Visual Studio Code, hit Enter. Dismiss the welcome tab.

Now open the folder you'll work in. In the top menu bar, click:

File → Open Folder...

A native macOS picker opens. Pick any folder — an existing project, your Documents, or click the "New Folder" button at the bottom-left of the dialog to create one in place. Then click Open.

Why a folder?

Claude works best when it has a folder to read from. Even an empty folder is fine — Claude can create files in it. If you skip this step, Claude has no project context.

4
Start a Claude Code session

Press +Shift+P to open the Command Palette. Type:

Claude Code

VS Code auto-suggests every Claude Code command. Pick one of these two — either works, it's just a preference for where Claude lives:

Option A — Claude Code: Open in New Tab

Opens Claude as its own editor tab — takes the full editor area. Best when you want to focus on the chat without code files in view.

Option B — Claude Code: Open in Side Bar

Docks Claude in the right sidebar so you can chat and edit files side by side. Best when you want to see code and the conversation at once.

Either works. You can switch later. Hit Enter on whichever you picked.

The first time you open the panel, a sign-in screen appears automatically. Click Sign in, complete the sign-in in your browser, then come back to VS Code. Your session is now ready.

Try your first prompt:

Research the best way to get started with Claude Code, make it into an HTML file, and open it.

Claude will research the topic, write a custom HTML page summarizing what it found, and open it in your browser. From here, just talk to it like a teammate — ask it to write code, fix bugs, explain things, refactor, run commands.

Heads up

Paid Claude account required. Claude Code works with Pro, Max, Team, or Enterprise plans, or a Claude Console account with prepaid API credits. The free Claude.ai plan does not include Claude Code. Sign up at claude.com/pricing first if you don't have one.

Useful keyboard shortcuts

+Shift+P — Command Palette (find any Claude Code command)

+Esc — Toggle focus between editor and Claude

Option+K — @-mention current file + selection into Claude

+B — Toggle the left sidebar

+S — Save the current file

5
Troubleshooting

"command not found: brew" after install

Homebrew installed but isn't on your PATH yet. Close Terminal, reopen it, and re-run the installer command. The script adds Homebrew to your shell profile automatically — restart picks it up.

The Spark icon (✱) is missing from the top of the editor

This is by design. The Spark icon in the Editor Toolbar (top-right of the editor) only appears when a file is open. If you just have a folder open with no file selected — like when you first run "Open Folder..." — the icon is not shown. Open any file from the Explorer to see it.

This is also why we recommend using the Command Palette (+Shift+P → "Claude Code") as the primary way to start a session: it works regardless of whether any file is open.

If the Spark icon is missing from everywhere (Activity Bar, Status Bar, and Editor Toolbar) even after opening a file, the extension isn't loaded. Run Developer: Reload Window from the Command Palette, or reinstall the extension via +Shift+X → search "Claude Code" by Anthropic → Install.

Command Palette doesn't show Claude Code commands

The extension isn't loaded. Quit VS Code completely (+Q), reopen it, and try +Shift+P again. If still nothing, reinstall the extension: +Shift+X → search "Claude Code" by Anthropic → Install. Also confirm you're on VS Code 1.98.0 or newer (Code menu → About).

The script halted asking for my Mac password

That's Homebrew asking for sudo to install. Type your Mac login password (you won't see characters as you type) and press Enter.

I'm on Windows or Linux

This installer is macOS only. For Windows or Linux, follow Anthropic's official guide: code.claude.com/docs/en/setup.

How do I know my install is healthy?

Anthropic ships a built-in diagnostic. Run this in Terminal:

claude doctor

It checks your install, PATH, version, auth state, and network reachability, and prints what to fix if anything is wrong.

I'm on macOS 12 (Monterey) or older

Claude Code requires macOS 13.0 (Ventura) or later. Update macOS via Apple menu → System Settings → General → Software Update, then re-run the installer.

Can I re-run the script safely?

Yes. Every step checks if something is already installed and skips it. Re-running is harmless.

6
Advanced (optional)

Once you're comfortable with the basics, these power-user shortcuts are worth knowing.

Other ways to open the Claude panel

Besides the Command Palette, the Spark icon (✱) opens Claude from three places:

  • Activity Bar (far-left vertical strip): opens your Claude sessions list.
  • Editor Toolbar (top-right of the editor): only visible when a file is open. Opens Claude tied to the current file.
  • Status Bar (bottom-right of the window): "✱ Claude Code" works even with no file open.

Open VS Code from Terminal (code .)

If you live in Terminal, this is faster than File → Open Folder. cd into any folder and run:

code .

The . means "this folder." If you get command not found: code, open VS Code, press +Shift+P, run Shell Command: Install 'code' command in PATH, then restart Terminal.

Use Claude Code in the terminal (no VS Code at all)

The installer also installs the claude CLI. From any folder:

cd ~/Documents/my-project claude

Same Claude, no editor. Good for quick one-off questions or for users who prefer the terminal. Run claude --help for all commands, or claude doctor to verify your install.

Questions?

Made by AI Service Engine · view install script · Claude Code docs