Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

claude-code-using-openrouter

Install Claude code

check with Claude code if the links aren't working

linux,wsl,macos

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

Windows powershell

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

Windows CMD

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Setup the env variables

# Open your shell profile in nano
# nano ~/.zshrc # for zsh
nano ~/.bashrc # for Bash users
# Add these lines to the file: for bash users
# OpenRouter Configuration
export OPENROUTER_API_KEY="<your-openrouter-api-key>"
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY="" # Important: Must be explicitly empty
export ANTHROPIC_MODEL = "openrouter/free" # to use openrouter's free models only.

# After saving, restart your terminal for changes to take effect
notepad $PROFILE # for windows users

# Add these lines to the file: for powershell users
# OpenRouter Configuration
$env:OPENROUTER_API_KEY = "<your-openrouter-api-key>"
$env:ANTHROPIC_BASE_URL = "https://openrouter.ai/api"
$env:ANTHROPIC_AUTH_TOKEN = $env:OPENROUTER_API_KEY
$env:ANTHROPIC_API_KEY = "" # Explicitly empty

# After saving, restart your terminal for changes to take effect

Run Claude

Test with /status within Claude

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors