zcf 2.6.1 → 2.7.1

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
@@ -6,7 +6,7 @@
6
6
  [![codecov](https://codecov.io/gh/UfoMiao/zcf/graph/badge.svg?token=HZI6K4Y7D7)](https://codecov.io/gh/UfoMiao/zcf)
7
7
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/UfoMiao/zcf)
8
8
 
9
- [中文](README_zh-CN.md) | **English**
9
+ [中文](README_zh-CN.md) | **English** | [Changelog](CHANGELOG.md)
10
10
 
11
11
  > Zero-config, one-click setup for Claude Code with bilingual support, intelligent agent system and personalized AI assistant
12
12
 
@@ -48,6 +48,7 @@ npx zcf → select 2 # Execute workflow update via menu
48
48
  #### 🎯 BMad Workflow (New Feature)
49
49
 
50
50
  BMad (Business-Minded Agile Development) is an enterprise-grade workflow system that provides:
51
+
51
52
  - Complete team of specialized AI agents (PO, PM, Architect, Dev, QA, etc.)
52
53
  - Structured development process with quality gates
53
54
  - Automatic documentation generation
@@ -245,6 +246,7 @@ Enter your choice: _
245
246
  | `zcf` | - | Show interactive menu (v2.0 default command) |
246
247
  | `zcf init` | `zcf i` | Initialize Claude Code configuration |
247
248
  | `zcf update` | `zcf u` | Update workflow-related md files with backup |
249
+ | `zcf ccu` | - | Run Claude Code usage analysis tool |
248
250
 
249
251
  #### Common Options
250
252
 
@@ -291,6 +293,9 @@ npx zcf i -c zh-CN -f # Using short options
291
293
  # Update to English prompts (lower token consumption)
292
294
  npx zcf u --config-lang en
293
295
  npx zcf u -c en # Using short option
296
+
297
+ # Run Claude Code usage analysis tool (powered by ccusage)
298
+ npx zcf ccu # Daily usage (default), or use: monthly, session, blocks
294
299
  ```
295
300
 
296
301
  ## 📁 Project Structure
package/dist/cli.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { I as I18N, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, j as LANG_LABELS, H as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, J as readZcfConfig, K as resolveAiOutputLanguage, w as applyAiLanguageDirective, N as configureAiPersonality, u as updateDefaultModel, O as isWindows, y as readMcpConfig, F as fixWindowsMcpConfig, z as writeMcpConfig, P as selectMcpServices, B as backupMcpConfig, M as MCP_SERVICES, E as buildMcpServerConfig, D as mergeMcpServers, v as getExistingApiConfig, Q as formatApiKeyDisplay, R as modifyApiConfigPartially, T as validateApiKey, r as configureApi, U as displayBanner, V as selectScriptLanguage, W as updatePromptOnly, X as selectAndInstallWorkflows, Y as version, _ as handleExitPromptError, $ as handleGeneralError, a0 as displayBannerWithInfo, a1 as readZcfConfigAsync, i as init } from './shared/zcf.BjaE63-h.mjs';
4
+ import { I as I18N, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, j as LANG_LABELS, H as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, J as readZcfConfig, K as resolveAiOutputLanguage, w as applyAiLanguageDirective, N as configureAiPersonality, u as updateDefaultModel, O as isWindows, y as readMcpConfig, F as fixWindowsMcpConfig, z as writeMcpConfig, P as selectMcpServices, B as backupMcpConfig, M as MCP_SERVICES, E as buildMcpServerConfig, D as mergeMcpServers, v as getExistingApiConfig, Q as formatApiKeyDisplay, R as modifyApiConfigPartially, T as validateApiKey, r as configureApi, U as readZcfConfigAsync, V as displayBanner, W as selectScriptLanguage, X as updatePromptOnly, Y as selectAndInstallWorkflows, _ as version, $ as handleExitPromptError, a0 as handleGeneralError, a1 as displayBannerWithInfo, i as init } from './shared/zcf.CZ3RjfyP.mjs';
5
5
  import inquirer from 'inquirer';
6
6
  import { existsSync, unlinkSync } from 'node:fs';
7
+ import { x } from 'tinyexec';
7
8
  import 'pathe';
8
9
  import 'dayjs';
9
10
  import 'node:url';
10
- import 'tinyexec';
11
11
  import 'node:fs/promises';
12
12
  import 'node:os';
13
13
 
@@ -295,6 +295,106 @@ async function configureEnvPermissionFeature(scriptLang) {
295
295
  }
296
296
  }
297
297
 
298
+ async function executeCcusage(args = []) {
299
+ try {
300
+ const zcfConfig = await readZcfConfigAsync();
301
+ const rawLang = zcfConfig?.preferredLang || "en";
302
+ const lang = getValidLanguage(rawLang);
303
+ const i18n = I18N[lang];
304
+ const command = "npx";
305
+ const commandArgs = ["ccusage@latest", ...args];
306
+ console.log(ansis.cyan(i18n.runningCcusage));
307
+ console.log(ansis.gray(`$ npx ccusage@latest ${args.join(" ")}`));
308
+ console.log("");
309
+ await x(command, commandArgs, {
310
+ nodeOptions: {
311
+ stdio: "inherit"
312
+ }
313
+ });
314
+ } catch (error) {
315
+ const zcfConfig = await readZcfConfigAsync();
316
+ const rawLang = zcfConfig?.preferredLang || "en";
317
+ const lang = getValidLanguage(rawLang);
318
+ const i18n = I18N[lang];
319
+ console.error(ansis.red(i18n.ccusageFailed));
320
+ console.error(ansis.yellow(i18n.checkNetworkConnection));
321
+ if (process.env.DEBUG) {
322
+ console.error(ansis.gray(i18n.errorDetails), error);
323
+ }
324
+ if (process.env.NODE_ENV !== "test") {
325
+ process.exit(1);
326
+ }
327
+ throw error;
328
+ }
329
+ }
330
+
331
+ function getValidLanguage(lang) {
332
+ return lang && lang in I18N ? lang : "en";
333
+ }
334
+ async function runCcusageFeature(scriptLang) {
335
+ const validLang = getValidLanguage(scriptLang);
336
+ const i18n = I18N[validLang];
337
+ console.log("");
338
+ console.log(ansis.cyan(i18n.menuOptions.ccusage));
339
+ console.log(ansis.gray(`${i18n.ccusageDescription} - https://github.com/ryoppippi/ccusage`));
340
+ console.log("");
341
+ const choices = [
342
+ { name: i18n.ccusageModes.daily, value: "daily" },
343
+ { name: i18n.ccusageModes.monthly, value: "monthly" },
344
+ { name: i18n.ccusageModes.session, value: "session" },
345
+ { name: i18n.ccusageModes.blocks, value: "blocks" },
346
+ { name: i18n.ccusageModes.custom, value: "custom" },
347
+ { name: i18n.back, value: "back" }
348
+ ];
349
+ const { mode } = await inquirer.prompt({
350
+ type: "list",
351
+ name: "mode",
352
+ message: i18n.selectAnalysisMode,
353
+ choices
354
+ });
355
+ if (mode === "back") {
356
+ return;
357
+ }
358
+ let args = [];
359
+ if (mode === "custom") {
360
+ const { customArgs } = await inquirer.prompt({
361
+ type: "input",
362
+ name: "customArgs",
363
+ message: i18n.enterCustomArgs,
364
+ default: ""
365
+ });
366
+ if (customArgs === null || customArgs === void 0 || customArgs === "") {
367
+ args = [];
368
+ } else {
369
+ const argsString = String(customArgs).trim();
370
+ if (!argsString) {
371
+ args = [];
372
+ } else {
373
+ const argPattern = /"([^"]*)"|'([^']*)'|([^\s]+)/g;
374
+ const matches = [];
375
+ let match;
376
+ while ((match = argPattern.exec(argsString)) !== null) {
377
+ const value = match[1] || match[2] || match[3];
378
+ if (value) {
379
+ matches.push(value);
380
+ }
381
+ }
382
+ args = matches;
383
+ }
384
+ }
385
+ } else {
386
+ args = [mode];
387
+ }
388
+ console.log("");
389
+ await executeCcusage(args);
390
+ console.log("");
391
+ await inquirer.prompt({
392
+ type: "input",
393
+ name: "continue",
394
+ message: ansis.gray(i18n.pressEnterToContinue)
395
+ });
396
+ }
397
+
298
398
  async function update(options = {}) {
299
399
  try {
300
400
  if (!options.skipBanner) {
@@ -382,6 +482,11 @@ async function showMainMenu() {
382
482
  )}`
383
483
  );
384
484
  console.log("");
485
+ console.log(` --------- ${i18n.menuSections.otherTools} ----------`);
486
+ console.log(
487
+ ` ${ansis.cyan("U.")} ${i18n.menuOptions.ccusage} ${ansis.gray("- " + i18n.menuDescriptions.ccusage)}`
488
+ );
489
+ console.log("");
385
490
  console.log(" ------------ ZCF ------------");
386
491
  console.log(
387
492
  ` ${ansis.cyan("0.")} ${i18n.menuOptions.changeLanguage} ${ansis.gray(
@@ -391,14 +496,14 @@ async function showMainMenu() {
391
496
  console.log(
392
497
  ` ${ansis.cyan("-.")} ${i18n.menuOptions.clearCache} ${ansis.gray("- " + i18n.menuDescriptions.clearCache)}`
393
498
  );
394
- console.log(` ${ansis.red("q.")} ${ansis.red(i18n.menuOptions.exit)}`);
499
+ console.log(` ${ansis.red("Q.")} ${ansis.red(i18n.menuOptions.exit)}`);
395
500
  console.log("");
396
501
  const { choice } = await inquirer.prompt({
397
502
  type: "input",
398
503
  name: "choice",
399
- message: i18n.enterChoice || "Enter your choice",
504
+ message: i18n.enterChoice,
400
505
  validate: (value) => {
401
- const valid = ["1", "2", "3", "4", "5", "6", "7", "0", "-", "q", "Q"];
506
+ const valid = ["1", "2", "3", "4", "5", "6", "7", "u", "U", "0", "-", "q", "Q"];
402
507
  return valid.includes(value) || i18n.invalidChoice;
403
508
  }
404
509
  });
@@ -429,6 +534,10 @@ async function showMainMenu() {
429
534
  case "7":
430
535
  await configureEnvPermissionFeature(scriptLang);
431
536
  break;
537
+ case "u":
538
+ case "U":
539
+ await runCcusageFeature(scriptLang);
540
+ break;
432
541
  case "0":
433
542
  const newLang = await changeScriptLanguageFeature(scriptLang);
434
543
  if (newLang !== scriptLang) {
@@ -444,7 +553,7 @@ async function showMainMenu() {
444
553
  break;
445
554
  }
446
555
  if (!exitMenu && choice.toLowerCase() !== "q") {
447
- if (choice === "0" || choice === "-") {
556
+ if (choice === "0" || choice === "-" || choice.toLowerCase() === "u") {
448
557
  console.log("\n" + ansis.dim("\u2500".repeat(50)) + "\n");
449
558
  continue;
450
559
  }
@@ -478,6 +587,9 @@ function setupCommands(cli) {
478
587
  cli.command("update", "Update Claude Code prompts only").alias("u").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").action(async (options) => {
479
588
  await handleUpdateCommand(options);
480
589
  });
590
+ cli.command("ccu [...args]", "Run Claude Code usage analysis tool").allowUnknownOptions().action(async (args) => {
591
+ await executeCcusage(args);
592
+ });
481
593
  cli.help((sections) => customizeHelp(sections));
482
594
  cli.version(version);
483
595
  }
@@ -516,6 +628,7 @@ function customizeHelp(sections) {
516
628
  "i"
517
629
  )} Initialize Claude Code configuration / \u521D\u59CB\u5316 Claude Code \u914D\u7F6E`,
518
630
  ` ${ansis.cyan("zcf update")} | ${ansis.cyan("u")} Update workflow-related md files / \u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md`,
631
+ ` ${ansis.cyan("zcf ccu")} [args] Run Claude Code usage analysis / \u8FD0\u884C Claude Code \u7528\u91CF\u5206\u6790`,
519
632
  "",
520
633
  ansis.gray(" Shortcuts / \u5FEB\u6377\u65B9\u5F0F:"),
521
634
  ` ${ansis.cyan("zcf i")} Quick init / \u5FEB\u901F\u521D\u59CB\u5316`,
@@ -546,6 +659,10 @@ function customizeHelp(sections) {
546
659
  ansis.gray(" # Update workflow-related md files only / \u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md\u6587\u4EF6"),
547
660
  ` ${ansis.cyan("npx zcf u")}`,
548
661
  "",
662
+ ansis.gray(" # Run Claude Code usage analysis / \u8FD0\u884C Claude Code \u7528\u91CF\u5206\u6790"),
663
+ ` ${ansis.cyan("npx zcf ccu")} ${ansis.gray("# Daily usage (default)")}`,
664
+ ` ${ansis.cyan("npx zcf ccu monthly --json")}`,
665
+ "",
549
666
  ansis.gray(" # Force overwrite with Chinese config / \u5F3A\u5236\u4F7F\u7528\u4E2D\u6587\u914D\u7F6E\u8986\u76D6"),
550
667
  ` ${ansis.cyan("npx zcf --init -c zh-CN -f")}`,
551
668
  ` ${ansis.cyan("npx zcf --init --config-lang zh-CN --force")}`
package/dist/index.d.mts CHANGED
@@ -12,6 +12,9 @@ interface TranslationKeys {
12
12
  spaceToSelectReturn: string;
13
13
  enterChoice: string;
14
14
  invalidChoice: string;
15
+ goodbye: string;
16
+ returnToMenu: string;
17
+ back: string;
15
18
  selectScriptLang: string;
16
19
  selectConfigLang: string;
17
20
  selectAiOutputLang: string;
@@ -95,8 +98,9 @@ interface TranslationKeys {
95
98
  selectMcpOption: string;
96
99
  windowsDetected: string;
97
100
  selectFunction: string;
98
- returnToMenu: string;
99
- goodbye: string;
101
+ menuSections: {
102
+ otherTools: string;
103
+ };
100
104
  menuOptions: {
101
105
  fullInit: string;
102
106
  importWorkflow: string;
@@ -105,6 +109,7 @@ interface TranslationKeys {
105
109
  configureModel: string;
106
110
  configureAiMemory: string;
107
111
  configureEnvPermission: string;
112
+ ccusage: string;
108
113
  installBmad: string;
109
114
  clearCache: string;
110
115
  changeLanguage: string;
@@ -118,6 +123,7 @@ interface TranslationKeys {
118
123
  configureModel: string;
119
124
  configureAiMemory: string;
120
125
  configureEnvPermission: string;
126
+ ccusage: string;
121
127
  installBmad: string;
122
128
  clearCache: string;
123
129
  changeLanguage: string;
@@ -141,6 +147,21 @@ interface TranslationKeys {
141
147
  confirmClearCache: string;
142
148
  cacheCleared: string;
143
149
  noCacheFound: string;
150
+ runningCcusage: string;
151
+ ccusageDescription: string;
152
+ selectAnalysisMode: string;
153
+ ccusageModes: {
154
+ daily: string;
155
+ monthly: string;
156
+ session: string;
157
+ blocks: string;
158
+ custom: string;
159
+ };
160
+ enterCustomArgs: string;
161
+ pressEnterToContinue: string;
162
+ ccusageFailed: string;
163
+ checkNetworkConnection: string;
164
+ errorDetails: string;
144
165
  selectEnvPermissionOption: string;
145
166
  importRecommendedEnv: string;
146
167
  importRecommendedEnvDesc: string;
package/dist/index.d.ts CHANGED
@@ -12,6 +12,9 @@ interface TranslationKeys {
12
12
  spaceToSelectReturn: string;
13
13
  enterChoice: string;
14
14
  invalidChoice: string;
15
+ goodbye: string;
16
+ returnToMenu: string;
17
+ back: string;
15
18
  selectScriptLang: string;
16
19
  selectConfigLang: string;
17
20
  selectAiOutputLang: string;
@@ -95,8 +98,9 @@ interface TranslationKeys {
95
98
  selectMcpOption: string;
96
99
  windowsDetected: string;
97
100
  selectFunction: string;
98
- returnToMenu: string;
99
- goodbye: string;
101
+ menuSections: {
102
+ otherTools: string;
103
+ };
100
104
  menuOptions: {
101
105
  fullInit: string;
102
106
  importWorkflow: string;
@@ -105,6 +109,7 @@ interface TranslationKeys {
105
109
  configureModel: string;
106
110
  configureAiMemory: string;
107
111
  configureEnvPermission: string;
112
+ ccusage: string;
108
113
  installBmad: string;
109
114
  clearCache: string;
110
115
  changeLanguage: string;
@@ -118,6 +123,7 @@ interface TranslationKeys {
118
123
  configureModel: string;
119
124
  configureAiMemory: string;
120
125
  configureEnvPermission: string;
126
+ ccusage: string;
121
127
  installBmad: string;
122
128
  clearCache: string;
123
129
  changeLanguage: string;
@@ -141,6 +147,21 @@ interface TranslationKeys {
141
147
  confirmClearCache: string;
142
148
  cacheCleared: string;
143
149
  noCacheFound: string;
150
+ runningCcusage: string;
151
+ ccusageDescription: string;
152
+ selectAnalysisMode: string;
153
+ ccusageModes: {
154
+ daily: string;
155
+ monthly: string;
156
+ session: string;
157
+ blocks: string;
158
+ custom: string;
159
+ };
160
+ enterCustomArgs: string;
161
+ pressEnterToContinue: string;
162
+ ccusageFailed: string;
163
+ checkNetworkConnection: string;
164
+ errorDetails: string;
144
165
  selectEnvPermissionOption: string;
145
166
  importRecommendedEnv: string;
146
167
  importRecommendedEnvDesc: string;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, G as addCompletedOnboarding, w as applyAiLanguageDirective, p as backupExistingConfig, B as backupMcpConfig, E as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, r as configureApi, q as copyConfigFiles, n as ensureClaudeDir, F as fixWindowsMcpConfig, v as getExistingApiConfig, x as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, l as installClaudeCode, k as isClaudeCodeInstalled, m as mergeAndCleanPermissions, s as mergeConfigs, D as mergeMcpServers, t as mergeSettingsFile, o as openSettingsJson, y as readMcpConfig, u as updateDefaultModel, z as writeMcpConfig } from './shared/zcf.BjaE63-h.mjs';
1
+ export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, G as addCompletedOnboarding, w as applyAiLanguageDirective, p as backupExistingConfig, B as backupMcpConfig, E as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, r as configureApi, q as copyConfigFiles, n as ensureClaudeDir, F as fixWindowsMcpConfig, v as getExistingApiConfig, x as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, l as installClaudeCode, k as isClaudeCodeInstalled, m as mergeAndCleanPermissions, s as mergeConfigs, D as mergeMcpServers, t as mergeSettingsFile, o as openSettingsJson, y as readMcpConfig, u as updateDefaultModel, z as writeMcpConfig } from './shared/zcf.CZ3RjfyP.mjs';
2
2
  import 'inquirer';
3
3
  import 'ansis';
4
4
  import 'node:fs';
@@ -8,7 +8,7 @@ import { exec } from 'tinyexec';
8
8
  import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
9
9
  import { homedir, platform } from 'node:os';
10
10
 
11
- const version = "2.6.1";
11
+ const version = "2.7.1";
12
12
  const homepage = "https://github.com/UfoMiao/zcf";
13
13
 
14
14
  const common$1 = {
@@ -23,10 +23,11 @@ const common$1 = {
23
23
  none: "\u65E0",
24
24
  notConfigured: "\u672A\u914D\u7F6E",
25
25
  spaceToSelectReturn: "- \u7A7A\u683C\u9009\u62E9\uFF0C\u56DE\u8F66\u63D0\u4EA4",
26
- enterChoice: "\u8BF7\u8F93\u5165\u9009\u9879\uFF0C\u56DE\u8F66\u786E\u8BA4",
26
+ enterChoice: "\u8BF7\u8F93\u5165\u9009\u9879\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09",
27
27
  invalidChoice: "\u65E0\u6548\u9009\u62E9\u3002\u8BF7\u8F93\u5165\u6709\u6548\u9009\u9879\u3002",
28
28
  goodbye: "\u{1F44B} \u611F\u8C22\u4F7F\u7528 ZCF\uFF01\u518D\u89C1\uFF01",
29
- returnToMenu: "\u8FD4\u56DE\u4E3B\u83DC\u5355\uFF1F"
29
+ returnToMenu: "\u8FD4\u56DE\u4E3B\u83DC\u5355\uFF1F",
30
+ back: "\u8FD4\u56DE"
30
31
  };
31
32
 
32
33
  const language$1 = {
@@ -167,6 +168,9 @@ const mcp$1 = {
167
168
 
168
169
  const menu$1 = {
169
170
  selectFunction: "\u8BF7\u9009\u62E9\u529F\u80FD",
171
+ menuSections: {
172
+ otherTools: "\u5176\u4ED6\u5DE5\u5177"
173
+ },
170
174
  menuOptions: {
171
175
  fullInit: "\u5B8C\u6574\u521D\u59CB\u5316",
172
176
  importWorkflow: "\u5BFC\u5165\u5DE5\u4F5C\u6D41",
@@ -175,6 +179,7 @@ const menu$1 = {
175
179
  configureModel: "\u914D\u7F6E\u9ED8\u8BA4\u6A21\u578B",
176
180
  configureAiMemory: "\u914D\u7F6E Claude \u5168\u5C40\u8BB0\u5FC6",
177
181
  configureEnvPermission: "\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF\u548C\u6743\u9650\u914D\u7F6E",
182
+ ccusage: "ccusage",
178
183
  installBmad: "\u5B89\u88C5 BMad Method",
179
184
  clearCache: "\u6E05\u9664\u504F\u597D\u7F13\u5B58",
180
185
  changeLanguage: "\u66F4\u6539\u663E\u793A\u8BED\u8A00 / Select display language",
@@ -188,6 +193,7 @@ const menu$1 = {
188
193
  configureModel: "\u8BBE\u7F6E\u9ED8\u8BA4\u6A21\u578B\uFF08opus/sonnet\uFF09",
189
194
  configureAiMemory: "\u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00\u548C\u89D2\u8272\u98CE\u683C",
190
195
  configureEnvPermission: "\u5BFC\u5165\u9690\u79C1\u4FDD\u62A4\u73AF\u5883\u53D8\u91CF\u548C\u7CFB\u7EDF\u6743\u9650\u914D\u7F6E",
196
+ ccusage: "Claude Code \u7528\u91CF\u5206\u6790",
191
197
  installBmad: "AI \u9A71\u52A8\u7684\u5F00\u53D1\u65B9\u6CD5\u8BBA\u6846\u67B6",
192
198
  clearCache: "\u6E05\u9664\u504F\u597D\u8BED\u8A00\u7B49\u7F13\u5B58",
193
199
  changeLanguage: "\u66F4\u6539 ZCF \u754C\u9762\u8BED\u8A00"
@@ -301,6 +307,25 @@ const errors$1 = {
301
307
  failedToApplyPersonality: "\u5E94\u7528\u4E2A\u6027\u6307\u4EE4\u5931\u8D25\uFF1A"
302
308
  };
303
309
 
310
+ const tools$1 = {
311
+ // CCUsage
312
+ runningCcusage: "\u6B63\u5728\u8FD0\u884C Claude Code \u7528\u91CF\u5206\u6790\u5DE5\u5177...",
313
+ ccusageDescription: "\u5206\u6790\u4EE4\u724C\u4F7F\u7528\u91CF\u548C\u6210\u672C - https://github.com/ryoppippi/ccusage",
314
+ selectAnalysisMode: "\u9009\u62E9\u5206\u6790\u6A21\u5F0F:",
315
+ ccusageModes: {
316
+ daily: "\u6BCF\u65E5\u4F7F\u7528\u91CF",
317
+ monthly: "\u6BCF\u6708\u4F7F\u7528\u91CF",
318
+ session: "\u4F1A\u8BDD\u7EDF\u8BA1",
319
+ blocks: "\u533A\u5757\u7EDF\u8BA1",
320
+ custom: "\u81EA\u5B9A\u4E49\u53C2\u6570"
321
+ },
322
+ enterCustomArgs: "\u8F93\u5165\u81EA\u5B9A\u4E49\u53C2\u6570 (\u4F8B\u5982: daily --json):",
323
+ pressEnterToContinue: "\u6309 Enter \u952E\u7EE7\u7EED...",
324
+ ccusageFailed: "\u8FD0\u884C ccusage \u5931\u8D25",
325
+ checkNetworkConnection: "\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5",
326
+ errorDetails: "\u9519\u8BEF\u8BE6\u60C5:"
327
+ };
328
+
304
329
  const zhCN = {
305
330
  ...common$1,
306
331
  ...language$1,
@@ -312,7 +337,8 @@ const zhCN = {
312
337
  ...workflow$1,
313
338
  ...cli$1,
314
339
  ...bmad$1,
315
- ...errors$1
340
+ ...errors$1,
341
+ ...tools$1
316
342
  };
317
343
 
318
344
  const common = {
@@ -327,10 +353,11 @@ const common = {
327
353
  none: "None",
328
354
  notConfigured: "Not configured",
329
355
  spaceToSelectReturn: "- Space to select. Return to submit",
330
- enterChoice: "Enter your choice, and press enter",
356
+ enterChoice: "Enter your choice and press enter (case-insensitive)",
331
357
  invalidChoice: "Invalid choice. Please enter a valid option.",
332
358
  goodbye: "\u{1F44B} Thanks for using ZCF! Goodbye!",
333
- returnToMenu: "Return to main menu?"
359
+ returnToMenu: "Return to main menu?",
360
+ back: "Back"
334
361
  };
335
362
 
336
363
  const language = {
@@ -471,6 +498,9 @@ const mcp = {
471
498
 
472
499
  const menu = {
473
500
  selectFunction: "Select function",
501
+ menuSections: {
502
+ otherTools: "Other Tools"
503
+ },
474
504
  menuOptions: {
475
505
  fullInit: "Full initialization",
476
506
  importWorkflow: "Import workflow",
@@ -479,6 +509,7 @@ const menu = {
479
509
  configureModel: "Configure default model",
480
510
  configureAiMemory: "Configure Claude global memory",
481
511
  configureEnvPermission: "Import recommended environment variables and permissions",
512
+ ccusage: "ccusage",
482
513
  installBmad: "Install BMad Method",
483
514
  clearCache: "Clear preference cache",
484
515
  changeLanguage: "Select display language / \u66F4\u6539\u663E\u793A\u8BED\u8A00",
@@ -492,6 +523,7 @@ const menu = {
492
523
  configureModel: "Set default model (opus/sonnet)",
493
524
  configureAiMemory: "Configure AI output language and personality",
494
525
  configureEnvPermission: "Import privacy protection environment variables and system permissions",
526
+ ccusage: "Claude Code usage analysis",
495
527
  installBmad: "AI-driven development methodology framework",
496
528
  clearCache: "Clear preference language and other caches",
497
529
  changeLanguage: "Change ZCF interface language"
@@ -605,6 +637,25 @@ const errors = {
605
637
  failedToApplyPersonality: "Failed to apply personality directive:"
606
638
  };
607
639
 
640
+ const tools = {
641
+ // CCUsage
642
+ runningCcusage: "Running Claude Code usage analysis tool...",
643
+ ccusageDescription: "Analyze token usage and costs - https://github.com/ryoppippi/ccusage",
644
+ selectAnalysisMode: "Select analysis mode:",
645
+ ccusageModes: {
646
+ daily: "Daily usage",
647
+ monthly: "Monthly usage",
648
+ session: "Session statistics",
649
+ blocks: "Block statistics",
650
+ custom: "Custom parameters"
651
+ },
652
+ enterCustomArgs: "Enter custom arguments (e.g., daily --json):",
653
+ pressEnterToContinue: "Press Enter to continue...",
654
+ ccusageFailed: "Failed to run ccusage",
655
+ checkNetworkConnection: "Please check your network connection and try again",
656
+ errorDetails: "Error details:"
657
+ };
658
+
608
659
  const en = {
609
660
  ...common,
610
661
  ...language,
@@ -616,7 +667,8 @@ const en = {
616
667
  ...workflow,
617
668
  ...cli,
618
669
  ...bmad,
619
- ...errors
670
+ ...errors,
671
+ ...tools
620
672
  };
621
673
 
622
674
  const translations = {
@@ -696,8 +748,8 @@ const MCP_SERVICES = [
696
748
  },
697
749
  requiresApiKey: true,
698
750
  apiKeyPrompt: {
699
- "zh-CN": "\u8BF7\u8F93\u5165 Exa API Key",
700
- en: "Enter Exa API Key"
751
+ "zh-CN": "\u8BF7\u8F93\u5165 Exa API Key\uFF08\u53EF\u4ECE https://dashboard.exa.ai/api-keys \u83B7\u53D6\uFF09",
752
+ en: "Enter Exa API Key (get from https://dashboard.exa.ai/api-keys)"
701
753
  },
702
754
  apiKeyEnvVar: "EXA_API_KEY",
703
755
  config: {
@@ -2294,4 +2346,4 @@ async function openSettingsJson() {
2294
2346
  }
2295
2347
  }
2296
2348
 
2297
- export { handleGeneralError as $, AI_OUTPUT_LANGUAGES as A, backupMcpConfig as B, CLAUDE_DIR as C, mergeMcpServers as D, buildMcpServerConfig as E, fixWindowsMcpConfig as F, addCompletedOnboarding as G, updateZcfConfig as H, I18N as I, readZcfConfig as J, resolveAiOutputLanguage as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, configureAiPersonality as N, isWindows as O, selectMcpServices as P, formatApiKeyDisplay as Q, modifyApiConfigPartially as R, SETTINGS_FILE as S, validateApiKey as T, displayBanner as U, selectScriptLanguage as V, updatePromptOnly as W, selectAndInstallWorkflows as X, version as Y, ZCF_CONFIG_FILE as Z, handleExitPromptError as _, importRecommendedEnv as a, displayBannerWithInfo as a0, readZcfConfigAsync as a1, importRecommendedPermissions as b, commandExists as c, cleanupPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, SUPPORTED_LANGS as h, init as i, LANG_LABELS as j, isClaudeCodeInstalled as k, installClaudeCode as l, mergeAndCleanPermissions as m, ensureClaudeDir as n, openSettingsJson as o, backupExistingConfig as p, copyConfigFiles as q, configureApi as r, mergeConfigs as s, mergeSettingsFile as t, updateDefaultModel as u, getExistingApiConfig as v, applyAiLanguageDirective as w, getMcpConfigPath as x, readMcpConfig as y, writeMcpConfig as z };
2349
+ export { handleExitPromptError as $, AI_OUTPUT_LANGUAGES as A, backupMcpConfig as B, CLAUDE_DIR as C, mergeMcpServers as D, buildMcpServerConfig as E, fixWindowsMcpConfig as F, addCompletedOnboarding as G, updateZcfConfig as H, I18N as I, readZcfConfig as J, resolveAiOutputLanguage as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, configureAiPersonality as N, isWindows as O, selectMcpServices as P, formatApiKeyDisplay as Q, modifyApiConfigPartially as R, SETTINGS_FILE as S, validateApiKey as T, readZcfConfigAsync as U, displayBanner as V, selectScriptLanguage as W, updatePromptOnly as X, selectAndInstallWorkflows as Y, ZCF_CONFIG_FILE as Z, version as _, importRecommendedEnv as a, handleGeneralError as a0, displayBannerWithInfo as a1, importRecommendedPermissions as b, commandExists as c, cleanupPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, SUPPORTED_LANGS as h, init as i, LANG_LABELS as j, isClaudeCodeInstalled as k, installClaudeCode as l, mergeAndCleanPermissions as m, ensureClaudeDir as n, openSettingsJson as o, backupExistingConfig as p, copyConfigFiles as q, configureApi as r, mergeConfigs as s, mergeSettingsFile as t, updateDefaultModel as u, getExistingApiConfig as v, applyAiLanguageDirective as w, getMcpConfigPath as x, readMcpConfig as y, writeMcpConfig as z };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "2.6.1",
4
+ "version": "2.7.1",
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",