1. Sign Up with GitHub
First, sign up or log in to your account using GitHub.
2. Check Node.js
Claude Code requires Node.js 18 or later.
Run:
node --version
If your Node.js version is 18 or higher, continue to the next step.
3. Install Claude Code CLI
Run:
npm install -g @anthropic-ai/claude-code@latest
4. Check the Installation
Verify that Claude Code was installed successfully:
claude --version
5. Configure AgentRouter Environment Variables
You need to get your AgentRouter API Key first.
For macOS, Linux, or WSL
export ANTHROPIC_AUTH_TOKEN="YOUR_AGENTROUTER_API_KEY"
export ANTHROPIC_BASE_URL="https://agentrouter.org"
export ANTHROPIC_MODEL="claude-opus-5"
Replace:
YOUR_AGENTROUTER_API_KEY
with your actual AgentRouter API key.
For Windows PowerShell
$env:ANTHROPIC_AUTH_TOKEN="YOUR_AGENTROUTER_API_KEY"
$env:ANTHROPIC_BASE_URL="https://agentrouter.org"
$env:ANTHROPIC_MODEL="claude-opus-4-6"
6. Start Claude Code
Navigate to your project folder:
cd /path/to/your/project
Then start Claude Code:
claude
When Claude Code starts for the first time, if it asks whether you want to use the API key from the environment variables, confirm Yes.
7. Test the Connection
First, type:
Reply only with OK
Claude should respond:
OK













