zcf 2.9.9 β†’ 2.9.10

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
@@ -27,7 +27,8 @@ Menu options include:
27
27
  - `3-7` Configuration management (API/CCR, MCP, Model settings, AI personality, etc.)
28
28
  - `R` Claude Code Router management (enhanced in v2.8.1)
29
29
  - `U` ccusage - Claude Code usage analysis
30
- - `+` Check updates - Check and update Claude Code, CCR and CCometixLine versions (v2.10.0+ enhanced)
30
+ - `L` CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking (v2.9.9+ new)
31
+ - `+` Check updates - Check and update Claude Code, CCR and CCometixLine versions (v2.9.9+ enhanced)
31
32
  - More features...
32
33
 
33
34
  ### Or, use direct commands:
@@ -75,16 +76,6 @@ After installation, use `/bmad-init` to initialize the BMad workflow in your pro
75
76
  - **Easy Management**: Interactive menu for CCR configuration and service control
76
77
  - **Auto Updates**: Automatic version checking and updates for CCR and Claude Code (v2.8.1+)
77
78
 
78
- #### πŸ“Š CCometixLine Support (Status Bar Tool) (v2.10.0+ New)
79
-
80
- [CCometixLine](https://github.com/Haleclipse/CCometixLine) is a high-performance Rust-based statusline tool that provides:
81
-
82
- - **Real-time Usage Tracking**: Monitor Claude Code API usage in real-time
83
- - **Git Integration**: Display Git status and branch information
84
- - **Status Line Display**: Native integration with your terminal statusline
85
- - **Performance Optimized**: Built with Rust for minimal resource usage
86
- - **Auto Updates**: Included in ZCF's update checking system
87
-
88
79
  To access CCR features:
89
80
 
90
81
  ```bash
@@ -93,14 +84,6 @@ npx zcf ccr # Open CCR management menu
93
84
  npx zcf β†’ select R
94
85
  ```
95
86
 
96
- Check for updates (v2.8.1+, CCometixLine support v2.10.0+):
97
-
98
- ```bash
99
- npx zcf check-updates # Check and update Claude Code, CCR and CCometixLine to latest versions
100
- # or
101
- npx zcf β†’ select +
102
- ```
103
-
104
87
  CCR menu options:
105
88
 
106
89
  - Initialize CCR - Install and configure CCR with preset providers
@@ -110,7 +93,27 @@ CCR menu options:
110
93
 
111
94
  After CCR setup, ZCF automatically configures Claude Code to use CCR as the API proxy.
112
95
 
113
- > **Important Note for v2.9.1 Users**: If you have previously used ZCF v2.9.1 to initialize CCR, please re-run the CCR initialization process to ensure the correct `@musistudio/claude-code-router` package is installed. Version 2.9.1 had an incorrect package name that has been fixed in later versions.
96
+ **Important Notice for v2.9.9 Users**: If you previously installed CCometixLine using ZCF v2.9.9, please rerun the installation process to ensure that the CCometixLine configuration is correctly added. Run `npx zcf` -> `Select L` -> `Select 1` to add the CCometixLine configuration.
97
+
98
+ #### πŸ“Š CCometixLine Support (Status Bar Tool) (v2.9.9+ New)
99
+
100
+ [CCometixLine](https://github.com/Haleclipse/CCometixLine) is a high-performance Rust-based statusline tool that provides:
101
+
102
+ - **Real-time Usage Tracking**: Monitor Claude Code API usage in real-time
103
+ - **Git Integration**: Display Git status and branch information
104
+ - **Status Line Display**: Native integration with your terminal statusline
105
+ - **Performance Optimized**: Built with Rust for minimal resource usage
106
+ - **Auto Updates**: Included in ZCF's update checking system
107
+
108
+ > **Important Note for v2.9.9 Users**: If you have previously used ZCF v2.9.9 to set up your environment, please re-run the initialization process to ensure CCometixLine configuration is properly added. Run `npx zcf` and select the appropriate setup option to update your configuration with CCometixLine support.
109
+
110
+ #### πŸš€ Check for updates (v2.8.1+, CCometixLine support v2.9.9+):
111
+
112
+ ```bash
113
+ npx zcf check-updates # Check and update Claude Code, CCR and CCometixLine to latest versions
114
+ # or
115
+ npx zcf β†’ select +
116
+ ```
114
117
 
115
118
  ### Setup Process
116
119
 
@@ -205,13 +208,14 @@ Select function:
205
208
  7. Import recommended environment variables and permissions - Import privacy protection environment variables and system permissions
206
209
 
207
210
  --------- Other Tools ----------
208
- R. CCR Management - Claude Code Router management
209
- U. CCUsage - Claude Code usage analysis tool
210
- L. CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking (v2.10.0+ new)
211
+ R. CCR - Claude Code Router management
212
+ U. ccusage - Claude Code usage analysis
213
+ L. CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking
211
214
 
212
215
  ------------ ZCF ------------
213
216
  0. Select display language / ζ›΄ζ”Ήζ˜Ύη€Ίθ―­θ¨€ - Change ZCF interface language
214
217
  -. Clear preference cache - Clear preference language and other caches
218
+ +. Check updates - Check and update Claude Code, CCR and CCometixLine versions
215
219
  Q. Exit
216
220
 
217
221
  Enter your choice: _
@@ -15,7 +15,7 @@ import { promisify as promisify$1 } from 'node:util';
15
15
  import { homedir, platform } from 'node:os';
16
16
  import { join as join$1 } from 'node:path';
17
17
 
18
- const version = "2.9.9";
18
+ const version = "2.9.10";
19
19
  const homepage = "https://github.com/UfoMiao/zcf";
20
20
 
21
21
  const common$1 = {
@@ -458,6 +458,10 @@ const cometixMessages$1 = {
458
458
  cometixInstallSuccess: "CCometixLine \u5B89\u88C5\u6210\u529F",
459
459
  cometixInstallFailed: "\u5B89\u88C5 CCometixLine \u5931\u8D25",
460
460
  cometixAlreadyInstalled: "CCometixLine \u5DF2\u5B89\u88C5",
461
+ statusLineConfigured: "Claude Code \u72B6\u6001\u680F\u914D\u7F6E\u5DF2\u8BBE\u7F6E",
462
+ statusLineConfigFailed: "\u72B6\u6001\u680F\u914D\u7F6E\u5931\u8D25",
463
+ statusLineManualConfig: "\u8BF7\u624B\u52A8\u6DFB\u52A0\u72B6\u6001\u680F\u914D\u7F6E\u5230 Claude Code \u8BBE\u7F6E\u4E2D",
464
+ statusLineAlreadyConfigured: "Claude Code \u72B6\u6001\u680F\u914D\u7F6E\u5DF2\u5B58\u5728",
461
465
  // Installation prompt in init
462
466
  installCometixPrompt: "\u662F\u5426\u5B89\u88C5 CCometixLine - \u57FA\u4E8E Rust \u7684\u9AD8\u6027\u80FD Claude Code \u72B6\u6001\u680F\u5DE5\u5177\uFF0C\u96C6\u6210 Git \u4FE1\u606F\u548C\u5B9E\u65F6\u4F7F\u7528\u91CF\u8DDF\u8E2A\uFF1F",
463
467
  cometixSkipped: "CCometixLine \u5B89\u88C5\u5DF2\u8DF3\u8FC7",
@@ -960,6 +964,10 @@ const cometixMessages = {
960
964
  cometixInstallSuccess: "CCometixLine installed successfully",
961
965
  cometixInstallFailed: "Failed to install CCometixLine",
962
966
  cometixAlreadyInstalled: "CCometixLine is already installed",
967
+ statusLineConfigured: "Claude Code statusLine configured",
968
+ statusLineConfigFailed: "Failed to configure statusLine",
969
+ statusLineManualConfig: "Please manually add statusLine configuration to Claude Code settings",
970
+ statusLineAlreadyConfigured: "Claude Code statusLine already configured",
963
971
  // Installation prompt in init
964
972
  installCometixPrompt: "Install CCometixLine - High-performance Claude Code statusline tool with Git integration and real-time usage tracking?",
965
973
  cometixSkipped: "CCometixLine installation skipped",
@@ -3163,6 +3171,41 @@ const COMETIX_COMMANDS = {
3163
3171
  PRINT_CONFIG: `${COMETIX_COMMAND_NAME} --print`
3164
3172
  };
3165
3173
 
3174
+ function getPlatformStatusLineConfig() {
3175
+ return {
3176
+ type: "command",
3177
+ command: isWindows() ? "%USERPROFILE%\\.claude\\ccline\\ccline.exe" : "~/.claude/ccline/ccline",
3178
+ padding: 0
3179
+ };
3180
+ }
3181
+
3182
+ function addCCometixLineConfig() {
3183
+ try {
3184
+ const statusLineConfig = getPlatformStatusLineConfig();
3185
+ let settings = {};
3186
+ if (exists(SETTINGS_FILE)) {
3187
+ settings = readJsonConfig(SETTINGS_FILE) || {};
3188
+ }
3189
+ settings.statusLine = statusLineConfig;
3190
+ writeJsonConfig(SETTINGS_FILE, settings);
3191
+ return true;
3192
+ } catch (error) {
3193
+ console.error("Failed to add CCometixLine configuration:", error);
3194
+ return false;
3195
+ }
3196
+ }
3197
+ function hasCCometixLineConfig() {
3198
+ try {
3199
+ if (!exists(SETTINGS_FILE)) {
3200
+ return false;
3201
+ }
3202
+ const settings = readJsonConfig(SETTINGS_FILE);
3203
+ return !!settings?.statusLine?.command?.includes("ccline");
3204
+ } catch (error) {
3205
+ return false;
3206
+ }
3207
+ }
3208
+
3166
3209
  const execAsync = promisify$1(exec$2);
3167
3210
  async function isCometixLineInstalled() {
3168
3211
  try {
@@ -3177,12 +3220,36 @@ async function installCometixLine(scriptLang) {
3177
3220
  const isInstalled = await isCometixLineInstalled();
3178
3221
  if (isInstalled) {
3179
3222
  console.log(ansis.green(`\u2714 ${i18n.cometix.cometixAlreadyInstalled}`));
3223
+ try {
3224
+ console.log(ansis.blue(`${i18n.cometix.installingOrUpdating}`));
3225
+ await execAsync(COMETIX_COMMANDS.INSTALL);
3226
+ console.log(ansis.green(`\u2714 ${i18n.cometix.installUpdateSuccess}`));
3227
+ } catch (error) {
3228
+ console.warn(ansis.yellow(`\u26A0 ${i18n.cometix.installUpdateFailed}: ${error}`));
3229
+ }
3230
+ if (!hasCCometixLineConfig()) {
3231
+ try {
3232
+ addCCometixLineConfig();
3233
+ console.log(ansis.green(`\u2714 ${i18n.cometix.statusLineConfigured || "Claude Code statusLine configured"}`));
3234
+ } catch (error) {
3235
+ console.warn(ansis.yellow(`\u26A0 ${i18n.cometix.statusLineConfigFailed || "Failed to configure statusLine"}: ${error}`));
3236
+ }
3237
+ } else {
3238
+ console.log(ansis.blue(`\u2139 ${i18n.cometix.statusLineAlreadyConfigured || "Claude Code statusLine already configured"}`));
3239
+ }
3180
3240
  return;
3181
3241
  }
3182
3242
  try {
3183
3243
  console.log(ansis.blue(`${i18n.cometix.installingCometix}`));
3184
3244
  await execAsync(COMETIX_COMMANDS.INSTALL);
3185
3245
  console.log(ansis.green(`\u2714 ${i18n.cometix.cometixInstallSuccess}`));
3246
+ try {
3247
+ addCCometixLineConfig();
3248
+ console.log(ansis.green(`\u2714 ${i18n.cometix.statusLineConfigured || "Claude Code statusLine configured"}`));
3249
+ } catch (configError) {
3250
+ console.warn(ansis.yellow(`\u26A0 ${i18n.cometix.statusLineConfigFailed || "Failed to configure statusLine"}: ${configError}`));
3251
+ console.log(ansis.blue(`\u{1F4A1} ${i18n.cometix.statusLineManualConfig || "Please manually add statusLine configuration to Claude Code settings"}`));
3252
+ }
3186
3253
  } catch (error) {
3187
3254
  console.error(ansis.red(`\u2717 ${i18n.cometix.cometixInstallFailed}: ${error}`));
3188
3255
  throw error;
@@ -3564,4 +3631,4 @@ async function openSettingsJson() {
3564
3631
  }
3565
3632
  }
3566
3633
 
3567
- export { readCcrConfig as $, AI_OUTPUT_LANGUAGES as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, getTranslation as J, addNumbersToChoices as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, updateZcfConfig as N, readZcfConfig as O, configureAiPersonality as P, isWindows as Q, selectMcpServices as R, SETTINGS_FILE as S, formatApiKeyDisplay as T, modifyApiConfigPartially as U, isCcrInstalled as V, installCcr as W, setupCcrConfiguration as X, validateApiKey as Y, ZCF_CONFIG_FILE as Z, readZcfConfigAsync as _, importRecommendedEnv as a, configureCcrFeature as a0, handleExitPromptError as a1, handleGeneralError as a2, COMETIX_COMMANDS as a3, COMETIX_COMMAND_NAME as a4, displayBanner as a5, selectScriptLanguage as a6, resolveAiOutputLanguage as a7, updatePromptOnly as a8, selectAndInstallWorkflows as a9, version as aa, checkAndUpdateTools as ab, displayBannerWithInfo as ac, prompts as ad, 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, getExistingModelConfig as v, getExistingApiConfig as w, applyAiLanguageDirective as x, getMcpConfigPath as y, readMcpConfig as z };
3634
+ export { readCcrConfig as $, AI_OUTPUT_LANGUAGES as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, getTranslation as J, addNumbersToChoices as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, updateZcfConfig as N, readZcfConfig as O, configureAiPersonality as P, isWindows as Q, selectMcpServices as R, SETTINGS_FILE as S, formatApiKeyDisplay as T, modifyApiConfigPartially as U, isCcrInstalled as V, installCcr as W, setupCcrConfiguration as X, validateApiKey as Y, ZCF_CONFIG_FILE as Z, readZcfConfigAsync as _, importRecommendedEnv as a, configureCcrFeature as a0, handleExitPromptError as a1, handleGeneralError as a2, COMETIX_COMMANDS as a3, COMETIX_COMMAND_NAME as a4, installCometixLine as a5, displayBanner as a6, selectScriptLanguage as a7, resolveAiOutputLanguage as a8, updatePromptOnly as a9, selectAndInstallWorkflows as aa, version as ab, checkAndUpdateTools as ac, displayBannerWithInfo as ad, prompts as ae, 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, getExistingModelConfig as v, getExistingApiConfig as w, applyAiLanguageDirective as x, getMcpConfigPath as y, readMcpConfig as z };
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 { J as getTranslation, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, K as addNumbersToChoices, j as LANG_LABELS, N as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, O as readZcfConfig, x as applyAiLanguageDirective, P as configureAiPersonality, v as getExistingModelConfig, u as updateDefaultModel, Q as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, R as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, E as mergeMcpServers, w as getExistingApiConfig, T as formatApiKeyDisplay, H as addCompletedOnboarding, U as modifyApiConfigPartially, V as isCcrInstalled, W as installCcr, X as setupCcrConfiguration, Y as validateApiKey, r as configureApi, _ as readZcfConfigAsync, I as I18N, $ as readCcrConfig, a0 as configureCcrFeature, a1 as handleExitPromptError, a2 as handleGeneralError, a3 as COMETIX_COMMANDS, a4 as COMETIX_COMMAND_NAME, a5 as displayBanner, a6 as selectScriptLanguage, a7 as resolveAiOutputLanguage, a8 as updatePromptOnly, a9 as selectAndInstallWorkflows, aa as version, ab as checkAndUpdateTools, ac as displayBannerWithInfo, i as init } from './chunks/simple-config.mjs';
4
+ import { J as getTranslation, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, K as addNumbersToChoices, j as LANG_LABELS, N as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, O as readZcfConfig, x as applyAiLanguageDirective, P as configureAiPersonality, v as getExistingModelConfig, u as updateDefaultModel, Q as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, R as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, E as mergeMcpServers, w as getExistingApiConfig, T as formatApiKeyDisplay, H as addCompletedOnboarding, U as modifyApiConfigPartially, V as isCcrInstalled, W as installCcr, X as setupCcrConfiguration, Y as validateApiKey, r as configureApi, _ as readZcfConfigAsync, I as I18N, $ as readCcrConfig, a0 as configureCcrFeature, a1 as handleExitPromptError, a2 as handleGeneralError, a3 as COMETIX_COMMANDS, a4 as COMETIX_COMMAND_NAME, a5 as installCometixLine, a6 as displayBanner, a7 as selectScriptLanguage, a8 as resolveAiOutputLanguage, a9 as updatePromptOnly, aa as selectAndInstallWorkflows, ab as version, ac as checkAndUpdateTools, ad as displayBannerWithInfo, i as init } from './chunks/simple-config.mjs';
5
5
  import inquirer from 'inquirer';
6
6
  import { existsSync, unlinkSync } from 'node:fs';
7
7
  import { x } from 'tinyexec';
@@ -294,7 +294,7 @@ async function configureAiMemoryFeature(scriptLang) {
294
294
  return;
295
295
  }
296
296
  }
297
- const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.ad; });
297
+ const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.ae; });
298
298
  const aiOutputLang = await selectAiOutputLanguage(scriptLang, scriptLang);
299
299
  applyAiLanguageDirective(aiOutputLang);
300
300
  updateZcfConfig({ aiOutputLang });
@@ -643,17 +643,6 @@ async function showCcrMenu(scriptLang) {
643
643
  }
644
644
 
645
645
  const execAsync = promisify$1(exec$1);
646
- async function runCometixInstallOrUpdate(scriptLang) {
647
- const i18n = getTranslation(scriptLang);
648
- try {
649
- console.log(ansis.blue(`${i18n.cometix.installingOrUpdating}`));
650
- await execAsync(COMETIX_COMMANDS.INSTALL);
651
- console.log(ansis.green(`\u2714 ${i18n.cometix.installUpdateSuccess}`));
652
- } catch (error) {
653
- console.error(ansis.red(`\u2717 ${i18n.cometix.installUpdateFailed}: ${error}`));
654
- throw error;
655
- }
656
- }
657
646
  async function runCometixPrintConfig(scriptLang) {
658
647
  const i18n = getTranslation(scriptLang);
659
648
  try {
@@ -691,7 +680,7 @@ async function showCometixMenu(scriptLang) {
691
680
  });
692
681
  switch (choice) {
693
682
  case "1":
694
- await runCometixInstallOrUpdate(scriptLang);
683
+ await installCometixLine(scriptLang);
695
684
  break;
696
685
  case "2":
697
686
  await runCometixPrintConfig(scriptLang);
@@ -1124,8 +1113,8 @@ function customizeHelp(sections) {
1124
1113
  ` ${ansis.cyan("npx zcf ccu monthly --json")}`,
1125
1114
  "",
1126
1115
  ansis.gray(" # Check and update tools / \u68C0\u67E5\u5E76\u66F4\u65B0\u5DE5\u5177"),
1127
- ` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray("# Update Claude Code and CCR")}`,
1128
- ` ${ansis.cyan("npx zcf check")} ${ansis.gray("# Short alias")}`,
1116
+ ` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray("# Update Claude Code, CCR and CCometixLine")}`,
1117
+ ` ${ansis.cyan("npx zcf check")}`,
1129
1118
  "",
1130
1119
  ansis.gray(" # Force overwrite with Chinese config / \u5F3A\u5236\u4F7F\u7528\u4E2D\u6587\u914D\u7F6E\u8986\u76D6"),
1131
1120
  ` ${ansis.cyan("npx zcf --init -c zh-CN -f")}`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "2.9.9",
4
+ "version": "2.9.10",
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",