Claude Code with Unbound integration - Drop-in replacement for Claude Code with multi-provider routing and cost optimization
npm install unbound-claude-codeUnbound Code is a drop-in replacement for Claude Code that automatically routes your API calls through Unbound.
``bash`
npm install -g unbound-claude-code
Simply replace claude with unbound-claude-code in your commands:
`bashInstead of: claude chat
unbound-claude-code chat
$3
1. Get your Unbound API key from gateway.getunbound.ai
2. Run
unbound-claude-code - you'll be prompted to enter your API key
3. Your API key will be securely stored for future use
4. Use Claude Code normally - it will authenticate with your Claude/Anthropic key as usual🔧 Configuration
$3
`bash
Set API key directly
unbound-claude-code --api-key YOUR_UNBOUND_KEYUse environment variable
export UNBOUND_API_KEY=your_key_here
unbound-claude-codeView current configuration
unbound-claude-code --show-configClear stored configuration
unbound-claude-code --clear-config
`$3
`bash
Show help
unbound-claude-code --helpEnable debug logging
unbound-claude-code --debugSkip authentication (requires UNBOUND_API_KEY env var)
unbound-claude-code --skip-authShow version
unbound-claude-code --version
`🏗️ How It Works
Unbound Code works by intercepting Claude Code's API calls and routing them through Unbound:
1. You use Claude Code normally - All commands, shortcuts, and features work identically
2. Claude Code authenticates normally - Uses your Claude/Anthropic API key as usual
3. Unbound Code intercepts API calls - Transparently redirects calls to Unbound AI
4. Dual authentication - Sends both your Claude key and Unbound key to Unbound's API
5. Smart model routing - Unbound AI routes to the best available model
6. Seamless responses - You get responses exactly as if you were using Claude Code directly
📋 Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
|
UNBOUND_API_KEY | Your Unbound API key | None (prompted if not set) |
| UNBOUND_LOG_LEVEL | Logging level (debug, info, warn, error) | info |
| ANTHROPIC_API_KEY` | Your Claude/Anthropic API key (handled by Claude Code) | None |- Node.js: >= 16.0.0
- Claude Code: Latest version (bundled)
- Operating Systems: macOS, Linux, Windows
- Terminals: All terminals supported by Claude Code
MIT License - see LICENSE file for details.