Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccs

ccs runs Claude Code with isolated provider profiles and launches Grok Build.

It is useful when you want to keep your normal Claude Code subscription login untouched, while launching provider-backed sessions such as GLM, DeepSeek, Kimi, MiMo, Ark, Anthropic API, or other compatible providers from one command.

Use the plain claude command for your local Claude subscription. Use ccs for provider profiles and Grok Build.

Providers

Provider Command Notes
Anthropic API ccs anthropic Uses ANTHROPIC_API_KEY
Ark Coding Plan ccs ark Uses ARK_API_KEY with Ark's Claude Code endpoint
GLM / Z.AI ccs glm Includes official GLM MCP setup
Grok Build ccs grok Uses Grok OAuth with grok-4.5
DeepSeek ccs ds or ccs deepseek ds is a built-in alias; links ~/Workspaces/agent/skills/inspect-media when present
Kimi ccs kimi Uses Kimi's coding endpoint
MiMo ccs mimo Uses Xiaomi MiMo's Anthropic-compatible endpoint

Provider profiles keep API credentials and model environment isolated. By default, Claude Code configuration and session runtime paths are shared with your normal ~/.claude directory so claude and ccs can resume the same project history.

Install

One-line install:

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

The installer downloads the latest prebuilt GitHub Release for your platform. It does not require Rust, Cargo, or cloning this repository. It installs ccs to ~/.local/bin/ccs, installs the shell hook, and adds ~/.local/bin to your shell PATH if needed.

Then reload your shell:

source ~/.zshrc

For Bash:

source ~/.bashrc

Run the installer again to upgrade to the latest release:

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

After ccs is installed, you can also self-update with:

ccs self-update

Quick Start

DeepSeek example:

ccs setup ds
ccs profiles edit ds
ccs

Ark Coding Plan example:

export ARK_API_KEY=your-ark-key
ccs setup ark
ccs ark

Grok example:

ccs grok login
ccs grok

GLM example:

export ZAI_API_KEY=your-zai-key
ccs setup glm -r
ccs glm

Daily commands:

ccs                         # open Claude Code with the default provider
ccs grok                    # open Grok Build with Grok 4.5
ccs ark                     # open Claude Code with Ark Coding Plan
ccs ds                      # open Claude Code with DeepSeek
ccs kimi --print hello      # pass args through to Claude Code
ccs setup kimi              # prepare Kimi and make it the default
ccs use ds                  # switch this shell to DeepSeek
ccs use ds --global         # make DeepSeek the default provider
ccs profiles ls             # list configured profiles
ccs profiles edit glm       # edit a provider profile
ccs status                  # show default/profile state
ccs self-update             # update from GitHub Releases

ccs setup and ccs init are aliases. Without a provider, they default to DeepSeek.

ccs use <provider> changes the current shell after the shell hook is installed. Without the hook, it prints a one-line eval fallback.

GLM Full Setup

GLM has extra first-class support because Z.AI/BigModel provides coding models plus official MCP servers.

Overseas Z.AI

Overseas Z.AI is the default platform:

export ZAI_API_KEY=your-zai-key
ccs setup glm -r
ccs glm

This writes GLM_ZAI_API_KEY into ~/.config/ccs/profiles/glm.env, opens the profile in interactive terminals, and prepares the GLM Claude Code config.

Domestic BigModel

Use -p zhipu for the domestic endpoint:

export ZHIPU_API_KEY=your-zhipu-key
ccs setup glm -r -p zhipu
ccs glm -p zhipu

-p is short for --platform. Supported values are:

  • zai: overseas Z.AI, https://api.z.ai/api/anthropic
  • zhipu: domestic BigModel, https://open.bigmodel.cn/api/anthropic

Reconfigure

Use -r or --reconfigure when keys changed or when you want to review the generated GLM profile:

ccs setup glm -r

In an interactive terminal, this refreshes the profile from environment variables and opens ~/.config/ccs/profiles/glm.env.

Accepted key environment variables:

  • Overseas: ZAI_API_KEY or GLM_ZAI_API_KEY
  • Domestic: ZHIPU_API_KEY or GLM_ZHIPU_API_KEY

Official MCPs

ccs setup glm and ccs glm automatically write the official GLM MCP servers into the GLM session config:

~/.config/ccs/claude/glm/.claude.json

Configured MCPs:

MCP Purpose
zai-mcp-server Vision/multimodal support via glm-5v-turbo
web-search-prime Search
web-reader Web page reading
zread Document reading

These MCPs are session-scoped to ccs glm; they are not added to your normal global Claude Code config.

Models and Compaction

The generated GLM profile uses:

ANTHROPIC_DEFAULT_OPUS_MODEL=glm-5.2[1m]
ANTHROPIC_DEFAULT_SONNET_MODEL=glm-5.2[1m]
ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.7
Z_AI_VISION_MODEL=glm-5v-turbo
GLM_CONTEXT_TOKENS=1000000
GLM_AUTO_COMPACT_PERCENT=90

