zcf 2.12.6 → 2.12.7

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.
@@ -15,7 +15,7 @@ import semver from 'semver';
15
15
  import { exec } from 'tinyexec';
16
16
  import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
17
17
 
18
- const version = "2.12.6";
18
+ const version = "2.12.7";
19
19
  const homepage = "https://github.com/UfoMiao/zcf";
20
20
 
21
21
  const i18n = i18next.createInstance();
package/dist/cli.mjs CHANGED
@@ -1120,12 +1120,12 @@ function customizeHelp(sections) {
1120
1120
  ` ${ansis.green("--api-url, -u")} <url> ${i18n.t("cli:help.optionDescriptions.customApiUrl")}`,
1121
1121
  ` ${ansis.green("--ai-output-lang, -a")} <lang> ${i18n.t("cli:help.optionDescriptions.aiOutputLanguage")}`,
1122
1122
  ` ${ansis.green("--all-lang, -g")} <lang> ${i18n.t("cli:help.optionDescriptions.setAllLanguageParams")}`,
1123
- ` ${ansis.green("--config-action, -r")} <action> ${i18n.t("cli:help.optionDescriptions.configHandling")} (default: backup)`,
1124
- ` ${ansis.green("--mcp-services, -m")} <list> ${i18n.t("cli:help.optionDescriptions.mcpServices")} (default: all non-key services)`,
1125
- ` ${ansis.green("--workflows, -w")} <list> ${i18n.t("cli:help.optionDescriptions.workflows")} (default: all workflows)`,
1126
- ` ${ansis.green("--output-styles, -o")} <styles> ${i18n.t("cli:help.optionDescriptions.outputStyles")} (default: all custom styles)`,
1127
- ` ${ansis.green("--default-output-style, -d")} <style> ${i18n.t("cli:help.optionDescriptions.defaultOutputStyle")} (default: engineer-professional)`,
1128
- ` ${ansis.green("--install-cometix-line, -x")} <value> ${i18n.t("cli:help.optionDescriptions.installStatuslineTool")} (default: true)`
1123
+ ` ${ansis.green("--config-action, -r")} <action> ${i18n.t("cli:help.optionDescriptions.configHandling")} (${i18n.t("cli:help.defaults.prefix")} backup)`,
1124
+ ` ${ansis.green("--mcp-services, -m")} <list> ${i18n.t("cli:help.optionDescriptions.mcpServices")} (${i18n.t("cli:help.defaults.prefix")} all non-key services)`,
1125
+ ` ${ansis.green("--workflows, -w")} <list> ${i18n.t("cli:help.optionDescriptions.workflows")} (${i18n.t("cli:help.defaults.prefix")} all workflows)`,
1126
+ ` ${ansis.green("--output-styles, -o")} <styles> ${i18n.t("cli:help.optionDescriptions.outputStyles")} (${i18n.t("cli:help.defaults.prefix")} all custom styles)`,
1127
+ ` ${ansis.green("--default-output-style, -d")} <style> ${i18n.t("cli:help.optionDescriptions.defaultOutputStyle")} (${i18n.t("cli:help.defaults.prefix")} engineer-professional)`,
1128
+ ` ${ansis.green("--install-cometix-line, -x")} <value> ${i18n.t("cli:help.optionDescriptions.installStatuslineTool")} (${i18n.t("cli:help.defaults.prefix")} true)`
1129
1129
  ].join("\n")
1130
1130
  });
1131
1131
  sections.push({
@@ -1145,11 +1145,11 @@ function customizeHelp(sections) {
1145
1145
  ` ${ansis.cyan("npx zcf ccr")}`,
1146
1146
  "",
1147
1147
  ansis.gray(` # ${i18n.t("cli:help.exampleDescriptions.runClaudeCodeUsageAnalysis")}`),
1148
- ` ${ansis.cyan("npx zcf ccu")} ${ansis.gray("# Daily usage (default)")}`,
1148
+ ` ${ansis.cyan("npx zcf ccu")} ${ansis.gray(`# ${i18n.t("cli:help.defaults.dailyUsage")}`)}`,
1149
1149
  ` ${ansis.cyan("npx zcf ccu monthly --json")}`,
1150
1150
  "",
1151
1151
  ansis.gray(` # ${i18n.t("cli:help.exampleDescriptions.checkAndUpdateTools")}`),
1152
- ` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray("# Update Claude Code, CCR and CCometixLine")}`,
1152
+ ` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray(`# ${i18n.t("cli:help.defaults.updateTools")}`)}`,
1153
1153
  ` ${ansis.cyan("npx zcf check")}`,
1154
1154
  "",
1155
1155
  ansis.gray(` # ${i18n.t("cli:help.exampleDescriptions.nonInteractiveModeCicd")}`),
@@ -1171,7 +1171,7 @@ async function setupCommands(cli) {
1171
1171
  cli.command("", "Show interactive menu (default)").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--force, -f", "Force overwrite existing configuration").action(await withLanguageResolution(async () => {
1172
1172
  await showMainMenu();
1173
1173
  }));
1174
- cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--ai-output-lang, -a <lang>", "AI output language").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--config-action, -r <action>", "Config handling (new/backup/merge/docs-only/skip), default: backup").option("--api-type, -t <type>", "API type (auth_token/api_key/ccr_proxy/skip)").option("--api-key, -k <key>", "API key (used for both API key and auth token types)").option("--api-url, -u <url>", "Custom API URL").option("--mcp-services, -m <services>", 'Comma-separated MCP services to install (context7,mcp-deepwiki,Playwright,exa), "skip" to skip all, "all" for all non-key services, default: all').option("--workflows, -w <workflows>", 'Comma-separated workflows to install (sixStepsWorkflow,featPlanUx,gitWorkflow,bmadWorkflow), "skip" to skip all, "all" for all workflows, default: all').option("--output-styles, -o <styles>", 'Comma-separated output styles (engineer-professional,nekomata-engineer,laowang-engineer,default,explanatory,learning), "skip" to skip all, "all" for all custom styles, default: all').option("--default-output-style, -d <style>", "Default output style, default: engineer-professional").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--install-cometix-line, -x <value>", "Install CCometixLine statusline tool (true/false), default: true").action(await withLanguageResolution(async (options) => {
1174
+ cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--ai-output-lang, -a <lang>", "AI output language").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--config-action, -r <action>", `Config handling (new/backup/merge/docs-only/skip), ${i18n.t("cli:help.defaults.prefix")} backup`).option("--api-type, -t <type>", "API type (auth_token/api_key/ccr_proxy/skip)").option("--api-key, -k <key>", "API key (used for both API key and auth token types)").option("--api-url, -u <url>", "Custom API URL").option("--mcp-services, -m <services>", `Comma-separated MCP services to install (context7,mcp-deepwiki,Playwright,exa), "skip" to skip all, "all" for all non-key services, ${i18n.t("cli:help.defaults.prefix")} all`).option("--workflows, -w <workflows>", `Comma-separated workflows to install (sixStepsWorkflow,featPlanUx,gitWorkflow,bmadWorkflow), "skip" to skip all, "all" for all workflows, ${i18n.t("cli:help.defaults.prefix")} all`).option("--output-styles, -o <styles>", `Comma-separated output styles (engineer-professional,nekomata-engineer,laowang-engineer,default,explanatory,learning), "skip" to skip all, "all" for all custom styles, ${i18n.t("cli:help.defaults.prefix")} all`).option("--default-output-style, -d <style>", `Default output style, ${i18n.t("cli:help.defaults.prefix")} engineer-professional`).option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--install-cometix-line, -x <value>", `Install CCometixLine statusline tool (true/false), ${i18n.t("cli:help.defaults.prefix")} true`).action(await withLanguageResolution(async (options) => {
1175
1175
  await init(options);
1176
1176
  }));
1177
1177
  cli.command("update", "Update Claude Code prompts only").alias("u").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").action(await withLanguageResolution(async (options) => {
@@ -11,8 +11,8 @@
11
11
  "enterApiKey": "Enter API Key",
12
12
  "enterApiUrl": "Enter API URL",
13
13
  "enterAuthToken": "Enter Auth Token",
14
- "enterNewApiKey": "Enter new API Key (current: {{key}})",
15
- "enterNewApiUrl": "Enter new API URL (current: {{url}})",
14
+ "enterNewApiKey": "Enter new API Key (current: {key})",
15
+ "enterNewApiUrl": "Enter new API URL (current: {url})",
16
16
  "existingApiConfig": "Existing API configuration detected:",
17
17
  "invalidKeyFormat": "Invalid key format",
18
18
  "invalidUrl": "Invalid URL",
@@ -26,7 +26,7 @@
26
26
  "modifyPartialConfig": "Modify partial configuration",
27
27
  "selectApiAction": "Select API processing operation",
28
28
  "selectModifyItems": "Select items to modify",
29
- "selectNewAuthType": "Select new auth type (current: {{type}})",
29
+ "selectNewAuthType": "Select new auth type (current: {type})",
30
30
  "skipApi": "Skip (configure manually later)",
31
31
  "urlRequired": "URL is required",
