Requesty
Back
Integrations · DEC '26

How to install Claude Code CLI on Mac, Windows and Linux

Install Claude Code CLI on Mac, Windows or Linux, verify the command, and start your first session with a Claude account or a pay-per-token gateway.

BYDaniel Van den BergheDATEREAD7m
IntegrationsAgentsAI Gateway
Sections (7)▾
  1. 01Install Claude Code for your operating system
  2. 02Verify the installation
  3. 03Choose how to pay for your first session
  4. 04Connect Claude Code to Requesty
  5. 05How teams run Claude Code through Requesty
  6. 06What would 220 tasks a month cost per model?
  7. 07Before you roll Claude Code out to a team

To install Claude Code CLI in December 2026, run curl -fsSL https://claude.ai/install.sh | bash on macOS or Linux, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Check the installation with claude --version, then sign in with an eligible Claude account or use a gateway key to pay per token without a Claude subscription.

Install Claude Code for your operating system

Open a terminal and run the command for your system. On Windows, paste the PowerShell command into PowerShell and the CMD command into Command Prompt.

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

The native installer needs no Node.js. Windows can run Claude Code natively or inside WSL; for WSL, open your Linux distribution's terminal and run the Linux command there. The Windows installation does not require Administrator access, according to Anthropic's setup guide.

Git for Windows is optional. It supplies Claude Code's Bash tool; without it, Claude Code uses PowerShell for shell commands.

Tip
Check which Windows terminal you opened

A PowerShell prompt starts with PS C:\. If you paste the PowerShell command into CMD, you may see 'irm' is not recognized. Some PowerShell versions reject the CMD command's && separators. Use the tab for your terminal.

You can also use a package manager. Anthropic lists these commands in its setup guide:

SystemInstall command
Mac or Linux with Homebrewbrew install --cask claude-code
Windows with WinGetwinget install Anthropic.ClaudeCode

The native installer updates Claude Code in the background. Homebrew and WinGet installations need manual updates, covered below.

Verify the installation

Claude Code needs an internet connection, at least 4 GB of RAM, and an x64 or ARM64 processor. The supported operating systems in Anthropic's setup guide include:

SystemSupported version
macOS13.0 or later
WindowsWindows 10 1809 or later, or Windows Server 2019 or later
Ubuntu20.04 or later
Debian10 or later
Alpine Linux3.19 or later

On Alpine, install Bash and curl before running the native installer. See Anthropic's setup guide for the prerequisites.

  1. 1
    Check the version

    Open a new terminal and run:

    Shell
    claude --version

    A working installation prints a Claude Code version number.

  2. 2
    Fix a command not found error

    If your terminal cannot find claude, check the native install location and make sure its directory is on your PATH. On macOS and Linux, check ~/.local/bin; on Windows, check %USERPROFILE%\.local\bin. Add the applicable directory to your shell's PATH, then open a new terminal and try claude --version again.

    See Anthropic's installation troubleshooting guide for platform-specific instructions.

  3. 3
    Run diagnostics

    Once claude --version works, run:

    Shell
    claude doctor

    This prints installation and settings diagnostics without starting a session.

Choose how to pay for your first session

Anthropic says Claude Code requires an eligible paid Claude plan or a Console account. The free claude.ai plan does not include it. To use an eligible account, open a terminal in your project folder, run claude, and follow the browser login prompts in Anthropic's setup guide.

A gateway is another option: Claude Code sends requests to the gateway, which bills for model usage per token. With Requesty, the price is the model provider's price plus 5%, and you do not need a Claude subscription.

Connect Claude Code to Requesty

You need a Requesty API key and two Claude Code environment variables. ANTHROPIC_BASE_URL selects the gateway, and ANTHROPIC_AUTH_TOKEN supplies the credential.

  1. 1
    Create a Requesty API key

    Open Requesty's Claude Code integration page, follow its link to the API Keys page, and create a key. Add credits to your organization's balance before the first session: with no balance, requests return a 402 error, as listed in Requesty's error codes.

  2. 2
    Set the gateway and key

    In the terminal where you will run Claude Code, choose the tab for your shell. The first command asks for your Requesty API key.

    Shell
    stty -echo; printf "Requesty API key: "; IFS= read -r REQUESTY_API_KEY; stty echo; printf '\n'
    unset ANTHROPIC_API_KEY
    export ANTHROPIC_BASE_URL="https://router.requesty.ai"
    export ANTHROPIC_AUTH_TOKEN="$REQUESTY_API_KEY"

    The PowerShell prompt uses secure input, as documented by Microsoft. These shell settings last for the terminal session.

    Anthropic recommends trying shell environment variables for the first connection, as described in its gateway connection guide. For a persistent setup, add this env block to ~/.claude/settings.json, following Requesty's Claude Code documentation:

    JSON
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://router.requesty.ai",
        "ANTHROPIC_AUTH_TOKEN": "YOUR_REQUESTY_API_KEY",
        "ANTHROPIC_MODEL": "openai/gpt-6.1-sol"
      }
    }

    Replace YOUR_REQUESTY_API_KEY with your Requesty API key. Keep this in the user-level file, not in shared project settings.

  3. 3
    Start in your project folder

    Change into the project folder you want to work on, then run:

    Shell
    claude

    Ask Claude Code about the project to begin your first session.

  4. 4
    Verify the gateway

    Send a message in Claude Code, then run:

    text
    /status

    Check that the Anthropic base URL line shows https://router.requesty.ai and that the auth token line shows ANTHROPIC_AUTH_TOKEN is in use. Anthropic describes these checks in its gateway connection guide.

