Skip to content

Instantly share code, notes, and snippets.

@elfgzp
Created February 6, 2026 07:17
Show Gist options
  • Select an option

  • Save elfgzp/4e3c0cdb563439010e80571cd0a2449a to your computer and use it in GitHub Desktop.

Select an option

Save elfgzp/4e3c0cdb563439010e80571cd0a2449a to your computer and use it in GitHub Desktop.
CCS - Claude Code Switcher wrapper script
#!/bin/bash
# CC-Switch (ccs) Installer
# One-liner: curl -fsSL https://gist.githubusercontent.com/elfgzp/GIST_ID/raw/install_ccs.sh | bash
set -e
echo "Installing cc-switch-cli..."
# Create bin directory
mkdir -p ~/bin
# Download latest release
REPO="saladday/cc-switch-cli"
LATEST_URL=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | grep "browser_download_url.*linux-x64" | head -1 | cut -d '"' -f 4)
if [ -z "$LATEST_URL" ]; then
echo "Error: Could not find latest release"
exit 1
fi
echo "Downloading cc-switch-cli..."
curl -fsSL "$LATEST_URL" -o /tmp/cc-switch.tar.gz
tar -xzf /tmp/cc-switch.tar.gz -C ~/bin
chmod +x ~/bin/cc-switch
# Download ccs wrapper
echo "Installing ccs wrapper..."
curl -fsSL "https://gist.githubusercontent.com/elfgzp/GIST_ID/raw/ccs" -o ~/bin/ccs
chmod +x ~/bin/ccs
# Add to PATH
if ! grep -q "export PATH=.*~/bin" ~/.bashrc 2>/dev/null; then
echo "export PATH=\$PATH:~/bin" >> ~/.bashrc
fi
if [ -f ~/.zshrc ] && ! grep -q "export PATH=.*~/bin" ~/.zshrc 2>/dev/null; then
echo "export PATH=\$PATH:~/bin" >> ~/.zshrc
fi
echo ""
echo "✓ Installation complete!"
echo "Run: source ~/.bashrc or source ~/.zshrc"
echo ""
echo "Usage: ccs [glm|kimi|minimax]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment