Skip to content

Commit 930b3e6

Browse files
committed
docs: clean up README after supervisor removal
- Drop leftover Supervisor references from README and README-CN - Trim Configuration Merge Strategy section to a concise paragraph - Note these doc changes under [Unreleased] in CHANGELOG
1 parent 725ca58 commit 930b3e6

3 files changed

Lines changed: 10 additions & 55 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Removed slash command files (supervisor.md, supervisoroff.md)
1616
- Project rebranded as "Claude Code Configuration Switcher"
1717

18+
### Changed
19+
20+
- Streamlined README/README-CN: trimmed the Configuration Merge Strategy section
21+
and removed leftover Supervisor references now that supervisor mode is gone.
22+
1823
## [0.3.0] - 2026-01-16
1924

2025
### Added

README-CN.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,26 +84,11 @@ ccc validate --all
8484

8585
## 配置合并策略
8686

87-
**你的配置永远不会丢失!** ccc 遵循以下原则合并配置:
88-
89-
- **优先级**:用户的 `settings.json` 配置具有最高优先级
90-
- **提供商配置**:ccc.json 中的提供商特定配置覆盖基础设置
91-
- **基础设置**:ccc.json 中的 `settings` 字段作为共享模板
92-
93-
#### 保留的内容
94-
95-
- ✅ 用户安装的插件(`enabledPlugins`)- 不会被覆盖
96-
- ✅ 手动编辑的 `settings.json`(权限、沙箱等)- 完全保留
97-
- ✅ 用户配置的其他 hooks(PreToolUse、SessionStart 等)- 被尊重
98-
- ✅ 用户在 `settings.json` 中手动设置的环境变量 - ccc 不会修改
99-
100-
#### 管理的内容
101-
102-
- 🧹 Supervisor Stop hook - 如果存在旧版本的 hook,会自动清理
87+
运行 `ccc` 时,会读取你已有的 `settings.json` 并与 ccc.json 深度合并。优先级:**用户 `settings.json` > 提供商 > 基础 `settings`**。你手动编辑的配置、插件、hooks 都会被保留;提供商的环境变量通过命令行传递,不会写入 `settings.json`
10388

10489
#### 环境变量冲突(硬守卫)
10590

106-
Claude Code 的 `settings.json` `env` 字段会**覆盖**ccc 启动 claude 时传入的环境变量(实测已验证)。如果 `settings.json` 中存在会遮蔽 provider env 的 key,切换 provider 会静默失效(用错 base_url / token / model)。
91+
Claude Code 的 `settings.json` `env` 字段会**覆盖** ccc 启动 claude 时传入的环境变量。如果 `settings.json` 中存在会遮蔽 provider env 的 key,切换 provider 会静默失效(用错 base_url / token / model)。
10792

10893
**当检测到此类冲突时,ccc 会拒绝启动 claude,`ccc validate` 同样会被拒绝。** ccc 不会静默修改你的文件,而是会打印冲突的 key(不打印 value,避免泄露密钥)并告诉你如何修复。**ccc 不会修改你 `settings.json``env` 字段。**
10994

@@ -113,16 +98,6 @@ Claude Code 的 `settings.json` `env` 字段会**覆盖**ccc 启动 claude 时
11398

11499
**修复方法**:从 `~/.claude/settings.json``env` 中删除这些 key,并把 provider 相关配置改到 `~/.claude/ccc.json``providers.<name>.env` 中。
115100

116-
#### 工作原理
117-
118-
当你运行 `ccc` 时:
119-
1. 读取现有的 `settings.json`(如果存在)
120-
2. 按优先级合并配置:`用户 > 提供商 > 基础`
121-
3. 提供商的环境变量通过命令行传递(不写入 `settings.json`
122-
4. 清理遗留的 Supervisor hooks
123-
124-
这样可以确保你的手动配置永远不会丢失!
125-
126101
## Patch 命令:用 ccc 替代 `claude` 命令
127102

128103
通过替换系统中的 `claude` 命令,让任何调用 `claude` 的工具都使用配置了提供商的 `ccc` 命令。

README.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -103,45 +103,20 @@ Config file location, default: `~/.claude/ccc.json`
103103

104104
### Configuration Merge Strategy
105105

106-
**User settings are preserved.** ccc follows these principles when merging configuration:
107-
108-
1. **Priority**: User's `settings.json` configuration has the highest priority
109-
2. **Provider settings**: Provider-specific configuration from ccc.json overrides base settings
110-
3. **Base settings**: The `settings` field in ccc.json serves as a shared template
111-
112-
#### What Gets Preserved
113-
114-
- ✅ User-installed plugins (`enabledPlugins`) - never overwritten
115-
- ✅ Manual `settings.json` edits (permissions, sandbox, etc.) - fully preserved
116-
- ✅ User-configured hooks (PreToolUse, SessionStart, etc.) - respected
117-
- ✅ Environment variables you manually set in settings.json - ccc never edits them
118-
119-
#### What Gets Managed
120-
121-
- 🧹 Supervisor Stop hook - automatically cleaned up if present from previous versions
106+
When you run `ccc`, your existing `settings.json` is read and deep-merged with ccc.json. Priority: **user `settings.json` > provider > base `settings`**. Your manual edits, plugins, and hooks are preserved; provider env is passed via command line and never written into `settings.json`.
122107

123108
#### Environment Variable Conflicts (Hard Guard)
124109

125-
Claude Code's `settings.json` `env` field **overrides** environment variables passed by ccc when launching claude (empirically verified). If `settings.json` contains keys that would shadow the provider env, switching providers silently fails (wrong base_url / token / model).
110+
Claude Code's `settings.json` `env` field **overrides** environment variables passed by ccc when launching claude. If `settings.json` shadows provider env, switching silently fails (wrong base_url / token / model).
126111

127-
**ccc refuses to start claude — and refuses to run `ccc validate` — when it detects such conflicts.** Instead of silently editing your file, ccc prints the offending keys (without their values, to avoid leaking secrets) and tells you how to fix it. ccc never modifies the `env` field of your `settings.json`.
112+
**ccc refuses to start claude — and refuses to run `ccc validate` — when it detects such conflicts.** It prints the offending keys (without values, to avoid leaking secrets) and never modifies your `settings.json` `env` field.
128113

129114
A key is considered conflicting if it:
130115
- starts with `ANTHROPIC_` or `CLAUDE_`, **or**
131116
- collides with any key defined in ccc.json's base / provider `env`.
132117

133118
**How to fix:** remove those keys from `~/.claude/settings.json`'s `env` and move provider-related configuration into `providers.<name>.env` in `~/.claude/ccc.json`.
134119

135-
#### How It Works
136-
137-
When you run `ccc`:
138-
1. Your existing `settings.json` is read (if it exists)
139-
2. Configuration is merged with priority: `user > provider > base`
140-
3. Environment variables from provider are passed via command line (not written to settings.json)
141-
4. Leftover Supervisor hooks are cleaned up
142-
143-
This ensures your manual configuration is never lost!
144-
145120
```json
146121
{
147122
"settings": {

0 commit comments

Comments
 (0)