59API

← Retour aux guides

Set Up Claude Code on Windows, macOS, and Linux

Claude Code · EN · 2026-08-12

1) Start with the right API endpoint

Claude Code works best when your API connection is simple, stable, and compatible with Anthropic-style requests. If you want lower usage costs without changing your workflow, 59API is a strong option: it’s a pay-as-you-go AI relay with native, official-quality models, cheap rates, and support for Claude Code plus OpenAI SDKs. Use this base URL in your client or environment config: https://api.59api.com.

Why this matters: you keep the same developer experience, but you avoid paying premium direct-model prices every time you run a prompt, refactor, or code review. The referral rebate is a nice extra if you plan to share access with teammates.

2) Install the basics first

Before setting up Claude Code, make sure your machine has the core tooling installed:

Check versions in a terminal before you start. On any OS, a quick git --version and node --version saves time later.

3) Windows: use PowerShell and a clean shell setup

On Windows, the smoothest path is usually PowerShell or Windows Terminal. Install Git for Windows, then install Node.js LTS if your Claude Code tooling needs it. If you prefer a Unix-like environment, WSL2 is also a solid option, especially for projects that already assume Linux commands.

Tip: if your Windows shell has trouble with path or quoting issues, use WSL2 for fewer headaches. Claude Code workflows often feel more predictable there.

4) macOS: install through Homebrew when possible

On macOS, Homebrew makes setup fast and repeatable. Install Git and Node with brew if they are not already on your system. Then open Terminal or iTerm2 and configure your environment variables for the API key and base URL.

If you work across multiple Macs, keeping your Claude Code config in a shell profile or dotfile makes it easier to replicate the setup. That’s especially useful when you want to switch between local experiments and production-ready projects without reconfiguring everything.

5) Linux: keep it minimal and reproducible

Linux is usually the easiest environment for Claude Code because you can make everything explicit. Install Git, Node.js, and any build tools your repository needs. Then export the required variables in your shell profile or, better, load them from a project-specific .env file if your workflow supports it.

For servers and remote dev boxes, Linux plus 59API is a practical combo: you get low-cost model access, no model downgrade, and a clean setup that scales from local development to CI-style automation.

6) Configure Claude Code with the relay settings

Most issues come down to one of three things: the wrong base URL, a missing key, or a model name mismatch. Double-check that your Claude Code or compatible client is using the relay endpoint, not the default provider endpoint. For 59API, the important part is the base URL: https://api.59api.com.

If you’re also using OpenAI-compatible tools, the same relay can simplify your stack because 59API works with Claude Code, Codex, and any OpenAI SDK.

7) Test with a real coding task, not a toy prompt

Don’t stop after “hello world.” Ask Claude Code to inspect a small project, summarize a file, or suggest a refactor. That verifies your auth, base URL, and model access in one shot. A real task also helps you confirm latency and response quality before you commit to a bigger workflow.

If the response fails, check your network, your environment variables, and whether your account has the right access. With a relay like 59API, debugging is usually straightforward because the setup mirrors standard API usage.

8) Keep costs under control from day one

Claude Code can be surprisingly economical when you use the right model for the right job. Reserve top-tier models for deep reasoning, complex architecture, and tricky refactors. Use lighter models for summaries, formatting, and repetitive edits. Because 59API is already among the cheapest relays, that model discipline can stretch your budget even further.

In practice, that means more iterations, more code review, and more automation for less money. If you’re setting this up for a team or a side project, it’s a smart place to start. If you want a low-cost, official-quality setup that works across Windows, macOS, and Linux, sign up for 59API and wire it into your Claude Code workflow today.

Tarifs · Docs

PrĂȘt Ă  commencer ?

Connectez Claude et GPT en quelques minutes aux prix les plus bas, sans bridage. Inscrivez-vous pour votre clé API.

Inscription gratuite