32
32
  "useApiKey": "Use API Key (Key authentication)",
@@ -1,9 +1,9 @@
1
1
  {
2
- "help.commands": "Commands:",
3
- "help.shortcuts": "Shortcuts:",
4
- "help.options": "Options:",
5
- "help.examples": "Examples:",
6
- "help.nonInteractiveMode": "Non-interactive mode (for CI/CD):",
2
+ "help.commands": "Commands",
3
+ "help.shortcuts": "Shortcuts",
4
+ "help.options": "Options",
5
+ "help.examples": "Examples",
6
+ "help.nonInteractiveMode": "Non-interactive mode (for CI/CD)",
7
7
  "help.commandDescriptions.showInteractiveMenuDefault": "Show interactive menu (default)",
8
8
  "help.commandDescriptions.initClaudeCodeConfig": "Initialize Claude Code configuration",
9
9
  "help.commandDescriptions.updateWorkflowFiles": "Update workflow-related md files",
@@ -38,5 +38,8 @@
38
38
  "help.exampleDescriptions.checkAndUpdateTools": "Check and update tools",
39
39
  "help.exampleDescriptions.nonInteractiveModeCicd": "Non-interactive mode (CI/CD)",
40
40
  "banner.subtitle": "One-click configuration tool for Claude Code",
41
- "banner.updateSubtitle": "Update configuration for Claude Code"
41
+ "banner.updateSubtitle": "Update configuration for Claude Code",
42
+ "help.defaults.dailyUsage": "Daily usage (default)",
43
+ "help.defaults.updateTools": "Update Claude Code, CCR and CCometixLine",
44
+ "help.defaults.prefix": "default:"
42
45
  }
@@ -2,15 +2,15 @@
2
2
  "failedToRemoveFile": "Failed to remove file:",
3
3
  "failedToSetOnboarding": "Failed to set onboarding completion flag:",
4
4
  "failedToWriteMcpConfig": "Failed to write MCP config:",
5
- "invalidConfigAction": "Invalid configAction value: {{value}}. Must be 'new', 'backup', 'merge', 'docs-only', or 'skip'",
6
- "invalidApiType": "Invalid apiType value: {{value}}. Must be 'auth_token', 'api_key', 'ccr_proxy', or 'skip'",
5
+ "invalidConfigAction": "Invalid configAction value: {value}. Must be 'new', 'backup', 'merge', 'docs-only', or 'skip'",
6
+ "invalidApiType": "Invalid apiType value: {value}. Must be 'auth_token', 'api_key', 'ccr_proxy', or 'skip'",
7
7
  "apiKeyRequiredForApiKey": "API key is required when apiType is \"api_key\"",
8
8
  "apiKeyRequiredForAuthToken": "API key is required when apiType is \"auth_token\"",
9
- "invalidMcpService": "Invalid MCP service: {{service}}. Available services: {{validServices}}",
10
- "invalidOutputStyle": "Invalid output style: {{style}}. Available styles: {{validStyles}}",
11
- "invalidDefaultOutputStyle": "Invalid default output style: {{style}}. Available styles: {{validStyles}}",
12
- "invalidWorkflow": "Invalid workflow: {{workflow}}. Available workflows: {{validWorkflows}}",
13
- "invalidModel": "Invalid model: {{model}}. Expected 'opus', 'sonnet', or 'opusplan'",
9
+ "invalidMcpService": "Invalid MCP service: {service}. Available services: {validServices}",
10
+ "invalidOutputStyle": "Invalid output style: {style}. Available styles: {validStyles}",
11
+ "invalidDefaultOutputStyle": "Invalid default output style: {style}. Available styles: {validStyles}",
12
+ "invalidWorkflow": "Invalid workflow: {workflow}. Available workflows: {validWorkflows}",
13
+ "invalidModel": "Invalid model: {model}. Expected 'opus', 'sonnet', or 'opusplan'",
14
14
  "invalidEnvConfig": "Invalid env configuration: expected object",
15
15
  "invalidBaseUrl": "Invalid ANTHROPIC_BASE_URL: expected string",
16
16
  "invalidApiKeyConfig": "Invalid ANTHROPIC_API_KEY: expected string",
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "cannotCheckVersion": "Cannot check latest version",
3
3
  "ccrNotInstalled": "CCR is not installed",
4
- "ccrUpToDate": "CCR is up to date (v{{version}})",
4
+ "ccrUpToDate": "CCR is up to date (v{version})",
5
5
  "checkFailed": "Version check failed",
6
6
  "checkingTools": "Checking tool versions",
7
7
  "checkingVersion": "Checking version...",
