claude-provider
v0.0.5
Published
CLI tool and Claude Code plugin to switch between API providers (Anthropic, Kimi, Qwen, DeepSeek, MiniMax, Z.ai)
Downloads
299
Maintainers
Readme
A powerful tool that enables you to manage and switch between multiple LLM API providers for Claude Code. Available as both a Claude Code plugin and a standalone CLI.
✨ Features
- 🔄 Instant Provider Switching — Switch between providers with a single command
- � Dual Mode — Use as a Claude Code plugin or standalone CLI tool
- 📦 Pre-configured Presets — Ready-to-use configurations for popular providers
- 🎛️ Custom Configurations — Create profiles with custom base URLs and models
- 📸 Profile Snapshots — Save your current settings as reusable profiles
- 🔐 Secure — API keys are masked in output; file permissions are restricted
🚀 Installation
Prerequisites
- Claude Code installed
- Node.js v18 or higher
Install via npm (Recommended)
npm install -g claude-providerThis installs both the Claude Code plugin and the CLI tool.
🔌 Plugin Usage
Use the provider commands directly within Claude Code via slash commands.
Setup Plugin
Via Marketplace:
# Add the marketplace
/plugin marketplace add iqbal-rashed/claude-provider-plugin
# Install the plugin
/plugin install provider@claude-provider-pluginVia Local Install:
claude --plugin-dir /absolute/path/to/claude-provider-pluginPlugin Commands
Switch Provider
/provider:switch <profile_name>Switch to a different provider profile instantly.
List Profiles
/provider:listView all available profiles and see which one is currently active.
Add Provider
/provider:add <name>Create a new profile from a preset or custom configuration. You'll be prompted for:
- Preset — Choose from available presets or
custom - API Key — Your provider's API key
- Model (optional) — Override the default model
Snapshot Settings
/provider:snapshot <name>Save your current ~/.claude/settings.json as a named profile for later use.
Delete Profile
/provider:delete <profile_name>Remove a profile you no longer need.
📖 CLI Usage
After installation, you can use claude-provider or the shorthand cpr from your terminal.
Interactive Mode
claude-provider
# or
cprLaunches an interactive menu to:
- View and switch between providers
- Add new providers (from presets or custom)
- Manage existing providers (edit/delete)
Quick Switch
claude-provider <provider_name>
# or
cpr kimiSwitch directly to a provider by name.
List Providers
claude-provider --list
# or
cpr -lDisplay all installed providers with the active one highlighted.
🎯 Supported Providers
| Provider | Preset Key | Default Model |
|----------|-----------|---------------|
| Anthropic | anthropic | claude-sonnet-4.5 |
| Z.ai (GLM) | zai | glm-4.7 |
| MiniMax | minimax | minimax-m2.1 |
| Kimi (Moonshot) | kimi | kimi-k2.5 |
| Qwen (DashScope) | qwen | qwen-max-latest |
| DeepSeek | deepseek | deepseek-chat |
| Custom | custom | User defined |
💡 Tip: When using a preset, you can optionally specify a custom model to override the default.
🔧 How It Works
- Profiles are stored as
~/.claude/settings.<name>.json - Switching copies the target profile to
~/.claude/settings.json - Plugins preserved — Your enabled plugins are maintained when switching providers
- MCP Protocol ensures safe, structured file system interactions (plugin mode)
🐛 Troubleshooting
| Issue | Solution |
|-------|----------|
| Command not found | Run npm install -g claude-provider or check your PATH |
| Plugin not found | Ensure you used the absolute path to the plugin directory |
| Command not recognized | Restart Claude Code after installing the plugin |
| VS Code won't open | The CLI will show the file path for manual editing |
