Sections (7)▾
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.
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iexcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdcurl -fsSL https://claude.ai/install.sh | bashThe 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.
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:
| System | Install command |
|---|---|
| Mac or Linux with Homebrew | brew install --cask claude-code |
| Windows with WinGet | winget 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:
| System | Supported version |
|---|---|
| macOS | 13.0 or later |
| Windows | Windows 10 1809 or later, or Windows Server 2019 or later |
| Ubuntu | 20.04 or later |
| Debian | 10 or later |
| Alpine Linux | 3.19 or later |
On Alpine, install Bash and curl before running the native installer. See Anthropic's setup guide for the prerequisites.
- 1Check the version
Open a new terminal and run:
Shellclaude --versionA working installation prints a Claude Code version number.
- 2Fix a command not found error
If your terminal cannot find
claude, check the native install location and make sure its directory is on yourPATH. On macOS and Linux, check~/.local/bin; on Windows, check%USERPROFILE%\.local\bin. Add the applicable directory to your shell'sPATH, then open a new terminal and tryclaude --versionagain.See Anthropic's installation troubleshooting guide for platform-specific instructions.
- 3Run diagnostics
Once
claude --versionworks, run:Shellclaude doctorThis 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.
- 1Create 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.
- 2Set 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.
Shellstty -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"powershell$secure = Read-Host "Requesty API key" -AsSecureString Remove-Item Env:ANTHROPIC_API_KEY -ErrorAction SilentlyContinue $env:ANTHROPIC_BASE_URL = "https://router.requesty.ai" $env:ANTHROPIC_AUTH_TOKEN = [System.Net.NetworkCredential]::new('', $secure).PasswordThe 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
envblock 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_KEYwith your Requesty API key. Keep this in the user-level file, not in shared project settings. - 3Start in your project folder
Change into the project folder you want to work on, then run:
ShellclaudeAsk Claude Code about the project to begin your first session.
- 4Verify the gateway
Send a message in Claude Code, then run:
text/statusCheck that the Anthropic base URL line shows
https://router.requesty.aiand that the auth token line showsANTHROPIC_AUTH_TOKENis in use. Anthropic describes these checks in its gateway connection guide.
For Claude Code, use https://router.requesty.ai without /v1. Claude Code adds /v1/messages itself. For EU data residency, pair https://router.eu.requesty.ai with an EU-hosted model, as described on Requesty's Claude Code integration page.
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.
| Model | Benchmark cost per task | Benchmark cost per task × 220 | Tasks solved in benchmark |
|---|---|---|---|
| Claude Haiku 5.5 | $0.11 | $24.20 | 81.4% |
| Claude Sonnet 5.5 | $0.52 | $114.40 | 87.6% |
| Claude Opus 5.5 | $0.93 | $204.60 | 92.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.
