@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 +65 -87
- package/cover.png +0 -0
- package/package.json +1 -1
- package/src/commands/help.js +7 -0
package/README.md
CHANGED
|
@@ -1,129 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ccc — Claude Code / Codex Launcher
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
Claude Code
|
|
5
|
+
Manage multiple API profiles for **Claude Code** and **OpenAI Codex**. Switch between providers, keys, and endpoints instantly.
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
##
|
|
14
|
-
|
|
15
|
-
### Launch / 启动
|
|
15
|
+
## Quick Start
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
ccc
|
|
19
|
-
ccc
|
|
20
|
-
ccc
|
|
21
|
-
ccc
|
|
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
|
-
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
### Launch
|
|
25
27
|
|
|
26
28
|
```bash
|
|
27
|
-
ccc
|
|
28
|
-
ccc
|
|
29
|
-
ccc
|
|
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
|
-
###
|
|
34
|
+
### Profile Management
|
|
39
35
|
|
|
40
36
|
```bash
|
|
41
|
-
ccc
|
|
42
|
-
ccc
|
|
43
|
-
ccc
|
|
44
|
-
ccc
|
|
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
|
-
|
|
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
|
|
63
|
-
ccc
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
当你更新了主 Claude 设置(插件、模型等)并想将这些更改应用到所有 profiles 时使用此命令。
|
|
69
|
-
|
|
70
|
-
## WebDAV Cloud Sync / WebDAV 云同步
|
|
56
|
+
## How It Works
|
|
71
57
|
|
|
72
|
-
|
|
58
|
+
### Claude Profiles
|
|
73
59
|
|
|
74
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
68
|
+
Each profile is a directory containing `auth.json` + `config.toml`. Launched via:
|
|
107
69
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
70
|
+
```
|
|
71
|
+
CODEX_HOME=~/.ccc/codex-profiles/<name>/ codex
|
|
72
|
+
```
|
|
111
73
|
|
|
112
|
-
|
|
74
|
+
No global environment variables are modified — everything is process-scoped.
|
|
113
75
|
|
|
114
|
-
|
|
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
|
-
|
|
89
|
+
## Key Features
|
|
119
90
|
|
|
120
|
-
-
|
|
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
|
-
##
|
|
98
|
+
## Security
|
|
123
99
|
|
|
124
|
-
-
|
|
125
|
-
-
|
|
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
package/src/commands/help.js
CHANGED
|
@@ -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)');
|