kaitranntt 8913514361 chore: add plans/ to .gitignore
- Add plans/ directory to .gitignore to prevent tracking
- Ensures plans directory stays out of version control
2025-11-01 17:28:27 -04:00
2025-11-01 17:28:27 -04:00

CCS - Claude Code Switch

License: MIT Bash GitHub Stars

Ultra-simple Claude CLI profile switcher. One command instead of long paths.

Before: claude --settings ~/.claude/glm.settings.json --verbose After: ccs glm --verbose

Quick Start

Install (one-liner):

curl -fsSL https://raw.githubusercontent.com/kaitranntt/ccs/main/install.sh | bash

Configure:

# Edit with your profiles
cat > ~/.ccs.json << 'EOF'
{
  "profiles": {
    "glm": "~/.claude/glm.settings.json",
    "sonnet": "~/.claude/sonnet.settings.json",
    "default": "~/.claude/settings.json"
  }
}
EOF

Use:

ccs          # Use default profile
ccs glm      # Use GLM profile
ccs sonnet   # Use Sonnet profile

Why CCS?

Claude CLI's --settings flag is powerful but verbose. CCS gives you friendly aliases.

Features:

  • Single command profile switching
  • Pass-through all Claude CLI args
  • Zero configuration complexity
  • No proxies, no magic—just bash + jq

Installation

curl -fsSL https://raw.githubusercontent.com/kaitranntt/ccs/main/install.sh | bash

Git Clone

git clone https://github.com/kaitranntt/ccs.git
cd ccs
./install.sh

Manual

# Download script
curl -fsSL https://raw.githubusercontent.com/kaitranntt/ccs/main/ccs -o ~/.local/bin/ccs
chmod +x ~/.local/bin/ccs

# Ensure ~/.local/bin in PATH
export PATH="$HOME/.local/bin:$PATH"

Configuration

Create ~/.ccs.json with profile mappings:

{
  "profiles": {
    "glm": "~/.claude/glm.settings.json",
    "sonnet": "~/.claude/sonnet.settings.json",
    "default": "~/.claude/settings.json"
  }
}

Each profile points to a Claude settings JSON file. Create settings files per Claude CLI docs.

Usage

Basic

ccs           # Use default profile (no args)
ccs glm       # Use GLM profile
ccs sonnet    # Use Sonnet profile

With Arguments

All args after profile name pass directly to Claude CLI:

ccs glm --verbose
ccs sonnet /plan "add feature"
ccs default --model claude-sonnet-4

Custom Config Location

export CCS_CONFIG=~/my-custom-ccs.json
ccs glm

Use Cases

Claude Subscription + GLM Coding Plan

Switch between Claude sub and GLM plan:

{
  "profiles": {
    "claude": "~/.claude/claude-sub.settings.json",
    "glm": "~/.claude/glm.settings.json",
    "default": "~/.claude/settings.json"
  }
}
ccs claude   # Use Claude subscription
ccs glm      # Use GLM coding plan

Different Models

{
  "profiles": {
    "sonnet": "~/.claude/sonnet.settings.json",
    "haiku": "~/.claude/haiku.settings.json",
    "default": "~/.claude/settings.json"
  }
}

How It Works

  1. Reads profile name (defaults to "default" if omitted)
  2. Looks up settings file path in ~/.ccs.json
  3. Executes claude --settings <path> [remaining-args]

No magic. No file modification. Pure delegation.

Requirements

Installing jq

# macOS
brew install jq

# Ubuntu/Debian
sudo apt install jq

# Fedora
sudo dnf install jq

# Arch
sudo pacman -S jq

Troubleshooting

Profile not found

Error: Profile 'foo' not found in ~/.ccs.json

Fix: Add profile to ~/.ccs.json:

{
  "profiles": {
    "foo": "~/.claude/foo.settings.json"
  }
}

Settings file missing

Error: Settings file not found: ~/.claude/foo.settings.json

Fix: Create settings file or fix path in config.

jq not installed

Error: jq is required but not installed

Fix: Install jq (see Requirements).

PATH not set

⚠️  Warning: ~/.local/bin is not in PATH

Fix: Add to ~/.bashrc or ~/.zshrc:

export PATH="$HOME/.local/bin:$PATH"

Then source ~/.bashrc or restart shell.

Default profile missing

Error: Profile 'default' not found in ~/.ccs.json

Fix: Add "default" profile or always specify profile name:

{
  "profiles": {
    "default": "~/.claude/settings.json"
  }
}

Uninstallation

ccs-uninstall

Or manual:

rm ~/.local/bin/ccs
rm ~/.local/bin/ccs-uninstall
rm ~/.ccs.json  # If you want to remove config

Contributing

PRs welcome! Keep it simple (KISS principle).

Guidelines:

  • Maintain bash 3.2+ compatibility
  • No dependencies beyond jq
  • Test on macOS and Linux
  • Follow existing code style

Philosophy

  • YAGNI: No features "just in case"
  • KISS: Simple bash, no complexity
  • DRY: One source of truth (config)

This tool does ONE thing well: map profile names to settings files.

License

MIT © Kai Tran

S
Description
Switch between Claude accounts, Gemini, Copilot, OpenRouter (300+ models) via CLIProxyAPI OAuth proxy. Visual dashboard, remote proxy support, WebSearch fallback. Zero-config to production-ready.
Readme MIT
33 MiB
Languages
TypeScript 81.4%
HTML 8.1%
JavaScript 7.1%
Swift 1.7%
Shell 1%
Other 0.6%