Skip to content

Repository files navigation

CC Launcher (cc-launcher)

A config-driven launcher for Claude Code: multi-source updates, self-healing repair, environment injection, internationalization.

中文: see README.zh-CN.md

Disclaimer

This is a third-party community tool, not an official Anthropic product, and has no affiliation with Anthropic PBC or the Claude Code team.

  • This tool wraps and launches Claude Code via environment variables and CLI arguments; it does not modify, redistribute, or reverse-engineer Claude Code itself.
  • Multi-backend support (DeepSeek, OpenAI, etc.) is for user convenience only and does not imply official endorsement by those providers. When using third-party backends, please read and comply with their terms of service.
  • API Key safety: Keep your API keys safe. This tool runs locally only and does not upload or leak your credentials. We recommend storing keys in the system credential manager (Windows Credential Manager / macOS Keychain) rather than in plaintext.
  • This tool is provided "as is", without any express or implied warranty. The author assumes no liability for API usage costs, data loss, or service interruptions arising from its use.
  • Claude Code updates may break parts of this tool; please watch this repository for updates.

Overview

A Rust rewrite of the Claude Code launcher, replacing the previous Python/PowerShell implementation. Zero hardcoding: all behavior is controlled by config/config.toml. Portable deployment: the program, config/, and logs/ live in the same directory.

Features

  • Multi-source updates: CC self-update (claude install) / GitHub Releases direct / accelerated channels (geo-detected ordering)
  • Segmented download: multi-threaded Range download + progress/speed/ETA + stall detection + SHA-256 verification
  • Self-healing repair: crash detection (grace period) + exponential backoff + circuit breaker (prevents infinite reinstalls)
  • Environment injection: CLI > config > system > default priority chain + snapshot rollback + template substitution
  • Authentication: multi-source API key (CLI/env/file/keyring) + daemon OAuth bypass + settings.json inject-cleanup (self-healing)
  • Rollback: version manifest + atomic replacement (restores on failure)
  • I18N: Chinese and English, follows system locale
  • UI: CLI (clap) + TUI (ratatui, 4 tabs) + GUI (Tauri 2 + React, optional)

Quick Start

# Build
cargo build --release

# Run binary (auto-generates config/config.toml template on first run)
./target/release/cc-launcher --help

# Launch Claude Code
./target/release/cc-launcher

# Update / repair / rollback
./target/release/cc-launcher update
./target/release/cc-launcher repair
./target/release/cc-launcher rollback

# Full diagnostics
./target/release/cc-launcher check

# TUI dashboard
./target/release/cc-launcher tui

# GUI (requires building src-tauri first)
./target/release/cc-launcher gui

Configuration

Config file: config/config.toml (auto-generated all-comment template on first run).

Configuration Reference

Key Type Default Description
i18n.lang string "auto" UI language: auto / zh-CN / en-US
paths.cc_exe string/null null CC executable path (null = auto-detect)
paths.config_dir string/null null CC config directory (settings.json etc.)
paths.plugins_dir string/null null Plugins directory
paths.skills_dir string/null null Skills directory
paths.main_dir string/null null CC main installation directory
backend.backend string "deepseek" Backend: deepseek / anthropic / openai / custom
backend.base_url string/null null API base URL (null = provider default)
backend.api_key_source string "env:DEEPSEEK_API_KEY" Key source: env:VAR / file:path / keyring
backend.models.default string "deepseek-v4-pro[1m]" Default model
backend.models.opus string "deepseek-v4-pro[1m]" Opus-tier model
backend.models.sonnet string "deepseek-v4-pro[1m]" Sonnet-tier model
backend.models.haiku string "deepseek-v4-flash[1m]" Haiku-tier model
backend.models.subagent string "deepseek-v4-flash[1m]" Subagent model
launch.pre_launch string "prompt" Check strategy: prompt / notify / auto / off
launch.separate_window bool false Run CC in a separate window
launch.check_interval_hours u32 24 Check interval in notify mode (hours)
update.strategy string "auto" Update strategy: auto / native-only / github-only / mirror-first
update.chunk_size u64 8388608 Chunk size (bytes, 8MB)
update.max_threads usize 8 Concurrent download threads
update.connect_timeout_secs u64 10 Connect timeout (s)
update.stall_timeout_secs u64 20 Stall timeout (s)
update.total_timeout_secs u64 600 Total timeout (s)
update.retry_count u32 3 Retries per chunk
update.retry_base_delay_ms u64 1000 Base retry delay (ms)
update.download_url_template string GitHub URL Download URL template
update.version_check_url string GitHub API Version check URL
update.keep_versions usize 3 Historical versions to keep
channels[].url string Proxy/mirror URL (empty = direct)
channels[].tags []string Geo-detection tags
channels[].priority u32 Priority
geo.enabled bool true Geo detection toggle
geo.force_tag string "" Force channel tag
repair.grace_period_secs u32 5 Crash grace period (s)
repair.max_retries u32 3 Max repair attempts
repair.backoff_multiplier f64 2.0 Backoff multiplier
repair.circuit_breaker_threshold u32 5 Circuit breaker threshold
repair.circuit_breaker_reset_secs u64 300 Circuit reset time (s)
logging.level string "info" Log level
logging.retention_days u32 30 Log retention days
logging.file_enabled bool true Write log files
logging.console_enabled bool true Console output
plugins.git_dirs []string [] Git plugin directories
plugins.check_interval_secs u64 86400 Plugin check interval
profiles.<name>.* Named config presets
platforms.<os>.asset_name string (platform default) Release asset filename

Development

# Test + style + lint
cargo test
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings

CI (GitHub Actions, YAML): .github/workflows/ — style / build-test / config-validation / i18n-check.

GUI (optional)

# Build frontend + Tauri
cd src-tauri/frontend && npm install && npm run build
cd .. && cargo build   # requires Tauri dependencies

Privacy

config/, logs/, target/, node_modules/ and other local/build artifacts are excluded from version control (see .gitignore).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages