Claude Code Setup Guide

A beginner-friendly macOS / Windows guide. It covers Claude Code CLI, IDE terminal usage and the standalone Claude desktop client gateway.

There are two different Claude surfaces. Claude Code CLI runs in a terminal and reads environment variables. The Claude desktop client is a standalone app where you configure the dolinx gateway and API key inside the app, without terminal environment variables.

RECOMMENDED · 30 SECONDS

One-command install. Do step 2 first to get your API key, then run this single command instead of steps 1 and 3 — it installs Claude Code and writes the environment variables automatically. If Claude Code is already installed, it skips tool installation and only configures the environment; re-running is safe.

# macOS / Linux
curl -fsSL https://dolinx.com/install.sh | bash -s -- --claude-key sk-your-claude-key

# Windows PowerShell
$env:CLAUDE_KEY="sk-your-claude-key"; irm https://dolinx.com/install.ps1 | iex

See the Setup Center for what the script does, or keep reading for the manual walkthrough.

What is a terminal?

A terminal, command line or PowerShell is a small window where you type commands. For this guide, you only need copy, paste and Enter.

macOS: press Command + Space, type Terminal and press Enter. Windows: open the Start menu, search PowerShell and open Windows PowerShell.

1. Install Claude Code

Claude Code is Anthropic's command-line coding tool. Paste the command for your system into the terminal.

macOS / Linux

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

Windows PowerShell

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

After installation, close the terminal, open a new one and run claude --version.

2. Get your dolinx API key

  1. Open the dolinx console and sign in.
  2. Go to API Keys and create a new key.
  3. Copy the key that starts with sk-.
Your sk- key is a credential. Keep it private.

3. Set environment variables for Claude Code CLI

Skip this section if you only use the Claude desktop client. The client uses in-app gateway settings instead.
VariableValue
ANTHROPIC_BASE_URLhttps://api.dolinx.com
ANTHROPIC_AUTH_TOKENYour sk- API key

macOS / Linux

# Temporary, current terminal only
export ANTHROPIC_BASE_URL=https://api.dolinx.com
export ANTHROPIC_AUTH_TOKEN=sk-***

# Permanent for zsh
echo 'export ANTHROPIC_BASE_URL=https://api.dolinx.com' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN=sk-***' >> ~/.zshrc
source ~/.zshrc

Windows PowerShell

# Temporary, current window only
$env:ANTHROPIC_BASE_URL = "https://api.dolinx.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-***"

# Permanent, reopen terminal afterwards
setx ANTHROPIC_BASE_URL "https://api.dolinx.com"
setx ANTHROPIC_AUTH_TOKEN "sk-***"

4. Start using Claude Code

CLI

If you used permanent variables, open a new terminal before running Claude Code.
cd ~/your-project
claude

Common slash commands include /init, /model, /clear and /status.

IDE terminal

Open your project in VS Code or Cursor, open the integrated terminal and run claude. If the IDE was open before you set the variables, quit it fully and reopen it.

Claude desktop client

This refers to the standalone Claude app from claude.ai/download.

  1. Enable developer mode: Help -> Troubleshooting -> Enable Developer Mode.
  2. Open Developer -> Configure third-party inference.
  3. Set Connection to Gateway.
  4. Fill the gateway credentials below.
Gateway base URLhttps://api.dolinx.com
Gateway API keyYour sk- key
Gateway auth schemebearer
Credential kind, if shownStatic API key
Claude desktop Configure third-party inference connection screen
Claude desktop: Developer -> Configure third-party inference -> Connection.

Click Apply locally, let the app restart into third-party gateway mode, then choose Start in Cowork on 3P when prompted.

Troubleshooting

SymptomFix
command not found: claudeClose the terminal and open a new one.
401 / unauthorizedCheck ANTHROPIC_AUTH_TOKEN, your sk- key and extra spaces.
Spinning or timeoutCheck that ANTHROPIC_BASE_URL is exactly https://api.dolinx.com.
Variables do not work in VS Code / CursorQuit the IDE fully and reopen it so it reloads environment variables.
No Developer menu in Claude appEnable developer mode from Help -> Troubleshooting, then restart the app.
Gateway error in Claude appCheck base URL, API key and auth scheme = bearer.
Do not mix Claude and OpenAI environment variables. Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN; Codex uses config.toml and ~/.codex/auth.json.