Claude Code Switch banner
foreveryh foreveryh

Claude Code Switch

AI community

Description

One-command model switcher for Claude Code (Only for Anthropic API).

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude Code Switch (ccm)

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![GitHub stars](https://img.shields.io/github/stars/foreveryh/claude-code-switch.svg)](https://github.com/foreveryh/claude-code-switch/stargazers) [![GitHub issues](https://img.shields.io/github/issues/foreveryh/claude-code-switch.svg)](https://github.com/foreveryh/claude-code-switch/issues)

Switch Claude Code between AI providers with one command.

[中文文档](README_CN.md)

Quick Start

# 1. Install
curl -fsSL https://raw.githubusercontent.com/foreveryh/claude-code-switch/main/quick-install.sh | bash

# 2. Reload shell
source ~/.zshrc  # or ~/.bashrc

# 3. Configure your API keys
ccm config

# 4. Switch and use
ccm glm              # switch to GLM
ccc glm global       # switch + launch Claude Code

# Advanced: User-level settings (highest priority, overrides everything)
ccm user glm global      # Set GLM as default for all projects
ccm user reset           # Restore environment variable control

# Advanced: Project-only override
ccm project glm china    # GLM for this project only

# Advanced: Multiple Claude Pro accounts
ccm save-account work    # save current account
ccm switch-account work  # switch to saved account

Installation

Quick Install (Recommended)

curl -fsSL https://raw.githubusercontent.com/foreveryh/claude-code-switch/main/quick-install.sh | bash
source ~/.zshrc  # or ~/.bashrc

Local Install

git clone https://github.com/foreveryh/claude-code-switch.git
cd claude-code-switch
./install.sh
source ~/.zshrc

Install Modes

Mode Command Use Case
User (default) ./install.sh Personal use, available everywhere
System ./install.sh --system Shared machine, all users
Project ./install.sh --project Project-specific, isolated setup

Install Options

./install.sh --no-rc           # Skip shell rc injection
./install.sh