ccs derives CLAUDE_CODE_AUTO_COMPACT_WINDOW=900000 from the context token count and percentage.

Profile Isolation

Profiles live under:

~/.config/ccs/profiles/

Claude Code runtime directories live under:

~/.config/ccs/claude/<provider>/

By default, ccs symlinks shared configuration and session runtime paths from your normal ~/.claude directory into each provider-specific CLAUDE_CONFIG_DIR. This lets claude and ccs see the same project sessions, history, todos, tasks, shell snapshots, skills, plugins, and rules.

By default, ccs shares these paths:

  • CLAUDE.md
  • settings.json
  • skills
  • plugins
  • rules
  • projects
  • sessions
  • todos
  • tasks
  • shell-snapshots
  • history.jsonl

Those paths are symlinked into each provider-specific CLAUDE_CONFIG_DIR. If an existing profile still has the old default CCS_SHARED_PATHS value (CLAUDE.md,settings.json,skills,plugins,rules), ccs treats it as the default and shares the runtime paths above too. Other custom CCS_SHARED_PATHS values are preserved exactly.

If a provider-specific config directory already contains a local runtime path such as projects or history.jsonl, ccs moves that local copy into:

<CLAUDE_CONFIG_DIR>/.ccs-local-backup/

ccs also prints a warning with that backup path so you can restore or merge older sessions if they seem missing.

Profile Reference

Create or edit profiles with:

ccs profiles ls
ccs profiles edit glm
ccs profiles edit ds

Every profile must define CLAUDE_CONFIG_DIR.

Minimal Anthropic profile:

CLAUDE_CONFIG_DIR=/Users/you/.config/ccs/claude/anthropic
CCS_SHARED_CLAUDE_DIR=/Users/you/.claude
CCS_SHARED_PATHS=CLAUDE.md,settings.json,skills,plugins,rules,projects,sessions,todos,tasks,shell-snapshots,history.jsonl
ANTHROPIC_API_KEY=your-api-key

Typical Anthropic-compatible provider profile:

CLAUDE_CONFIG_DIR=/Users/you/.config/ccs/claude/deepseek
CCS_SHARED_CLAUDE_DIR=/Users/you/.claude
CCS_SHARED_PATHS=CLAUDE.md,settings.json,skills,plugins,rules,projects,sessions,todos,tasks,shell-snapshots,history.jsonl
ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
ANTHROPIC_AUTH_TOKEN=your-provider-api-key
ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro
ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro
ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash

Ark profile:

CLAUDE_CONFIG_DIR=/Users/you/.config/ccs/claude/ark
CCS_SHARED_CLAUDE_DIR=/Users/you/.claude
CCS_SHARED_PATHS=CLAUDE.md,settings.json,skills,plugins,rules,projects,sessions,todos,tasks,shell-snapshots,history.jsonl
ANTHROPIC_BASE_URL=https://ark.cn-beijing.volces.com/api/coding
ANTHROPIC_AUTH_TOKEN=your-ark-api-key
ANTHROPIC_MODEL=glm-5.2
ANTHROPIC_DEFAULT_OPUS_MODEL=glm-5.2
ANTHROPIC_DEFAULT_SONNET_MODEL=kimi-k2.7-code
ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash
CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash

Use ccs ark --model <model> for one session, or /model <model> inside Claude Code. The OpenAI-compatible Ark URL is for OpenAI-protocol tools; ccs uses the Anthropic-compatible URL because it launches Claude Code.

ccs grok launches the official grok CLI with OAuth forced, pins grok-4.5, and ignores XAI_API_KEY. Install Grok Build first; ccs grok login starts the browser login flow, and later ccs grok calls reuse that account session.

Generated provider defaults:

Provider Base URL Default model
ark https://ark.cn-beijing.volces.com/api/coding glm-5.2
glm https://api.z.ai/api/anthropic glm-5.2[1m]
deepseek https://api.deepseek.com/anthropic deepseek-v4-pro
kimi https://api.kimi.com/coding/ kimi-for-coding
mimo https://api.xiaomimimo.com/anthropic mimo-v2.5

Secrets are stored in profile .env files under ~/.config/ccs/profiles/. Profile files are written with restrictive permissions, but they are still plain text.

Development

Local source install requires Rust and Cargo:

bash install.sh
make fmt
make lint
make test
make build

Direct commands:

cargo test --all
cargo clippy --all-targets --all-features -- -D warnings

Release

Push a v* tag to build release assets for:

  • Linux x86_64
  • Linux aarch64
  • macOS x86_64
  • macOS aarch64

Users can update from the matching GitHub Release asset with:

ccs self-update

License

MIT

About

Run Claude Code with isolated provider profiles for GLM, DeepSeek, Kimi, MiMo, Anthropic API, and compatible endpoints.

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages