A comprehensive cross-platform toolkit for managing Claude Code installation, configuration, and multiple Anthropic-compatible API provider support. This toolkit simplifies the process of setting up and switching between different Anthropic-compatible API providers, including the official Anthropic API and compatible third-party services like Moonshot AI with the latest Kimi model (kimi-k2-0711-preview) that implement Anthropic's API specification.
🚀 Featured: This toolkit includes built-in support for Moonshot AI's latest Kimi model (kimi-k2-0711-preview), allowing you to leverage cutting-edge AI capabilities through the familiar Claude Code interface.
- One-command setup: Instantly configure Moonshot AI with the latest Kimi model
- Seamless switching: Switch between official Anthropic API and Kimi model effortlessly
- Full compatibility: All Claude Code features work seamlessly with the Kimi model
- Cross-Platform Support: Works on Linux/macOS (Bash) and Windows (PowerShell)
- Multiple Provider Support: Easy switching between Anthropic, Moonshot AI (with latest Kimi models), and custom Anthropic-compatible API providers
- Automated Installation: Handles Node.js, npm, and Claude Code package installation
- Configuration Management: Persistent provider configurations with secure API key storage
- Environment Variable Management: Automatic shell configuration for seamless provider switching
- Interactive Setup: User-friendly prompts for configuration when parameters are not provided
- Node.js 18 or higher
- npm (Node Package Manager)
- Bash (Linux/macOS) or PowerShell (Windows)
- Internet connection for package downloads
Before using this toolkit, you'll need API keys from your chosen provider:
- Anthropic API: Get your API key from Anthropic Console
- Moonshot AI: Get your API key from Moonshot AI Platform
- Custom Providers: Obtain API keys from your preferred Anthropic-compatible service
| Command | Description |
|---|---|
install [provider] [api_key] [options] |
Install Claude Code and configure a provider |
uninstall |
Completely remove Claude Code and all configurations |
update |
Update Claude Code to the latest version |
check |
Check installation status and current provider |
add-provider <name> <url> <key> |
Add a new API provider configuration |
switch <provider> |
Switch to a different configured provider |
list-providers |
Display all available providers |
For all commands below, use one of these patterns:
Linux/macOS (Bash):
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s [command] [arguments]Windows (PowerShell):
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 [command] [arguments]# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s install
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 install# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s install Anthropic YOUR_API_KEY
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 install Anthropic YOUR_API_KEY# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s install "Moonshot AI" YOUR_API_KEY
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 install "Moonshot AI" YOUR_API_KEY# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s install "Custom Provider" YOUR_API_KEY --base-url https://api.example.com/v1/
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 install "Custom Provider" YOUR_API_KEY --base-url https://api.example.com/v1/# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s check
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 check# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s switch "Provider Name"
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 switch "Provider Name"# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s add-provider "Provider Name" "https://api.example.com/" "your-api-key"
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 add-provider "Provider Name" "https://api.example.com/" "your-api-key"# Linux/macOS
curl -L https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.sh | bash -s list-providers
# Windows
Invoke-WebRequest -Uri "https://github.com/xixu-me/Claude-Code-Toolkit/raw/main/cct.ps1" -OutFile "cct.ps1"; .\cct.ps1 list-providers-
Anthropic - Official Claude API
- Uses default Anthropic endpoints
- Requires official Anthropic API key
- No additional configuration needed
-
Moonshot AI - Anthropic-compatible API service with latest Kimi models
- Pre-configured with Moonshot endpoints
- Supports the latest Kimi model (
kimi-k2-0711-preview) - Fully compatible with Anthropic API format
- Requires Moonshot AI API key
You can add any API provider that implements Anthropic-compatible endpoints by specifying:
- Provider Name: A friendly name for identification
- Base URL: The API endpoint base URL (must be Anthropic API compatible)
- API Key: Your authentication key for the service
- Configuration Directory:
~/.claude/(Linux/macOS) or%USERPROFILE%\.claude\(Windows) - Providers File:
~/.claude/providers.json - Claude Config:
~/.claude.json
The toolkit automatically manages these environment variables:
ANTHROPIC_API_KEY: Your API key for the current providerANTHROPIC_BASE_URL: Base URL for custom providers (not set for official Anthropic API)
{
"Provider Name": {
"base_url": "https://api.example.com/anthropic/",
"api_key": "your-encrypted-api-key"
}
}# Check your Node.js version
node -v
# The toolkit requires Node.js 18+
# Install or update Node.js from https://nodejs.org/# If you get permission errors, configure npm for global installs
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
# Add ~/.npm-global/bin to your PATH# If you can't run the script, check execution policy
Get-ExecutionPolicy
# Allow script execution (run as administrator)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserIf you encounter issues:
- Run the check command to verify your installation
- Check the troubleshooting section above
- Review the error messages - they often contain helpful information
- Check your internet connection for installation issues
This repository was inspired by the LLM-Red-Team/kimi-cc repository, which provides a simple way to use Moonshot AI's latest Kimi model (kimi-k2-0711-preview) to drive Claude Code. We've expanded upon that concept to create a comprehensive cross-platform toolkit that supports multiple Anthropic-compatible API providers with advanced configuration management, provider switching capabilities, and robust installation processes.
Key enhancements over the original inspiration include:
- Cross-platform support for both Linux/macOS (Bash) and Windows (PowerShell)
- Multiple provider management with easy switching between configured providers
- Persistent configuration with JSON-based provider storage
- Interactive setup with user-friendly prompts and error handling
- Comprehensive command set for installation, updates, provider management, and system checks
- Advanced environment variable management across different shell types
This toolkit is provided as-is, without any warranty or guarantee of fitness for a particular purpose. Use at your own risk. The authors and contributors are not responsible for any loss, damage, or issues arising from the use of this toolkit or any third-party API providers. Always review and comply with the terms of service and privacy policies of any API providers you use.
This repository is licensed under the MIT License - see the LICENSE file for details.