8
8
  "claudeCodeNotInstalled": "Claude Code is not installed",
9
- "claudeCodeUpToDate": "Claude Code is up to date (v{{version}})",
9
+ "claudeCodeUpToDate": "Claude Code is up to date (v{version})",
10
10
  "cometixLineNotInstalled": "CCometixLine is not installed",
11
- "cometixLineUpToDate": "CCometixLine is up to date (v{{version}})",
12
- "confirmUpdate": "Update {{tool}} to the latest version?",
13
- "currentVersion": "Current version: v{{version}}",
11
+ "cometixLineUpToDate": "CCometixLine is up to date (v{version})",
12
+ "confirmUpdate": "Update {tool} to the latest version?",
13
+ "currentVersion": "Current version: v{version}",
14
14
  "errorCheckingUpdates": "Error checking updates:",
15
- "latestVersion": "Latest version: v{{version}}",
16
- "updateFailed": "{{tool}} update failed",
15
+ "latestVersion": "Latest version: v{version}",
16
+ "updateFailed": "{tool} update failed",
17
17
  "updateSkipped": "Update skipped",
18
- "updateSuccess": "{{tool}} updated successfully!",
19
- "updating": "Updating {{tool}}..."
18
+ "updateSuccess": "{tool} updated successfully!",
19
+ "updating": "Updating {tool}..."
20
20
  }
@@ -11,8 +11,8 @@
11
11
  "enterApiKey": "请输入 API Key",
12
12
  "enterApiUrl": "请输入 API URL",
13
13
  "enterAuthToken": "请输入 Auth Token",
14
- "enterNewApiKey": "请输入新的 API Key(当前:{{key}})",
15
- "enterNewApiUrl": "请输入新的 API URL(当前:{{url}})",
14
+ "enterNewApiKey": "请输入新的 API Key(当前:{key})",
15
+ "enterNewApiUrl": "请输入新的 API URL(当前:{url})",
16
16
  "existingApiConfig": "检测到已有 API 配置:",
17
17
  "invalidKeyFormat": "无效的密钥格式",
18
18
  "invalidUrl": "无效的 URL",
@@ -26,7 +26,7 @@
26
26
  "modifyPartialConfig": "修改部分配置",
27
27
  "selectApiAction": "请选择API处理操作",
28
28
  "selectModifyItems": "请选择要修改的项",
29
- "selectNewAuthType": "选择新的认证类型(当前:{{type}})",
29
+ "selectNewAuthType": "选择新的认证类型(当前:{type})",
30
30
  "skipApi": "跳过(稍后手动配置)",
31
31
  "urlRequired": "URL 为必填项",
32
32
  "useApiKey": "使用 API Key (密钥认证)",
@@ -1,9 +1,9 @@
1
1
  {
2
- "help.commands": "命令:",
3
- "help.shortcuts": "快捷方式:",
4
- "help.options": "选项:",
5
- "help.examples": "示例:",
6
- "help.nonInteractiveMode": "非交互模式(适用于CI/CD):",
2
+ "help.commands": "命令",
3
+ "help.shortcuts": "快捷方式",
4
+ "help.options": "选项",
5
+ "help.examples": "示例",
6
+ "help.nonInteractiveMode": "非交互模式(适用于CI/CD",
7
7
  "help.commandDescriptions.showInteractiveMenuDefault": "显示交互式菜单(默认)",
8
8
  "help.commandDescriptions.initClaudeCodeConfig": "初始化 Claude Code 配置",
9
9
  "help.commandDescriptions.updateWorkflowFiles": "仅更新工作流相关md",
@@ -38,5 +38,8 @@
38
38
  "help.exampleDescriptions.checkAndUpdateTools": "检查并更新工具",
39
39
  "help.exampleDescriptions.nonInteractiveModeCicd": "非交互模式(CI/CD)",
40
40
  "banner.subtitle": "Claude Code 一键配置工具",
41
- "banner.updateSubtitle": "更新 Claude Code 配置"
41
+ "banner.updateSubtitle": "更新 Claude Code 配置",
42
+ "help.defaults.dailyUsage": "每日用量(默认)",
43
+ "help.defaults.updateTools": "更新 Claude Code、CCR 和 CCometixLine",
44
+ "help.defaults.prefix": "默认:"
42
45
  }
@@ -2,15 +2,15 @@
2
2
  "failedToRemoveFile": "删除文件失败:",
3
3
  "failedToSetOnboarding": "设置入门完成标志失败:",
4
4
  "failedToWriteMcpConfig": "写入 MCP 配置失败:",
