zcf 1.1.0 → 1.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 UfoMiao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,19 +4,34 @@
4
4
 
5
5
  > 零配置,一键搞定 Claude Code 环境设置 - 支持中英文双语配置和智能代理系统
6
6
 
7
+ ![效果图](./src/assets/screenshot.webp)
8
+
7
9
  ## 🚀 快速开始
8
10
 
11
+ ### 根据你的情况选择:
12
+
13
+ #### 🆕 首次使用 Claude Code
14
+
9
15
  ```bash
10
- npx zcf # 初始化配置(默认)
11
- npx zcf u # 更新 Prompt 文档并备份旧配置(update 缩写)
16
+ npx zcf # 完整初始化:安装 Claude Code + 导入工作流 + 配置 API + 设置 MCP 服务
12
17
  ```
13
18
 
14
- 初始化后会自动:
19
+ #### 🔄 已有 Claude Code 环境
20
+
21
+ ```bash
22
+ npx zcf u # 仅导入工作流:快速添加 AI 工作流和命令系统
23
+ ```
15
24
 
16
- - 检测并安装 Claude Code
17
- - 配置 API 密钥
18
- - 选择并配置 MCP 服务
19
- - 设置所有必要的配置文件
25
+ > **提示**:`zcf u` 是 `zcf update` 的缩写,专为已配置用户设计,只更新工作流相关文件,保留你的 API 和 MCP 配置。
26
+
27
+ ### 初始化流程
28
+
29
+ 完整初始化(`npx zcf`)会自动:
30
+
31
+ - ✅ 检测并安装 Claude Code
32
+ - ✅ 配置 API 密钥
33
+ - ✅ 选择并配置 MCP 服务
34
+ - ✅ 设置所有必要的配置文件
20
35
 
21
36
  ### 使用方式
22
37
 
@@ -94,7 +109,7 @@ $ npx zcf
94
109
 
95
110
  ? 检测到已有配置文件,如何处理?
96
111
  ❯ 备份并覆盖全部
97
- 仅更新 Prompt 文档并备份旧配置
112
+ 仅更新工作流相关md并备份旧配置
98
113
  合并配置
99
114
  跳过
100
115
 
@@ -122,9 +137,9 @@ $ npx zcf
122
137
 
123
138
  #### 命令速查表
124
139
 
125
- | 命令 | 缩写 | 说明 |
126
- | ------------ | ------- | ---------------------- |
127
- | `zcf` | - | 初始化配置(默认命令) |
140
+ | 命令 | 缩写 | 说明 |
141
+ | ------------ | ------- | ---------------------------- |
142
+ | `zcf` | - | 初始化配置(默认命令) |
128
143
  | `zcf update` | `zcf u` | 更新 Prompt 文档并备份旧配置 |
129
144
 
130
145
  #### 常用选项
@@ -222,12 +237,6 @@ claude-code-config/
222
237
  5. **[模式:优化]** - 提升质量
223
238
  6. **[模式:评审]** - 最终评估
224
239
 
225
- ## ⚙️ 支持的模型
226
-
227
- - **opus**:最强大,适合复杂任务
228
- - **sonnet**:平衡性能和成本
229
- - **haiku**:快速轻量级模型
230
-
231
240
  ## 🛠️ 开发
232
241
 
