One CLI to Rule Them All: Switch Between AI Code Assistants Instantly
Ever find yourself bouncing between different AI coding assistants, trying to remember which one had the best response for that tricky regex or API call? You're not alone. Most of us have a favorite, but sometimes Claude nails the architecture question while Codex writes cleaner functions, and Gemini might surprise you with a novel approach. Switching between their separate CLIs or browser tabs breaks your flow.
What if you could query all of them from a single terminal window, with one consistent interface? That's exactly the itch cc-switch scratches.
What It Does
cc-switch is a command-line tool that lets you interact with three major AI coding models—Anthropic's Claude, OpenAI's Codex, and Google's Gemini—directly from your terminal. Instead of managing three different API keys, setups, and command syntaxes, you configure them once and then use simple commands to send prompts to any of the models, or even to all of them at once for comparison.
Why It's Cool
The real magic isn't just consolidation; it's about practical, developer-centric workflow.
Compare Outputs Side-by-Side: Stuck on a problem? Use the --all flag to send your prompt to Claude, Codex, and Gemini simultaneously. The tool outputs their responses in clear, labeled sections. Seeing three different takes on the same coding challenge can be incredibly enlightening and often leads to a better hybrid solution than any single model would provide.
Consistent Interface, Different Brains: Each model has its own strengths. Maybe you start with Claude for a high-level design, switch to Codex to generate the specific function skeleton, and then ask Gemini to find edge cases. With cc-switch, you're not changing tools, just changing the target with a simple flag like --claude or --gemini. It keeps you in the zone.
It's a Time-Saver for the Curious: If you've ever wondered, "I wonder how the other model would handle this?", answering that question now takes seconds instead of minutes. This makes it a great tool for learning the nuances and capabilities of each AI as they evolve.
How to Try It
Getting started is straightforward. You'll need Python and your API keys handy.
-
Clone the repo:
git clone https://github.com/farion1231/cc-switch.git cd cc-switch -
Install dependencies:
pip install -r requirements.txt -
Set up your API keys. The project uses a
.envfile for configuration. Copy the example file and fill in your keys:cp .env.example .env # Now edit the .env file and add your keys from Anthropic, OpenAI, and Google AI Studio. -
Start querying! The basic syntax is simple:
python main.py "Your prompt here" --model claudeWant a comparison? Run:
python main.py "Write a Python function to validate an email" --all
Check out the GitHub repository for more detailed usage examples and flag options.
Final Thoughts
As AI coding assistants become more specialized, the ability to quickly leverage their unique strengths without context switching is a genuine productivity boost. cc-switch isn't a complex platform; it's a simple, focused utility that respects a developer's time and curiosity. It's the kind of tool you might start using for quick comparisons and soon find integrated into your daily workflow for those "let me check with the other AI" moments. For anyone regularly using more than one of these models, it's definitely worth a look.
@githubprojects
Repository: https://github.com/farion1231/cc-switch