If you receive a 401 error, check that the Requesty key is in ANTHROPIC_AUTH_TOKEN. Anthropic sends that variable as a bearer token; ANTHROPIC_API_KEY uses a different header. Remove an existing ANTHROPIC_API_KEY from project or managed settings too. Sources: Anthropic's gateway guide and Requesty's environment variable guide.

You can also set ANTHROPIC_MODEL to choose a model. Requesty's Claude Code integration page lists model IDs including openai/gpt-6.1-sol and deepseek/deepseek-v4.1-flash-1017. For more on credentials, see our Claude Code API key guide.

How teams run Claude Code through Requesty

In October 2026, 21.8% of organisations running a coding agent through Requesty used Claude Code, according to our coding agent adoption data. It carried 44.58% of their coding-agent requests.

Claude Code sessions routed through Requesty had a median of 5 calls and a p95 of 43 calls in October 2026, according to our coding agent session depth data. The p95 means 95% of those sessions had 43 calls or fewer.

If you are still choosing an agent, see our comparison of Claude Code, Cursor, Codex and Aider.

What would 220 tasks a month cost per model?

Our coding benchmark, updated in December 2026, gives a starting point for a monthly estimate. It ran 129 private Go backend tasks through Requesty's own coding agent, with the same agent and an 80-turn budget for each model.

Take one developer who runs 10 tasks per working day for 22 working days, or 220 tasks. The last cost column multiplies the benchmark cost per task by 220.

ModelBenchmark cost per taskBenchmark cost per task × 220Tasks solved in benchmark
Claude Haiku 5.5$0.11$24.2081.4%
Claude Sonnet 5.5$0.52$114.4087.6%
Claude Opus 5.5$0.93$204.6092.2%

These totals apply the benchmark's per-task cost, measured with Requesty's coding agent on its Go task mix, to 220 tasks.

At half that workload, or 110 tasks, the same calculation gives $12.10 for Haiku and $57.20 for Sonnet. For a closer estimate, run a sample of your own tasks and compare the cost and results. Our guide to the cheapest way to run Claude Code has more on model costs.

Before you roll Claude Code out to a team

Native installations update in the background. For a Homebrew installation, run brew upgrade claude-code; for WinGet, run winget upgrade Anthropic.ClaudeCode. Anthropic documents these update methods in its setup guide.

Requesty supports caps per key, user, team and organisation, as described on its Claude Code integration page. For a team rollout, see our guide to managing Claude Code costs across a team.

Before your first project

0 of 4 done

Set a spend cap on your key, then run a sample project through the gateway and check its cost.

FAQ

Is Claude Code CLI free?+

The free claude.ai plan does not include Claude Code. You can use a paid Claude plan, a Console account, or a gateway key with per-token billing.

How do I install Claude Code on Mac?+

On macOS 13 or later, run curl -fsSL https://claude.ai/install.sh | bash in a terminal. Then run claude --version to check the installation.

How do I install Claude Code on Windows?+

In Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. You can also install Claude Code with WinGet or run the Linux installer inside WSL.

Do I need Node.js to install Claude Code?+

The native Claude Code installer does not need Node.js.

Can I use Claude Code without a Claude subscription?+

Yes. Set ANTHROPIC_BASE_URL to https://router.requesty.ai and ANTHROPIC_AUTH_TOKEN to a Requesty API key. Requesty bills per token at the provider price plus 5%.

How do I check whether Claude Code is using Requesty?+

Run /status in Claude Code. The Anthropic base URL line should show https://router.requesty.ai, and the auth token line should show that ANTHROPIC_AUTH_TOKEN is in use.

How do I update Claude Code?+

Native Claude Code installations update in the background. Homebrew users can run brew upgrade claude-code, and WinGet users can run winget upgrade Anthropic.ClaudeCode.

Requesty Gateway

Start building with Requesty

One line of code. 600+ models. Full control.