English | 简体中文
A command-line tool for quickly launching specified commands with specific environment variables, especially suitable for rapidly starting Claude Code with different model configurations.
- 🚀 Zero Dependencies: Single executable file, no runtime dependencies required
- 🔄 Multi-Environment Support: Quickly switch between multiple environment configurations
- ⚙️ YAML Configuration: User-friendly YAML format for environment configuration
- 📁 Automatic Configuration Management: Configuration files automatically stored in user directory
- 🌐 Cross-Platform: Supports Windows, macOS, and Linux
-
Download the executable file for your platform:
- Windows:
cs.exe - Linux/macOS:
cs-*
- Windows:
-
Place the executable file in your system PATH
-
Configuration files are automatically created on first run:
cs glm
Configuration files are automatically created in the user directory:
- Windows:
%USERPROFILE%\.cs\config.yaml - Linux/macOS:
~/.cs/config.yaml
environments:
# GLM environment configuration for Claude Code
glm:
target: "claude" # Claude Code command
environment:
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1"
ANTHROPIC_BASE_URL: "https://open.bigmodel.cn/api/anthropic"
ANTHROPIC_AUTH_TOKEN: "your-glm-api-key" # Replace with actual API key
ANTHROPIC_MODEL: "glm-4.6"
ANTHROPIC_SMALL_FAST_MODEL: "glm-4.5-air"
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-4.6"
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-4.6"
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-4.5-air"
API_TIMEOUT_MS: "3000000" # Example: Node.js development environment
node-dev:
target: "node server.js"
environment:
PORT: "3000"
NODE_ENV: "development"
DEBUG: "true"
# Example: Python virtual environment
python-env:
target: "python app.py"
environment:
PYTHONPATH: "/path/to/project"
DJANGO_SETTINGS_MODULE: "myproject.settings"# Launch command using glm environment
cs glm
# Pass additional arguments to the target command
cs glm -- chat
cs glm -- --help
cs glm -- chat --model opus
# List available environments
csFor users who want to build from source:
- Go 1.24.1 or later
# Build for current platform
go build -o cs main.go
# For Windows
go build -o cs.exe main.go# Windows 64-bit
GOOS=windows GOARCH=amd64 go build -o cs-windows.exe main.go
# Linux 64-bit
GOOS=linux GOARCH=amd64 go build -o cs-linux main.go
# macOS (Intel)
GOOS=darwin GOARCH=amd64 go build -o cs-macos-intel main.go
# macOS (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build -o cs-macos-arm64 main.goPre-compiled binaries are available in the GitHub Releases section for:
- Windows 64-bit (
cs-windows.exe) - Linux 64-bit (
cs-linux) - Linux ARM64 (
cs-linux-arm64) - macOS Intel (
cs-macos-intel) - macOS Apple Silicon (
cs-macos-arm64)
For development and contribution guidelines, please see MAINTAINER.md.
cs <environment> [-- <args>...]reads the configuration for the specified environment- Injects configured environment variables into the current environment
- Launches the configured target command with optional additional arguments
- Inherits standard input/output from the current terminal
Arguments after -- are appended to the target command, allowing you to pass runtime parameters without modifying the configuration file.
MIT License