macOS setup guide
For macOS 12 and later (Intel and Apple silicon). macOS uses zsh by default; settings go in ~/.zshrc.
1. Open a terminal
Press ⌘ + Space, search for “Terminal” and open it. Third-party terminals such as iTerm2 also work.
2. Install Node.js
We recommend installing Node.js 18 or later with Homebrew. If you do not have Homebrew, install it first:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install node
node -v3. Set environment variables
Set the two variables below. The endpoint is https://api.tokilabs.xyz.
| Variable | Value | Used by |
|---|---|---|
ANTHROPIC_BASE_URL | https://api.tokilabs.xyz | Claude Code, Anthropic SDK |
ANTHROPIC_AUTH_TOKEN | sk-your-key | Claude Code |
cat >> ~/.zshrc <<'EOF'
# Toki Labs · Claude
export ANTHROPIC_BASE_URL="https://api.tokilabs.xyz"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"
EOF
source ~/.zshrcCheck that it worked
~/.zshrc with ~/.bash_profile in the commands above. Run echo $SHELL to see your current shell.echo $ANTHROPIC_BASE_URL4. Verify the connection
If you get a JSON model list containing "data", both the endpoint and the key are fine.
curl "$ANTHROPIC_BASE_URL/v1/models" -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"401 means the key is wrong or no longer valid; for connection timeouts, check your local proxy settings. See the FAQ.5. Install Claude Code
curl -fsSL https://claude.ai/install.sh | bashOr use Homebrew / npm:
brew install --cask claude-code
# or
npm install -g @anthropic-ai/claude-codeSkip the official account sign-in on first launch:
[ -f ~/.claude.json ] || echo '{"hasCompletedOnboarding": true}' > ~/.claude.jsonStart it in your project directory:
cd your-project
claudeAfter launch, type /status. If Base URL shows https://api.tokilabs.xyz, requests go through Toki Labs. Type /model to switch models, for example claude-opus-5-5. More settings in Claude Code configuration.
GUI apps cannot see the variables?
Apps opened from the Dock or Launchpad (such as VS Code or Cursor) may not load ~/.zshrc. The simplest fix is to launch VS Code from the terminal with code .; or enter the endpoint and key directly in the extension settings, see VS Code / Cline / Cursor.
Revert
When you no longer need it, delete these environment variables to restore the defaults:
# Open ~/.zshrc in an editor, delete the 2 export lines under "# Toki Labs · Claude", then:
unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN