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).
Open Terminal (press ⌘+Space, type Terminal, hit Enter). Paste this command and press Enter:
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.
Four things, in order. If any are already installed, that step is skipped:
The package manager for macOS. Lets us install everything else cleanly.
Microsoft's free code editor. Adds the code command to your terminal too.
The official native binary from Anthropic. Auto-updates in the background.
Anthropic's Claude Code panel for VS Code — graphical chat, inline diffs, plan review.
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:
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.
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.
Press ⌘+Shift+P to open the Command Palette. Type:
VS Code auto-suggests every Claude Code command. Pick one of these two — either works, it's just a preference for where Claude lives:
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.
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:
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.
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.
⌘+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
"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:
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.
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:
Open VS Code from Terminal (code .)
If you live in Terminal, this is faster than File → Open Folder. cd into any folder and run:
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:
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.
Made by AI Service Engine · view install script · Claude Code docs