5
- "invalidConfigAction": "无效的配置操作值:{{value}}。必须是 'new', 'backup', 'merge', 'docs-only', 或 'skip'",
6
- "invalidApiType": "无效的 API 类型值:{{value}}。必须是 'auth_token', 'api_key', 'ccr_proxy', 或 'skip'",
5
+ "invalidConfigAction": "无效的配置操作值:{value}。必须是 'new', 'backup', 'merge', 'docs-only', 或 'skip'",
6
+ "invalidApiType": "无效的 API 类型值:{value}。必须是 'auth_token', 'api_key', 'ccr_proxy', 或 'skip'",
7
7
  "apiKeyRequiredForApiKey": "当 apiType 为 \"api_key\" 时需要 API key",
8
8
  "apiKeyRequiredForAuthToken": "当 apiType 为 \"auth_token\" 时需要 API key",
9
- "invalidMcpService": "无效的 MCP 服务:{{service}}。可用的服务:{{validServices}}",
10
- "invalidOutputStyle": "无效的输出样式:{{style}}。可用的样式:{{validStyles}}",
11
- "invalidDefaultOutputStyle": "无效的默认输出样式:{{style}}。可用的样式:{{validStyles}}",
12
- "invalidWorkflow": "无效的工作流:{{workflow}}。可用的工作流:{{validWorkflows}}",
13
- "invalidModel": "无效的模型:{{model}}。期望的值:'opus', 'sonnet', 或 'opusplan'",
9
+ "invalidMcpService": "无效的 MCP 服务:{service}。可用的服务:{validServices}",
10
+ "invalidOutputStyle": "无效的输出样式:{style}。可用的样式:{validStyles}",
11
+ "invalidDefaultOutputStyle": "无效的默认输出样式:{style}。可用的样式:{validStyles}",
12
+ "invalidWorkflow": "无效的工作流:{workflow}。可用的工作流:{validWorkflows}",
13
+ "invalidModel": "无效的模型:{model}。期望的值:'opus', 'sonnet', 或 'opusplan'",
14
14
  "invalidEnvConfig": "无效的环境配置:期望对象类型",
15
15
  "invalidBaseUrl": "无效的 ANTHROPIC_BASE_URL:期望字符串类型",
16
16
  "invalidApiKeyConfig": "无效的 ANTHROPIC_API_KEY:期望字符串类型",
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "cannotCheckVersion": "无法检查最新版本",
3
3
  "ccrNotInstalled": "CCR 未安装",
4
- "ccrUpToDate": "CCR 已是最新版本 (v{{version}})",
4
+ "ccrUpToDate": "CCR 已是最新版本 (v{version})",
5
5
  "checkFailed": "版本检查失败",
6
6
  "checkingTools": "检查工具版本",
7
7
  "checkingVersion": "检查版本中...",
8
8
  "claudeCodeNotInstalled": "Claude Code 未安装",
9
- "claudeCodeUpToDate": "Claude Code 已是最新版本 (v{{version}})",
9
+ "claudeCodeUpToDate": "Claude Code 已是最新版本 (v{version})",
10
10
  "cometixLineNotInstalled": "CCometixLine 未安装",
11
- "cometixLineUpToDate": "CCometixLine 已是最新版本 (v{{version}})",
12
- "confirmUpdate": "将 {{tool}} 更新到最新版本?",
13
- "currentVersion": "当前版本: v{{version}}",
11
+ "cometixLineUpToDate": "CCometixLine 已是最新版本 (v{version})",
12
+ "confirmUpdate": "将 {tool} 更新到最新版本?",
13
+ "currentVersion": "当前版本: v{version}",
14
14
  "errorCheckingUpdates": "检查更新时出错:",
15
- "latestVersion": "最新版本: v{{version}}",
16
- "updateFailed": "{{tool}} 更新失败",
15
+ "latestVersion": "最新版本: v{version}",
16
+ "updateFailed": "{tool} 更新失败",
17
17
  "updateSkipped": "跳过更新",
18
- "updateSuccess": "{{tool}} 更新成功!",
19
- "updating": "正在更新 {{tool}}..."
18
+ "updateSuccess": "{tool} 更新成功!",
19
+ "updating": "正在更新 {tool}..."
20
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "2.12.6",
4
+ "version": "2.12.7",
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",
@@ -71,7 +71,7 @@
71
71
  "lint:fix": "eslint --fix",
72
72
  "test": "vitest",
73
73
  "test:ui": "vitest --ui",
74
- "test:coverage": "vitest --coverage",
74
+ "test:coverage": "vitest run --coverage",
75
75
  "test:run": "vitest run",
76
76
  "test:watch": "vitest watch",
77
77
  "changeset": "changeset",