How to Install Claude Code on Windows & Mac Easily

Quickly install Claude Code on Windows or Mac, configure your environment, and pair with Kimi API for advanced AI workflows. Automate complex tasks, run multi-step processes, and enhance your coding experience with smarter AI integration.

10 min read2026-07-02
Install Claude Code on Windows & Mac

AI coding tools are becoming a popular choice for developers who want to work faster and handle tasks more efficiently. Many users choose to install Claude Code to streamline coding workflows, automate repetitive work, and manage multi-step processes from a single environment. A proper setup on Windows or Mac helps ensure smooth performance and better integration with advanced AI services. Keep reading to learn how to install Claude Code in Windows and Mac.

How to install Claude Code on Windows?

Windows 11 provides a smooth environment for running modern AI development tools. A few simple setup steps can help ensure Claude Code works properly and connects with the services you plan to use. Follow the instructions below to complete the installation process and start using its features without issues.

Step 1: Install Claude Code using PowerShell

Open PowerShell by pressing Win + S and searching for "PowerShell". Copy and paste the installation command below into PowerShell, then press "Enter" to run it:

irm https://claude.ai/install.ps1 | iex

PowerShell will automatically download and install Claude Code. Wait until the installation process is complete before continuing. If you prefer CMD or WinGet, Claude Code also provides alternative installation methods in the official documentation.

Install Claude Code using PowerShell

Step 2: Install Git and Launch Git Bash

Download and install Git for Windows. Keep the default installation settings to ensure Claude Code can access the required command-line tools and run properly.

Install Git (required dependency)

After downloading Git, open the installer and complete the setup process with the default settings. Keep the installation path unchanged, select "Visual Studio Code" as the default editor if prompted, and make sure "Git from the command line and 3rd-party software" is selected in the PATH configuration options.

Run the Git installer

Once the installation is complete, open "Git Bash" from the Start menu to verify that Git is working correctly. Git Bash provides the terminal environment needed for Claude Code to run commands on Windows.

Launch Git Bash

Step 3: Verify Claude Code installation

Go back to PowerShell or Command Prompt and run:

claude --version

If the version number appears, Claude Code has been installed successfully. If not, continue with the PATH configuration steps.

Verify Claude Code installation

Step 4: Installation complete

Once everything is done, sign in to Claude Code and finish the setup process. After login, the tool is ready to use for running commands and managing AI-assisted workflows directly from the terminal on Windows 11.

Installation complete

How to install Claude Code on Mac/MacOS?

macOS provides a clean and simple way to set up developer tools using built-in terminal support, making installation smooth and consistent for developers. Setting up Claude Code involves following a clear terminal-based process that keeps everything organized and easy to manage. Here's how to install Claude Code on Mac.

Step 1: Install Claude Code via Terminal (curl command)

Open "Terminal" on your Mac using Spotlight Search (Cmd + Space → type "Terminal"). Copy and paste the installation command below into Terminal, then press "Enter":

curl -fsSL https://claude.ai/install.sh | bash

Terminal will automatically download and install Claude Code. Wait until the installation process is complete before moving to the next step.

Install Claude Code via Terminal (curl command)

Step 2: Confirm Claude Code installation

Wait for the installation process to complete fully. Once done, a confirmation message will appear showing that Claude Code has been installed successfully. If the terminal asks for additional setup, run the suggested command to add Claude Code to your zshrc configuration file for proper access.

Confirm Claude Code installation

Step 3: Load environment configuration

After installation, run the provided command or reload your shell configuration file. This step updates environment variables, so Claude Code works globally in your terminal without path issues. It ensures smooth access whenever you open a new terminal window.

Load environment configuration

Step 4: Launch Claude Code

In Terminal, type:

claude

Press Enter to start the Claude Code CLI. The setup screen will appear, where you can choose your preferred theme and sign-in method to complete the final configuration.

Launch Claude Code

How to integrate other LLM APIs into Claude Code?

Using Claude Code with external AI models makes development more flexible. Connecting third-party LLM APIs allows developers to run different models in one environment and manage tasks more efficiently. For example, APIs with strong long-context understanding and structured output capabilities can further enhance coding workflows. In the following steps, Kimi is used as an example to demonstrate how to connect an external LLM API with Claude Code.

Step 1: Get the Kimi API Key from the console

To obtain a Kimi API key, start by visiting the Moonshot AI open platform. Sign up for an account or log in if you already have one. Once inside the dashboard, navigate to the "API Keys" section and create a new API key.

Get the Kimi API Key from the console

Step 2: Skip login (optional setup script)

After installation, do not start Claude Code yet. Run the following script in your terminal to bypass the default onboarding/login flow:

node --eval " const homeDir = os.homedir(); const filePath = path.join(homeDir, '.claude.json'); if (fs.existsSync(filePath)) { const content = JSON.parse(fs.readFileSync(filePath, 'utf-8')); fs.writeFileSync(filePath, JSON.stringify({ ...content, hasCompletedOnboarding: true }, null, 2), 'utf-8'); } else { fs.writeFileSync(filePath, JSON.stringify({ hasCompletedOnboarding: true }), 'utf-8'); }"

Step 3: Set environment variables and launch Claude Code

Set the required environment variables to connect Claude Code to the Kimi API.

macOS / Linux

export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/ export ANTHROPIC_API_KEY=Your API Key export CLAUDE_CODE_AUTO_COMPACT_WINDOW=262144 claude

Windows

Set the same environment variables in PowerShell or system settings, then run:

$env:ANTHROPIC_BASE_URL="https://api.kimi.com/coding/" $env:ANTHROPIC_API_KEY="Your API Key" $env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144" claude

If prompted whether to use this API key, confirm to proceed. Afterwards, follow the prompts to select your trusted project folder to complete the authorization.

Run Claude Code with the new configuration

Step 4: Verify integration status

After launch, run:

/status

If the Base URL shows:

https://api.kimi.com/coding/

Then integration is successful. Even if the interface still shows Claude models, all requests are being routed through the Kimi Code API.

Verify integration status

Benefits of using the Kimi API

Using advanced AI tools in development has become a practical way to speed up work and improve overall code quality. The Kimi API adds strong support for understanding, automation, and team-based workflows in real projects. Here's how it helps developers build and manage systems more efficiently.

  • Multimodal context understanding for development tasks

The Kimi API understands different types of input like text, design mockups, architecture diagrams, flowcharts, and even videos. It turns this information into clear technical plans that developers can directly use. This helps convert ideas into working code with less manual planning.

  • More cost-efficient with context reuse

The Kimi API supports context reuse, allowing developers to continue working with existing conversations and project context instead of repeatedly sending the same information. This helps reduce unnecessary token usage, lower API costs, and make long-term development workflows more efficient.

  • Automates repetitive engineering workflows

Routine and repeated coding tasks can be automated using scripts or AI-driven workflows. These tasks can run with simple commands instead of manual effort every time. This saves time and reduces the chances of human error in daily development processes.

  • Customizable development workflows with skills and tools

The Kimi API supports custom Skills and tool integrations for different development needs. Teams can connect their own internal tools, scripts, and systems directly into the workflow. This makes the development process more flexible and project-specific.

  • Multi-agent collaboration for higher quality and efficiency

Different AI agents handle different roles such as coding, testing, architecture, and documentation. These agents can work together in sequence or in parallel to complete tasks faster. This improves both development speed and overall output quality.

Troubleshooting for installing Claude Code

When installing Claude Code on Windows or Mac, users may sometimes face small technical issues due to environment setup, Node.js version, or network conditions. These problems are common in CLI-based tools and can usually be fixed. Below are the most frequent issues and how to understand them practically.

  • "command not found: claude"

This error usually means Claude Code is not added to your system PATH. The terminal cannot locate the installed binary file. Restarting the terminal or fixing PATH settings normally resolves this issue in most cases quickly and reliably.

  • Authentication fails, or the browser does not open

This happens when the login process cannot trigger the browser automatically, often on restricted systems or remote environments. In such cases, authentication may need to be done manually using an API key. Once configured, the login process works normally without further issues.

  • "Network Error" or timeout during installation

Often caused by slow internet, firewall restrictions, or blocked npm access. The installer may fail to connect to required servers during setup. Adjusting network settings, proxy configuration, or switching connections usually fixes the problem effectively.

  • Claude Code runs slowly

Performance issues are generally not caused by the tool itself but by network latency. Since Claude Code relies on cloud API requests, unstable internet or VPN usage can slow it down. A stable connection usually improves speed significantly and consistently.

Conclusion

Learning how to install Claude Code on Windows or Mac helps you get started with a smoother AI-assisted development workflow. Once set up, you can manage coding tasks more efficiently and streamline everyday development work in a more integrated environment. For more advanced or flexible use cases, you can try the Kimi API to extend these capabilities and improve real-world development workflows.

FAQ

How to run Claude Code once installed?
Claude Code can be started by opening your terminal or PowerShell and typing the command claude. Press Enter to launch the CLI interface. If installation is correct, the setup screen will appear and guide you through login or project selection. From there, you can start using commands directly in the terminal.
Do I need a paid Claude subscription to use Claude Code?
A paid subscription is not always required, but some features may depend on your plan or access level. Basic usage and setup can often work with standard access depending on the configuration. Advanced capabilities or higher limits may require a subscription. It is best to check the official Claude plan details for confirmation.
How does the Kimi API improve your workflow in Claude Code?
The Kimi API adds support for advanced context handling, automation, and multi-step workflows inside Claude Code. It helps process long inputs, structured tasks, and complex development instructions more efficiently. This improves speed and reduces manual effort during coding. Overall, it makes the workflow more flexible and productive.