This repository contains an automated setup script for installing and configuring Claude Code CLI to work with AMD's LLM Gateway.
Claude Code is Anthropic's official CLI tool that provides an interactive command-line interface for Claude AI. This setup script configures it to use AMD's LLM Gateway instead of Anthropic's direct API endpoints.
- 🚀 Automated Installation: Interactive setup with menu-driven installation
- 🔧 Environment Configuration: Automatically configures Claude Code for AMD LLM Gateway
- 📁 Flexible Installation: Choose between HOME directory or current directory installation
- 🛠 Launcher Creation: Creates a convenient
claudelauncher in~/.local/bin - ✅ Dependency Checking: Validates Node.js version and installs required tools
- Node.js 18+: Required for Claude Code CLI
- Install from https://nodejs.org/en/download
- npm: Node package manager (usually included with Node.js)
- AMD LLM API Key: Valid API key for AMD's LLM Gateway
- Linux/Unix Environment: Script designed for bash shell environments
- Clone or download this repository
- Run the setup script:
./setup_claude_code.sh
- Choose installation location using the interactive menu
- Set your API key:
export AMD_LLM_API_KEY='your-api-key-here'
- Start using Claude:
claude
The setup script provides two installation options:
- HOME Directory: Installs to
$HOME/node_modules/.bin/claude - Current Directory: Installs to
$(pwd)/node_modules/.bin/claude
Both options create a launcher script at ~/.local/bin/claude for easy access.
The launcher script automatically sets these environment variables:
ANTHROPIC_API_KEY: Set to "dummy" (not used with gateway)ANTHROPIC_BASE_URL: Points to AMD LLM GatewayANTHROPIC_CUSTOM_HEADERS: Sets subscription key fromAMD_LLM_API_KEYANTHROPIC_DEFAULT_SONNET_MODEL: claude-sonnet-4ANTHROPIC_DEFAULT_OPUS_MODEL: claude-opus-4ANTHROPIC_DEFAULT_HAIKU_MODEL: claude-3.5CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: Disabled for privacy
You must set your AMD LLM API key:
For bash/zsh users (add to ~/.bashrc or ~/.zshrc):
export AMD_LLM_API_KEY='your-api-key-here'For csh/tcsh users (add to ~/.cshrc):
setenv AMD_LLM_API_KEY 'your-api-key-here'# Start interactive Claude session
claude
# Run with a specific prompt
claude -p 'Create a script that cleans trailing whitespace from a file'
# Get help
claude --help
# Switch models (inside Claude)
/modelclaude-code/
├── setup_claude_code.sh # Main setup script
├── scripts/
│ └── claude_launcher_template.sh # Template for launcher script
├── package.json # NPM dependencies
└── README.md # This file
- Dependency Validation: Checks for Node.js 18+ and npm
- Package Installation: Installs
@anthropic-ai/claude-codevia npm - Configuration: Bypasses Claude Code login screens
- Launcher Creation: Creates executable launcher with proper environment setup
- PATH Setup: Provides instructions for adding
~/.local/binto PATH
If you get Node.js version errors, install Node.js 18+ from nodejs.org or use a version manager like nvm.
If claude command is not found, ensure ~/.local/bin is in your PATH:
export PATH="$HOME/.local/bin:$PATH"Verify your AMD_LLM_API_KEY is set correctly:
echo $AMD_LLM_API_KEY