ApiCabin

← Back to tutorials

Set Up Claude Code on a Fresh Laptop

Agents at work · EN · 2026-10-24 · 141 reads

1. Prepare your laptop

Claude Code runs in your terminal and helps you understand, edit, and test code inside a project. Start with a terminal, Git, and the runtime your project needs. The native Claude Code installer does not require Node.js, although a JavaScript project may still need it.

  • macOS: Open Terminal. Run xcode-select --install if Git or the command-line developer tools are missing.
  • Linux: Install Git and curl through your distribution’s package manager.
  • Windows: Install Git for Windows for a native setup, or use WSL and follow the Linux instructions inside your Linux terminal.

Check Git with git --version. If you already have a repository, clone it before continuing. Otherwise, create an empty folder for your first session.

2. Get Claude Code onto the laptop

Use the official native installer. On macOS, Linux, or inside WSL, run:

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

For a native Windows installation, open PowerShell and run:

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

These commands download and execute an installation script, so use the official address exactly as shown. Follow the installer’s instructions, then reopen your terminal and run:

claude --version

If the command is unavailable, check the installer’s PATH guidance. Your shell needs the installation directory in PATH before it can find the executable. Once the command works, run claude doctor to check the installation.

3. Create your ApiCabin API key

ApiCabin is an AI API relay for indie developers and small teams. One key provides pay-as-you-go access across multiple model providers, and the service works with Claude Code, Codex, Gemini CLI, and OpenAI-compatible SDKs.

Sign up at https://apicabin.ai, create an API key, and check your available balance and current pricing. Copy the key somewhere private while you configure your terminal. ApiCabin’s API address is https://api.apicabin.ai.

For Claude Code, check ApiCabin’s current Claude Code connection instructions and supported model identifiers. Models such as Claude Sonnet 5.5 or Claude Haiku 4.5 may appear in its catalog; use the exact identifier documented for the integration rather than guessing from a display name.

4. Configure the connection

Claude Code supports an alternative Anthropic-compatible endpoint through environment variables. In a macOS, Linux, or WSL terminal, set:

export ANTHROPIC_BASE_URL="https://api.apicabin.ai"

export ANTHROPIC_AUTH_TOKEN="YOUR_APICABIN_KEY"

In Windows PowerShell, use:

$env:ANTHROPIC_BASE_URL = "https://api.apicabin.ai"

$env:ANTHROPIC_AUTH_TOKEN = "YOUR_APICABIN_KEY"

Replace the placeholder with your actual key. These settings apply to the current terminal session. If ApiCabin’s current integration instructions specify a different authentication variable or endpoint path, follow those instructions.

Check for an existing ANTHROPIC_API_KEY or other provider configuration left over from another setup. Conflicting credentials can cause authentication problems. Keep your key out of repositories, screenshots, shared terminal logs, and project documentation.

5. Launch your first project session

Change into your project directory with cd, then run claude. Review the folder trust prompt before accepting it. Start in a small repository so you can inspect the results easily.

Try this first request: “Explain this repository’s structure and tell me how to run its tests. Do not change any files yet.” This checks that Claude Code can read the project and reach the configured service.

Use /status to inspect the session and /model to inspect or change model selection. If the default model is unavailable through your relay, use the exact supported identifier from ApiCabin’s documentation.

6. Test a small change and troubleshoot

Next, request one bounded change, such as adding a test for an existing function. Review file edits and command permission requests, run the relevant tests, and inspect git diff before committing.

  • Authentication error: Check the key, authentication variable, and account balance.
  • Model unavailable: Confirm the identifier and its Claude Code compatibility.
  • Connection error: Check the endpoint, network access, and VPN or proxy settings.
  • Settings disappear: Persist them through your shell configuration or a secure environment-loading method.

Check usage after your first session to understand costs. ApiCabin also offers residents a referral reward when friends they invite pay; consult the current referral terms for details.

Want to follow along? Signing up comes with $0.30 of credit. Sign up

More from this wall