233
242
  ```bash
@@ -249,7 +258,7 @@ node bin/zcf.mjs
249
258
 
250
259
  1. **任务分解**:保持任务独立可测试
251
260
  2. **代码质量**:遵循 SOLID、KISS、DRY 和 YAGNI 原则
252
- 3. **文档管理**:计划存储在 `.claude/` 目录
261
+ 3. **文档管理**:计划存储在项目根目录的`.claude/plan/` 目录下
253
262
 
254
263
  ## 🔧 故障排除
255
264
 
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { s as displayBanner, t as readZcfConfig, b as SUPPORTED_LANGS, L as LANG_LABELS, u as updateZcfConfig, v as version, I as I18N, S as SETTINGS_FILE, x as updatePromptOnly, i as init } from './shared/zcf.S0xKCxNQ.mjs';
4
+ import { s as displayBanner, t as readZcfConfig, b as SUPPORTED_LANGS, L as LANG_LABELS, u as updateZcfConfig, v as version, I as I18N, S as SETTINGS_FILE, x as updatePromptOnly, i as init } from './shared/zcf.3cK6W2AW.mjs';
5
5
  import prompts from '@posva/prompts';
6
6
  import { existsSync } from 'node:fs';
7
7
  import 'node:os';
@@ -95,34 +95,34 @@ cli.help((sections) => {
95
95
  body: ansis.cyan.bold(`ZCF - Zero-Config Claude-Code Flow v${version}`)
96
96
  });
97
97
  sections.push({
98
- title: ansis.yellow("Commands:"),
98
+ title: ansis.yellow("Commands / \u547D\u4EE4:"),
99
99
  body: [
100
- ` ${ansis.cyan("zcf")} Initialize configuration (default)`,
101
- ` ${ansis.cyan("zcf update")} | ${ansis.cyan("u")} Update prompts only with backup`,
100
+ ` ${ansis.cyan("zcf")} Initialize configuration (default) / \u521D\u59CB\u5316\u914D\u7F6E\uFF08\u9ED8\u8BA4\uFF09`,
101
+ ` ${ansis.cyan("zcf update")} | ${ansis.cyan("u")} Update workflow-related md files / \u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md`,
102
102
  "",
103
- ansis.gray(" Shortcut:"),
104
- ` ${ansis.cyan("zcf u")} Quick update`
103
+ ansis.gray(" Shortcut / \u5FEB\u6377\u65B9\u5F0F:"),
104
+ ` ${ansis.cyan("zcf u")} Quick update / \u5FEB\u901F\u66F4\u65B0`
105
105
  ].join("\n")
106
106
  });
107
107
  sections.push({
108
- title: ansis.yellow("Options:"),
108
+ title: ansis.yellow("Options / \u9009\u9879:"),
109
109
  body: [
110
- ` ${ansis.green("--config-lang, -c")} <lang> Configuration language (zh-CN, en)`,
111
- ` ${ansis.green("--force, -f")} Force overwrite existing configuration`,
112
- ` ${ansis.green("--help, -h")} Display help`,
113
- ` ${ansis.green("--version, -v")} Display version`
110
+ ` ${ansis.green("--config-lang, -c")} <lang> Configuration language / \u914D\u7F6E\u8BED\u8A00 (zh-CN, en)`,
111
+ ` ${ansis.green("--force, -f")} Force overwrite / \u5F3A\u5236\u8986\u76D6\u73B0\u6709\u914D\u7F6E`,
112
+ ` ${ansis.green("--help, -h")} Display help / \u663E\u793A\u5E2E\u52A9`,
113
+ ` ${ansis.green("--version, -v")} Display version / \u663E\u793A\u7248\u672C`
114
114
  ].join("\n")
115
115
  });
116
116
  sections.push({
117
- title: ansis.yellow("Examples:"),
117
+ title: ansis.yellow("Examples / \u793A\u4F8B:"),
118
118
  body: [
119
- ansis.gray(" # Initialize with interactive prompts"),
119
+ ansis.gray(" # Initialize with interactive prompts / \u4EA4\u4E92\u5F0F\u521D\u59CB\u5316"),
120
120
  ` ${ansis.cyan("npx zcf")}`,
121
121
  "",
122
- ansis.gray(" # Update prompts only"),
122
+ ansis.gray(" # Update workflow-related md files only / \u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md\u6587\u4EF6"),
123
123
  ` ${ansis.cyan("npx zcf u")}`,
124
124
  "",
125
- ansis.gray(" # Force overwrite with Chinese config"),
125
+ ansis.gray(" # Force overwrite with Chinese config / \u5F3A\u5236\u4F7F\u7528\u4E2D\u6587\u914D\u7F6E\u8986\u76D6"),
126
126
  ` ${ansis.cyan("npx zcf -c zh-CN -f")}`,
127
127
  ` ${ansis.cyan("npx zcf --config-lang zh-CN --force")}`
128
128
  ].join("\n")
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CLAUDE_DIR, a as CLAUDE_MD_FILE, I as I18N, L as LANG_LABELS, M as MCP_CONFIG_FILE, d as MCP_SERVICES, S as SETTINGS_FILE, b as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, j as backupExistingConfig, o as backupMcpConfig, q as buildMcpServerConfig, c as commandExists, l as configureApi, k as copyConfigFiles, h as ensureClaudeDir, n as getMcpConfigPath, g as getPlatform, i as init, f as installClaudeCode, e as isClaudeCodeInstalled, m as mergeConfigs, p as mergeMcpServers, r as readMcpConfig, w as writeMcpConfig } from './shared/zcf.S0xKCxNQ.mjs';
1
+ export { C as CLAUDE_DIR, a as CLAUDE_MD_FILE, I as I18N, L as LANG_LABELS, M as MCP_CONFIG_FILE, d as MCP_SERVICES, S as SETTINGS_FILE, b as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, j as backupExistingConfig, o as backupMcpConfig, q as buildMcpServerConfig, c as commandExists, l as configureApi, k as copyConfigFiles, h as ensureClaudeDir, n as getMcpConfigPath, g as getPlatform, i as init, f as installClaudeCode, e as isClaudeCodeInstalled, m as mergeConfigs, p as mergeMcpServers, r as readMcpConfig, w as writeMcpConfig } from './shared/zcf.3cK6W2AW.mjs';
2
2
  import '@posva/prompts';
3
3
  import 'ansis';
4
4
  import 'node:fs';
@@ -6,7 +6,7 @@ import { join, dirname } from 'pathe';
6
6
  import dayjs from 'dayjs';
7
7
  import { exec } from 'tinyexec';
8
8
 
9
- const version = "1.1.0";
9
+ const version = "1.1.2";
10
10
 
11
11
  const CLAUDE_DIR = join(homedir(), ".claude");
12
12
  const SETTINGS_FILE = join(CLAUDE_DIR, "settings.json");
@@ -38,7 +38,7 @@ const I18N = {
38
38
  enterApiKey: "\u8BF7\u8F93\u5165 API Key",
39
39
  existingConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709\u914D\u7F6E\u6587\u4EF6\uFF0C\u5982\u4F55\u5904\u7406\uFF1F",
40
40
  backupAndOverwrite: "\u5907\u4EFD\u5E76\u8986\u76D6\u5168\u90E8",
41
- updateDocsOnly: "\u4EC5\u66F4\u65B0 Prompt \u6587\u6863\u5E76\u5907\u4EFD\u65E7\u914D\u7F6E",
41
+ updateDocsOnly: "\u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md\u5E76\u5907\u4EFD\u65E7\u914D\u7F6E",
42
42
  mergeConfig: "\u5408\u5E76\u914D\u7F6E",
43
43
  skip: "\u8DF3\u8FC7",
44
44
  backupSuccess: "\u5DF2\u5907\u4EFD\u6240\u6709\u914D\u7F6E\u6587\u4EF6\u5230",
@@ -85,7 +85,7 @@ const I18N = {
85
85
  enterApiKey: "Enter API Key",
86
86
  existingConfig: "Existing config detected. How to proceed?",
87
87
  backupAndOverwrite: "Backup and overwrite all",
88
- updateDocsOnly: "Update Prompt documents only with backup",
88
+ updateDocsOnly: "Update workflow-related md files only with backup",
89
89
  mergeConfig: "Merge config",
90
90
  skip: "Skip",
91
91
  backupSuccess: "All config files backed up to",
@@ -191,7 +191,7 @@ function displayBanner(subtitle) {
191
191
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
192
192
  \u2551 \u2551
193
193
  \u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2551
194
- \u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2551
194
+ \u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2551
195
195
  \u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2551
196
196
  \u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2551
197
197
  \u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2551
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.2",
5
5
  "description": "Zero-Config Claude-Code Flow - One-click configuration tool for Claude Code",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/UfoMiao/zcf#readme",