59API

← Volver a las guías

Claude Code Setup Guide for Windows, macOS & Linux

Claude Code · EN · 2026-07-22

Quick start: what you need first

Claude Code is a terminal-first workflow, so the fastest setup is on a machine with a recent Node.js install, Git, and a shell you use every day. Before you start, check that Node.js 18+ is installed and that npm works. If you plan to work inside repositories, install Git too.

For most developers, the flow is simple: install Claude Code, connect it to a provider, then test it inside a project folder. If you want to keep costs down without giving up model quality, 59API is a strong option. It is an AI API relay with cheap pay-as-you-go pricing, support for Claude models like Opus, Sonnet, Haiku and Fable, and it works with Claude Code, Codex and OpenAI SDKs through the base URL https://api.59api.com.

Install Claude Code

On macOS and Linux, the standard path is to install the CLI globally with npm:

If you already have Node.js, this usually takes less than a minute. If not, install Node first and then rerun the Claude Code install command.

macOS setup

macOS is the easiest environment if you already use Homebrew. A practical setup looks like this: install or update Homebrew, install Node.js and Git, then install Claude Code. After that, open a repository and verify the CLI starts cleanly.

If you use iTerm2, Terminal, or another shell, the experience should be the same. The key is to keep Node.js current so the CLI and its dependencies do not fail during install.

Linux setup

On Linux, use your distro packages or a Node.js version manager. Ubuntu and Debian users can install Git and Node.js with apt, while more advanced users may prefer nvm to pin a version per project. After that, install Claude Code globally and run it inside a codebase.

Linux is usually the most predictable place to run coding agents because shell tools, file permissions and path handling are straightforward. If you script your workflow, Linux is also the easiest place to automate repeatable tasks.

Windows setup: use WSL2 for the smoothest path

For Windows, the most reliable setup is WSL2 with Ubuntu. This gives you a Linux shell, native package management, and fewer surprises with file paths and command-line tools. Once WSL2 is enabled, install Ubuntu, open the Ubuntu terminal, and follow the same Node.js plus Claude Code steps you would use on Linux.

If you keep your code in the WSL filesystem, performance is usually better than working directly on mounted Windows drives. That small choice saves a lot of friction when the agent reads, edits and runs files repeatedly.

Connect Claude Code to 59API

Once Claude Code is installed, point it at 59API instead of a direct provider endpoint. Use your 59API API key and set the base URL to https://api.59api.com. Claude Code is fully compatible with 59API, so the same workflow still applies, but your requests route through a cheaper relay.

This is especially useful if you switch between models by task. A good default is Sonnet for everyday coding, Haiku for fast cheap prompts, and Opus for larger refactors or difficult reasoning. You still get native official-quality models, not a downgraded substitute, which is the main reason many developers choose 59API over lower-end relays.

59API also uses pay-as-you-go pricing, so you only pay for what you actually use. If you share it with teammates or publish your setup, the referral rebate can further reduce your effective cost. If you do not have an account yet, it is worth signing up before you wire in the base URL.

Run a quick test

Open a repo and ask Claude Code to do one small, concrete task:

If the CLI responds and can inspect files, your setup is done. If not, check your Node.js version, confirm your API key is set, and make sure the base URL matches the 59API endpoint exactly. On Windows, verify you are running inside WSL2 if you chose the recommended path.

Precios · Docs

¿Listo para empezar?

Conecta Claude y GPT en minutos a los precios más bajos, sin recortes. Regístrate para obtener tu clave API.

Registro gratis