Post

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 (macOS & Windows)

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:

  1. Copy the path shown in the message

  2. Go to System → Advanced system settings

  3. Click Environment Variables

  4. Find Path → click Edit

  5. Click New → paste the copied path

  6. Click OK to save


Verify Installation

After setting the environment variable, run:

1
claude -v

Make sure the version is displayed correctly.


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.


This post is licensed under CC BY 4.0 by the author.