@tkpdx01/ccc 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,129 +1,107 @@
1
- # claude-code-launcher (ccc)
1
+ # ccc — Claude Code / Codex Launcher
2
2
 
3
- Claude Code Settings Launcher - Launch Claude Code with different settings profiles. Run multiple Claude instances with different API configurations simultaneously.
3
+ ![ccc cover](cover.png)
4
4
 
5
- Claude Code 设置启动器 - 使用不同的 settings profile 文件启动 Claude Code,可同时运行多个使用不同 API 配置的 Claude 实例。
5
+ Manage multiple API profiles for **Claude Code** and **OpenAI Codex**. Switch between providers, keys, and endpoints instantly.
6
6
 
7
- ## Installation / 安装
7
+ 管理 **Claude Code** 和 **OpenAI Codex** 的多套 API 配置,一键切换 Provider、Key 和 Endpoint。
8
+
9
+ ## Install
8
10
 
9
11
  ```bash
10
12
  npm install -g @tkpdx01/ccc
11
13
  ```
12
14
 
13
- ## Usage / 使用
14
-
15
- ### Launch / 启动
15
+ ## Quick Start
16
16
 
17
17
  ```bash
18
- ccc # Default profile or select / 使用默认或交互选择
19
- ccc <profile> # Specific profile / 指定配置
20
- ccc -d # With --dangerously-skip-permissions
21
- ccc <profile> -d # Combine both / 组合使用
18
+ ccc new # Create a profile (Claude or Codex)
19
+ ccc list # List all profiles
20
+ ccc <profile> # Launch with profile (by name or index)
21
+ ccc # Launch default, or select interactively
22
22
  ```
23
23
 
24
- ### Manage Profiles / 管理配置
24
+ ## Commands
25
+
26
+ ### Launch
25
27
 
26
28
  ```bash
27
- ccc list # List profiles / 列出配置
28
- ccc list -v # List with URLs / 显示 API URLs
29
- ccc show [profile] # Show config / 显示完整配置
30
- ccc use <profile> # Set default / 设置默认
31
- ccc new [name] # Create from template / 从模板创建
32
- ccc sync [profile] # Sync from template / 从模板同步
33
- ccc sync -a # Sync all / 同步所有
34
- ccc edit [profile] # Edit profile / 编辑配置
35
- ccc delete [profile] # Delete profile / 删除配置
29
+ ccc <profile> # Auto-detect type and launch
30
+ ccc <index> # Launch by index number (e.g. ccc 3)
31
+ ccc -d # Claude: --dangerously-skip-permissions / Codex: --full-auto
36
32
  ```
37
33
 
38
- ### WebDAV Cloud Sync / WebDAV 云同步
34
+ ### Profile Management
39
35
 
40
36
  ```bash
41
- ccc webdav setup # Configure WebDAV and sync password / 配置 WebDAV 和同步密码
42
- ccc webdav push # Push profiles to cloud / 推送到云端
43
- ccc webdav pull # Pull profiles from cloud / 从云端拉取
44
- ccc webdav status # View sync status / 查看同步状态
37
+ ccc new [name] # Create profile (choose Claude or Codex)
38
+ ccc edit [profile] # Edit API credentials
39
+ ccc use <profile> # Set default profile
40
+ ccc show [profile] # Show full config
41
+ ccc delete [profile] # Delete profile
42
+ ccc sync [profile] # Sync from template, preserve credentials
43
+ ccc sync --all # Sync all profiles
44
+ ccc apply [profile] # Write profile config to ~/.claude or ~/.codex
45
45
  ```
46
46
 
47
- ## Features / 功能
48
-
49
- - **Multiple Profiles / 多配置**: Manage different API configurations
50
- - **Template Support / 模板**: Based on `~/.claude/settings.json`
51
- - **Sync Settings / 同步**: Update from template, preserve credentials
52
- - **Claude Env Defaults / Claude 环境变量默认值**: Auto-ensure these values in the `env` section of both `~/.claude/settings.json` and each profile: `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`, `CLAUDE_CODE_ATTRIBUTION_HEADER=0`, `DISABLE_INSTALLATION_CHECKS=1`, `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`
53
- - **WebDAV Cloud Sync / 云同步**: Encrypted sync across devices
54
-
55
- ## Sync Command / 同步命令
56
-
57
- The `sync` command updates profiles with the latest settings from `~/.claude/settings.json` while preserving each profile's API credentials (`ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL`).
58
-
59
- `sync` 命令从 `~/.claude/settings.json` 同步最新设置到 profiles,同时保留每个 profile 的 API 凭证(`ANTHROPIC_AUTH_TOKEN` 和 `ANTHROPIC_BASE_URL`)。
47
+ ### WebDAV Cloud Sync
60
48
 
61
49
  ```bash
62
- ccc sync [profile] # Sync single profile / 同步单个配置
63
- ccc sync --all # Sync all profiles / 同步所有配置
50
+ ccc webdav setup # Configure WebDAV + encryption password
51
+ ccc webdav push # Upload (AES-256-GCM encrypted)
52
+ ccc webdav pull # Download and decrypt
53
+ ccc webdav status # Check sync status
64
54
  ```
65
55
 
66
- Use this when you've updated your main Claude settings (plugins, model, etc.) and want to apply those changes to all profiles.
67
-
68
- 当你更新了主 Claude 设置(插件、模型等)并想将这些更改应用到所有 profiles 时使用此命令。
69
-
70
- ## WebDAV Cloud Sync / WebDAV 云同步
56
+ ## How It Works
71
57
 
72
- Sync your profiles across multiple devices using any WebDAV service (Nutstore, Nextcloud, etc.).
58
+ ### Claude Profiles
73
59
 
