Skip to content

Claude Code Setup

Claude Code is Anthropic's official CLI programming assistant. With RouterBus, you can use Claude Code without a direct Anthropic subscription.

Prerequisites

Configuration

Option 1: Environment Variables

Add to your shell config (~/.bashrc or ~/.zshrc):

bash
export ANTHROPIC_BASE_URL=https://routerbus.com
export ANTHROPIC_AUTH_TOKEN=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Then reload:

bash
source ~/.bashrc  # or source ~/.zshrc

Option 2: Config File

Edit ~/.claude/settings.json:

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://routerbus.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Verify

Test the connection:

bash
claude "hello"

If you get a response, the setup is complete.

Common Commands

bash
# Use a specific model
claude --model claude-sonnet-4-20250514

# Interactive mode
claude

# Single question
claude "explain what this code does"

# Read a file
claude "review this file" < main.go

Troubleshooting

"Unable to connect to Anthropic services"

Check the following:

  1. Is ANTHROPIC_BASE_URL set to https://routerbus.com?
  2. Is your API Key valid with sufficient balance?
  3. Can your network reach routerbus.com?

How to switch models?

Use the --model flag or the /model command in interactive mode.

RouterBus API Documentation