Claude CLI Setup Guide (macOS & Windows)
Step-by-step guide to installing Claude CLI on macOS and Windows, including environment variable setup and verification.
Claude CLI Setup Guide
This guide explains how to install Claude CLI on macOS and Windows from scratch.
Official documentation:
https://code.claude.com/docs/en/setup
macOS Installation
Run the following command in your terminal:
1
curl -fsSL https://claude.ai/install.sh | bash
Note
Installing via Homebrew is not recommended, because it does not support automatic updates. Use the native installation instead.
Verify Installation
After installation, check the version:
1
claude -v
You can also check the current system status:
1
claude doctor
Windows Installation (PowerShell)
Run the following command in PowerShell:
1
irm https://claude.ai/install.ps1 | iex
Note
Installing via winget is not recommended, because it does not support automatic updates. Use the native installation instead.
Environment Variable Setup (Windows)
After installation, you may see a message like:
1
native installation exists but C:\Users\...\bin is not in your Path
To fix this:
Copy the path shown in the message
Go to System → Advanced system settings
Click Environment Variables
Find Path → click Edit
Click New → paste the copied path
Click OK to save
Verify Installation
After setting the environment variable, run:
1
claude -v
Make sure the version is displayed correctly.
Optional: Recommended Tools
For development, it is recommended to install:
Node.js
Git
These tools are not required, but they are helpful when building projects or working with code.