74
- 使用任意 WebDAV 服务(坚果云、Nextcloud 等)在多设备间同步配置。
60
+ Each profile is a copy of `~/.claude/settings.json` with its own API credentials. Launched via:
75
61
 
76
- ### Setup / 配置
77
-
78
- ```bash
79
- ccc webdav setup
80
62
  ```
81
-
82
- This will prompt for:
83
- - WebDAV server URL
84
- - Username / Password
85
- - Remote storage path
86
- - Sync password (for encryption)
87
-
88
- ### Commands / 命令
89
-
90
- ```bash
91
- ccc webdav push # Upload encrypted profiles / 上传加密配置
92
- ccc webdav pull # Download and decrypt / 下载并解密
93
- ccc webdav status # View sync status / 查看同步状态
94
- ccc webdav push -f # Force push (skip conflict prompts) / 强制推送
95
- ccc webdav pull -f # Force pull (skip conflict prompts) / 强制拉取
63
+ claude --settings ~/.ccc/profiles/<name>.json
96
64
  ```
97
65
 
98
- ### Security / 安全设计
99
-
100
- - **End-to-end encryption**: All data is encrypted locally with AES-256-GCM before upload. Even if someone gains access to your WebDAV storage, they cannot read your API keys without the sync password.
101
-
102
- - **Password-based protection**: Your sync password is never transmitted. It derives the encryption key using PBKDF2 (100,000 iterations).
103
-
104
- - **Local password caching**: On trusted devices, the password is cached locally (encrypted with machine fingerprint), so you don't need to enter it every time.
66
+ ### Codex Profiles
105
67
 
106
- - **Manual sync only**: Synchronization only happens when you explicitly run `push` or `pull`. No background processes, no automatic uploads. You always know when your data leaves your machine.
68
+ Each profile is a directory containing `auth.json` + `config.toml`. Launched via:
107
69
 
108
- - **Non-destructive merge**: By default, conflicts preserve both versions instead of overwriting. Use `--force` only when you're certain.
109
-
110
- **安全设计**:
70
+ ```
71
+ CODEX_HOME=~/.ccc/codex-profiles/<name>/ codex
72
+ ```
111
73
 
112
- - **端到端加密**:所有数据在上传前使用 AES-256-GCM 本地加密。即使他人获取了你的 WebDAV 存储访问权限,没有同步密码也无法读取你的 API Key。
74
+ No global environment variables are modified everything is process-scoped.
113
75
 
114
- - **密码保护**:同步密码永不传输,使用 PBKDF2(10万次迭代)派生加密密钥。
76
+ ### Storage
115
77
 
116
- - **本机免密**:在可信设备上,密码使用机器指纹加密缓存在本地,无需每次输入。
78
+ ```
79
+ ~/.ccc/
80
+ ├── profiles/ # Claude profiles (*.json)
81
+ ├── codex-profiles/ # Codex profiles
82
+ │ └── <name>/
83
+ │ ├── auth.json # API key
84
+ │ └── config.toml # Model & endpoint config
85
+ ├── default # Default profile name
86
+ └── webdav.json # Cloud sync config
87
+ ```
117
88
 
118
- - **手动同步**:同步仅在你显式执行 `push` 或 `pull` 时发生。无后台进程,无自动上传。你始终清楚数据何时离开本机。
89
+ ## Key Features
119
90
 
120
- - **无损合并**:默认情况下,冲突时保留两个版本而非覆盖。仅在确定时使用 `--force`。
91
+ - **Dual CLI support** — Claude Code + OpenAI Codex in one tool
92
+ - **Unified index** — All profiles sorted together, launch by number
93
+ - **Apply command** — Push a profile's config to `~/.claude` or `~/.codex`
94
+ - **Template sync** — Update from main settings, keep credentials
95
+ - **Cloud sync** — E2E encrypted WebDAV sync across devices
96
+ - **Zero env pollution** — API keys stored in config files, not shell env
121
97
 
122
- ## Storage / 存储
98
+ ## Security
123
99
 
124
- - Profiles: `~/.ccc/profiles/*.json`
125
- - Template: `~/.claude/settings.json`
100
+ - **AES-256-GCM** encryption for cloud sync
101
+ - **PBKDF2** key derivation (100K iterations)
102
+ - **Manual sync only** — no background processes
103
+ - **Non-destructive merge** — conflicts preserve both versions
126
104
 
127
- ## License / 许可证
105
+ ## License
128
106
 
129
107
  MIT
package/cover.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tkpdx01/ccc",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Claude Code / Codex Settings Launcher - Manage multiple Claude Code and Codex profiles",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -38,6 +38,13 @@ export function showHelp() {
38
38
  console.log(chalk.gray(' ~/.ccc/.sync_key ') + '本地密码缓存(机器指纹加密)');
39
39
  console.log();
40
40
 
41
+ console.log(chalk.yellow(' 创建配置:'));
42
+ console.log(chalk.gray(' ccc new ') + '交互式创建,选择 Claude 或 Codex 类型');
43
+ console.log(chalk.gray(' ccc new myprofile ') + '指定名称创建,随后选择类型并填写凭证');
44
+ console.log(chalk.gray(' ') + chalk.dim('Claude 需要: ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN'));
45
+ console.log(chalk.gray(' ') + chalk.dim('Codex 需要: OPENAI_API_KEY + Base URL + Model(可选)'));
46
+ console.log();
47
+
41
48
  console.log(chalk.yellow(' 示例:'));
42
49
  console.log(chalk.gray(' ccc ls ') + '查看配置列表和序号');
43
50
  console.log(chalk.gray(' ccc 3 ') + '启动第 3 个配置(自动识别 Claude/Codex)');