claude-code-switch  by foreveryh

AI model switching CLI for enhanced productivity

Created 3 months ago
362 stars

Top 77.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a command-line tool (ccm/ccc) for easily switching between various AI models compatible with Claude Code, targeting developers and power users. It simplifies model management, offers intelligent fallback mechanisms to backup services like PPINFRA, and enables bypassing Claude Pro usage limits by managing multiple accounts, thereby boosting productivity and flexibility.

How It Works

The tool injects shell functions (ccm for environment management, ccc for one-command launch) into the user's shell. It works by setting specific environment variables (e.g., ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN) to redirect Claude Code requests to the chosen model's API endpoint. A key feature is its smart fallback system, which prioritizes configured official API keys but automatically switches to the PPINFRA service if official keys are absent, ensuring continuous operation. It also supports managing multiple Claude Pro accounts, allowing users to switch between them to circumvent individual usage caps.

Quick Start & Requirements

Installation is streamlined via a single command: curl -fsSL https://raw.githubusercontent.com/foreveryh/claude-code-switch/main/quick-install.sh | bash. Users need a compatible shell (bash/zsh) and curl. Initial use requires no API keys, leveraging built-in experience keys via PPINFRA. Shell reload (source ~/.zshrc or source ~/.bashrc) is necessary after installation.

Highlighted Details

  • Multi-Model Support: Integrates with Claude, Deepseek, KIMI, GLM, Qwen, Doubao, LongCat, MiniMax, and StreamLake models.
  • Smart Fallback: Automatically uses the PPINFRA backup service when official API keys are not configured.
  • Claude Pro Account Management: Enables seamless switching between multiple Claude Pro accounts to bypass daily/weekly usage limits without needing to upgrade to higher-tier plans.
  • Zero Configuration: Ready to use immediately with built-in experience keys for quick testing and setup.

Maintenance & Community

The project welcomes issues and pull requests via its GitHub repository. Specific community channels (like Discord/Slack) or details on core maintainers are not explicitly detailed in the provided README excerpt.

Licensing & Compatibility

The project is licensed under the permissive MIT License, allowing for broad compatibility and commercial use without significant restrictions.

Limitations & Caveats

The tool is primarily designed for users of the Anthropic API. Claude Pro account management relies on macOS Keychain for secure storage, which may limit cross-platform compatibility for this specific feature. Some listed models only support official APIs and do not have PPINFRA fallback options. After switching Claude Pro accounts, users must restart Claude Code for the changes to take effect.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
68 stars in the last 30 days

Explore Similar Projects

Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
5 more.

activepieces by activepieces

0.5%
20k
Open-source Zapier alternative for AI workflow automation
Created 3 years ago
Updated 14 hours ago
Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
5 more.

composio by ComposioHQ

0.4%
26k
Toolset for AI agent integrations via function calling
Created 1 year ago
Updated 16 hours ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Magnus Müller Magnus Müller(Cofounder of Browser Use), and
86 more.

langchain by langchain-ai

0.5%
124k
Framework for building LLM-powered applications
Created 3 years ago
Updated 1 day ago
Feedback? Help us improve.