https://github.com/jigonr/claude-switch
Simple API provider switcher for Claude Code CLI
https://github.com/jigonr/claude-switch
anthropic bun claude claude-code cli provider-switcher typescript
Last synced: 19 days ago
JSON representation
Simple API provider switcher for Claude Code CLI
- Host: GitHub
- URL: https://github.com/jigonr/claude-switch
- Owner: jigonr
- License: mit
- Created: 2026-01-02T21:43:31.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-01-06T03:39:15.000Z (about 1 month ago)
- Last Synced: 2026-01-13T19:39:21.758Z (about 1 month ago)
- Topics: anthropic, bun, claude, claude-code, cli, provider-switcher, typescript
- Language: TypeScript
- Homepage: https://jigonzalez.com/claude-switch/
- Size: 132 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# claude-switch
Simple API provider switcher for Claude Code CLI.
[](https://github.com/jigonr/claude-switch/actions)
[](https://codecov.io/gh/jigonr/claude-switch)
[](https://opensource.org/licenses/MIT)
## Installation
```bash
bun add -g @jigonr/claude-switch
# or
npm install -g @jigonr/claude-switch
```
## Usage
```bash
claude-switch # Show current provider
claude-switch # Switch to provider
claude-switch list # List all providers
```
### Providers
| Provider | Type | Description |
|----------|------|-------------|
| `claude-pro-max` | Subscription | Claude Pro via browser |
| `anthropic` | API | Anthropic API |
| `z.ai` | API | z.ai with GLM models |
### Options
| Option | Description |
|--------|-------------|
| `--local` | Don't update global config |
| `--json` | JSON output |
## Configuration
Files are stored in `~/.claude/`:
```
~/.claude/
├── switch-config.json # Provider configuration
├── settings.json # Claude Code settings (managed)
└── credentials/ # API keys (mode 0600)
├── anthropic.key
└── zai.key
```
### Project Override
Create `.claude-switch.json` in your project:
```json
{"provider": "anthropic"}
```
## Documentation
- [Commands](https://jigonzalez.com/claude-switch/guide/commands/)
- [Configuration](https://jigonzalez.com/claude-switch/guide/configuration/)
- [Troubleshooting](https://jigonzalez.com/claude-switch/guide/troubleshooting/)
## License
MIT