ccjk 12.0.0 → 12.0.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/dist/chunks/agent-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +22 -11
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +41 -42
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +173 -173
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +36 -25
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +71 -60
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +41 -31
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
package/dist/chunks/init.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import process__default from 'node:process';
|
|
3
|
-
import
|
|
4
|
-
import inquirer from '
|
|
3
|
+
import a from './index2.mjs';
|
|
4
|
+
import { i as inquirer } from './index3.mjs';
|
|
5
5
|
import { version } from './package.mjs';
|
|
6
6
|
import { m as runCodexFullInit, d as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from './codex.mjs';
|
|
7
|
-
import { a as modifyApiConfigPartially, b as configureApiCompletely, n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.
|
|
7
|
+
import { a as modifyApiConfigPartially, b as configureApiCompletely, n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.BnpWvs9V.mjs';
|
|
8
8
|
import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
|
|
9
|
-
import { ensureI18nInitialized, i18n } from './
|
|
9
|
+
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
10
10
|
import { displayBannerWithInfo, padToDisplayWidth } from './banner.mjs';
|
|
11
11
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
12
12
|
import { readCcrConfig, backupCcrConfig, createDefaultCcrConfig, writeCcrConfig, configureCcrProxy, setupCcrConfiguration } from './config2.mjs';
|
|
@@ -15,16 +15,16 @@ import { promisify } from 'node:util';
|
|
|
15
15
|
import { updateCcr } from './auto-updater.mjs';
|
|
16
16
|
import { w as wrapCommandWithSudo, i as isWindows, b as isTermux } from './platform.mjs';
|
|
17
17
|
import { c as addCompletedOnboarding, s as setPrimaryApiKey, b as backupMcpConfig, a as buildMcpServerConfig, r as readMcpConfig, e as replaceMcpServers, f as fixWindowsMcpConfig, w as writeMcpConfig, g as syncMcpPermissions } from './claude-config.mjs';
|
|
18
|
-
import { r as resolveCodeType } from '../shared/ccjk.
|
|
18
|
+
import { r as resolveCodeType } from '../shared/ccjk.BSYWk9ML.mjs';
|
|
19
19
|
import { exists } from './fs-operations.mjs';
|
|
20
20
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
21
21
|
import { p as promptApiConfigurationAction, i as ensureClaudeDir, e as getExistingApiConfig, s as switchToOfficialLogin, b as backupExistingConfig, c as copyConfigFiles, a as applyAiLanguageDirective, f as configureApi } from './config.mjs';
|
|
22
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
22
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
23
23
|
import { getInstallationStatus, installClaudeCode } from './installer.mjs';
|
|
24
24
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
25
25
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
26
|
-
import { c as checkSuperpowersInstalled, i as installSuperpowers } from '../shared/ccjk.
|
|
27
|
-
import { p as promptBoolean } from '../shared/ccjk.
|
|
26
|
+
import { c as checkSuperpowersInstalled, i as installSuperpowers } from '../shared/ccjk._dESH4Rk.mjs';
|
|
27
|
+
import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
|
|
28
28
|
import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
|
|
29
29
|
|
|
30
30
|
const execAsync$1 = promisify(exec);
|
|
@@ -57,39 +57,39 @@ async function installCcr() {
|
|
|
57
57
|
ensureI18nInitialized();
|
|
58
58
|
const { isInstalled, hasCorrectPackage } = await isCcrInstalled();
|
|
59
59
|
if (hasCorrectPackage) {
|
|
60
|
-
console.log(
|
|
60
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
61
61
|
await updateCcr();
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (isInstalled && !hasCorrectPackage) {
|
|
65
65
|
try {
|
|
66
66
|
await execAsync$1("npm list -g claude-code-router");
|
|
67
|
-
console.log(
|
|
67
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("ccr:detectedIncorrectPackage")}`));
|
|
68
68
|
try {
|
|
69
69
|
await execAsync$1("npm uninstall -g claude-code-router");
|
|
70
|
-
console.log(
|
|
70
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:uninstalledIncorrectPackage")}`));
|
|
71
71
|
} catch {
|
|
72
|
-
console.log(
|
|
72
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("ccr:failedToUninstallIncorrectPackage")}`));
|
|
73
73
|
}
|
|
74
74
|
} catch {
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
console.log(
|
|
77
|
+
console.log(a.green(`\u{1F4E6} ${i18n.t("ccr:installingCcr")}`));
|
|
78
78
|
try {
|
|
79
79
|
const installArgs = ["install", "-g", "@musistudio/claude-code-router", "--force"];
|
|
80
80
|
const { command, args, usedSudo } = wrapCommandWithSudo("npm", installArgs);
|
|
81
81
|
if (usedSudo) {
|
|
82
|
-
console.log(
|
|
82
|
+
console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
|
|
83
83
|
}
|
|
84
84
|
await execAsync$1([command, ...args].join(" "));
|
|
85
|
-
console.log(
|
|
85
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrInstallSuccess")}`));
|
|
86
86
|
} catch (error) {
|
|
87
87
|
if (error.message?.includes("EEXIST")) {
|
|
88
|
-
console.log(
|
|
88
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
89
89
|
await updateCcr();
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
console.error(
|
|
92
|
+
console.error(a.red(`\u2716 ${i18n.t("ccr:ccrInstallFailed")}`));
|
|
93
93
|
throw error;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -154,45 +154,45 @@ async function installCometixLine() {
|
|
|
154
154
|
const installArgs = ["install", "-g", COMETIX_PACKAGE_NAME];
|
|
155
155
|
const { command, args, usedSudo } = wrapCommandWithSudo("npm", installArgs);
|
|
156
156
|
if (usedSudo) {
|
|
157
|
-
console.log(
|
|
157
|
+
console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
|
|
158
158
|
}
|
|
159
159
|
await execAsync([command, ...args].join(" "));
|
|
160
160
|
};
|
|
161
161
|
const isInstalled = await isCometixLineInstalled();
|
|
162
162
|
if (isInstalled) {
|
|
163
|
-
console.log(
|
|
163
|
+
console.log(a.green(`\u2714 ${i18n.t("cometix:cometixAlreadyInstalled")}`));
|
|
164
164
|
try {
|
|
165
|
-
console.log(
|
|
165
|
+
console.log(a.green(`${i18n.t("cometix:installingOrUpdating")}`));
|
|
166
166
|
await runInstallCommand();
|
|
167
|
-
console.log(
|
|
167
|
+
console.log(a.green(`\u2714 ${i18n.t("cometix:installUpdateSuccess")}`));
|
|
168
168
|
} catch (error) {
|
|
169
|
-
console.log(
|
|
169
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("cometix:installUpdateFailed")}: ${error}`));
|
|
170
170
|
}
|
|
171
171
|
if (!hasCCometixLineConfig()) {
|
|
172
172
|
try {
|
|
173
173
|
addCCometixLineConfig();
|
|
174
|
-
console.log(
|
|
174
|
+
console.log(a.green(`\u2714 ${i18n.t("cometix:statusLineConfigured") || "Claude Code statusLine configured"}`));
|
|
175
175
|
} catch (error) {
|
|
176
|
-
console.log(
|
|
176
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("cometix:statusLineConfigFailed") || "Failed to configure statusLine"}: ${error}`));
|
|
177
177
|
}
|
|
178
178
|
} else {
|
|
179
|
-
console.log(
|
|
179
|
+
console.log(a.green(`\u2139 ${i18n.t("cometix:statusLineAlreadyConfigured") || "Claude Code statusLine already configured"}`));
|
|
180
180
|
}
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
try {
|
|
184
|
-
console.log(
|
|
184
|
+
console.log(a.green(`${i18n.t("cometix:installingCometix")}`));
|
|
185
185
|
await runInstallCommand();
|
|
186
|
-
console.log(
|
|
186
|
+
console.log(a.green(`\u2714 ${i18n.t("cometix:cometixInstallSuccess")}`));
|
|
187
187
|
try {
|
|
188
188
|
addCCometixLineConfig();
|
|
189
|
-
console.log(
|
|
189
|
+
console.log(a.green(`\u2714 ${i18n.t("cometix:statusLineConfigured") || "Claude Code statusLine configured"}`));
|
|
190
190
|
} catch (configError) {
|
|
191
|
-
console.log(
|
|
192
|
-
console.log(
|
|
191
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("cometix:statusLineConfigFailed") || "Failed to configure statusLine"}: ${configError}`));
|
|
192
|
+
console.log(a.green(`\u{1F4A1} ${i18n.t("cometix:statusLineManualConfig") || "Please manually add statusLine configuration to Claude Code settings"}`));
|
|
193
193
|
}
|
|
194
194
|
} catch (error) {
|
|
195
|
-
console.error(
|
|
195
|
+
console.error(a.red(`\u2717 ${i18n.t("cometix:cometixInstallFailed")}: ${error}`));
|
|
196
196
|
throw error;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
@@ -260,17 +260,17 @@ function formatError(error, context) {
|
|
|
260
260
|
function displayError(error, context) {
|
|
261
261
|
const formatted = formatError(error, context);
|
|
262
262
|
console.error();
|
|
263
|
-
console.error(
|
|
263
|
+
console.error(a.red(formatted.title));
|
|
264
264
|
console.error(formatted.message);
|
|
265
265
|
if (formatted.suggestion) {
|
|
266
266
|
console.error();
|
|
267
|
-
console.error(
|
|
267
|
+
console.error(a.yellow("\u{1F4A1} Suggestion:"), formatted.suggestion);
|
|
268
268
|
}
|
|
269
269
|
if (formatted.command) {
|
|
270
|
-
console.error(
|
|
270
|
+
console.error(a.cyan(" Run:"), a.green(formatted.command));
|
|
271
271
|
}
|
|
272
272
|
if (formatted.docsUrl) {
|
|
273
|
-
console.error(
|
|
273
|
+
console.error(a.cyan(" Docs:"), a.blue(formatted.docsUrl));
|
|
274
274
|
}
|
|
275
275
|
console.error();
|
|
276
276
|
}
|
|
@@ -287,8 +287,8 @@ class ProgressTracker {
|
|
|
287
287
|
}
|
|
288
288
|
start() {
|
|
289
289
|
console.log();
|
|
290
|
-
console.log(
|
|
291
|
-
console.log(
|
|
290
|
+
console.log(a.cyan("\u{1F680} Starting setup..."));
|
|
291
|
+
console.log(a.gray(` ${this.totalSteps} steps to complete`));
|
|
292
292
|
console.log();
|
|
293
293
|
}
|
|
294
294
|
nextStep(message) {
|
|
@@ -297,27 +297,27 @@ class ProgressTracker {
|
|
|
297
297
|
const progress = Math.round(this.currentStep / this.totalSteps * 100);
|
|
298
298
|
const bar = this.renderProgressBar(progress);
|
|
299
299
|
console.log();
|
|
300
|
-
console.log(
|
|
301
|
-
console.log(
|
|
300
|
+
console.log(a.cyan(`[${this.currentStep}/${this.totalSteps}]`), stepName);
|
|
301
|
+
console.log(a.gray(` ${bar} ${progress}%`));
|
|
302
302
|
}
|
|
303
303
|
complete() {
|
|
304
304
|
const duration = ((Date.now() - this.startTime) / 1e3).toFixed(1);
|
|
305
305
|
console.log();
|
|
306
|
-
console.log(
|
|
307
|
-
console.log(
|
|
306
|
+
console.log(a.green("\u2705 Setup complete!"));
|
|
307
|
+
console.log(a.gray(` Completed in ${duration}s`));
|
|
308
308
|
console.log();
|
|
309
309
|
}
|
|
310
310
|
error(message) {
|
|
311
311
|
console.log();
|
|
312
|
-
console.log(
|
|
313
|
-
console.log(
|
|
312
|
+
console.log(a.red("\u274C Setup failed"));
|
|
313
|
+
console.log(a.white(` ${message}`));
|
|
314
314
|
console.log();
|
|
315
315
|
}
|
|
316
316
|
renderProgressBar(percent) {
|
|
317
317
|
const width = 20;
|
|
318
318
|
const filled = Math.round(percent / 100 * width);
|
|
319
319
|
const empty = width - filled;
|
|
320
|
-
return
|
|
320
|
+
return a.green("\u2588".repeat(filled)) + a.gray("\u2591".repeat(empty));
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
|
|
@@ -509,12 +509,12 @@ async function handleSuperpowersInstallation(options) {
|
|
|
509
509
|
try {
|
|
510
510
|
const status = await checkSuperpowersInstalled();
|
|
511
511
|
if (status.installed) {
|
|
512
|
-
console.log(
|
|
512
|
+
console.log(a.green(`\u2714 ${i18n.t("superpowers:alreadyInstalled")}`));
|
|
513
513
|
if (status.version) {
|
|
514
|
-
console.log(
|
|
514
|
+
console.log(a.gray(` ${i18n.t("superpowers:status.version", { version: status.version })}`));
|
|
515
515
|
}
|
|
516
516
|
if (status.skillCount) {
|
|
517
|
-
console.log(
|
|
517
|
+
console.log(a.gray(` ${i18n.t("superpowers:status.skillCount", { count: status.skillCount })}`));
|
|
518
518
|
}
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
@@ -522,17 +522,17 @@ async function handleSuperpowersInstallation(options) {
|
|
|
522
522
|
if (options.skipPrompt) {
|
|
523
523
|
shouldInstall = options.installSuperpowers === true;
|
|
524
524
|
} else {
|
|
525
|
-
console.log(
|
|
525
|
+
console.log(a.green(`
|
|
526
526
|
${i18n.t("superpowers:title")}`));
|
|
527
|
-
console.log(
|
|
528
|
-
console.log(
|
|
527
|
+
console.log(a.gray(i18n.t("superpowers:description")));
|
|
528
|
+
console.log(a.gray(i18n.t("superpowers:installPromptDescription")));
|
|
529
529
|
shouldInstall = await promptBoolean({
|
|
530
530
|
message: i18n.t("superpowers:installPrompt"),
|
|
531
531
|
defaultValue: false
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
if (!shouldInstall) {
|
|
535
|
-
console.log(
|
|
535
|
+
console.log(a.yellow(i18n.t("common:skip")));
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
538
|
const result = await installSuperpowers({
|
|
@@ -540,16 +540,16 @@ ${i18n.t("superpowers:title")}`));
|
|
|
540
540
|
skipPrompt: options.skipPrompt
|
|
541
541
|
});
|
|
542
542
|
if (result.success) {
|
|
543
|
-
console.log(
|
|
543
|
+
console.log(a.green(`\u2714 ${result.message}`));
|
|
544
544
|
} else {
|
|
545
|
-
console.error(
|
|
545
|
+
console.error(a.red(`\u2716 ${result.message}`));
|
|
546
546
|
if (result.error) {
|
|
547
|
-
console.error(
|
|
547
|
+
console.error(a.gray(` ${result.error}`));
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
} catch (error) {
|
|
551
551
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
552
|
-
console.error(
|
|
552
|
+
console.error(a.red(`${i18n.t("superpowers:installFailed")}: ${errorMessage}`));
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
async function init(options = {}) {
|
|
@@ -557,7 +557,7 @@ async function init(options = {}) {
|
|
|
557
557
|
const { cleanupZcfNamespace } = await import('./cleanup-migration.mjs');
|
|
558
558
|
const { removed } = cleanupZcfNamespace();
|
|
559
559
|
if (removed.length > 0) {
|
|
560
|
-
console.log(
|
|
560
|
+
console.log(a.dim(`Cleaned up legacy zcf namespace: ${removed.join(", ")}`));
|
|
561
561
|
}
|
|
562
562
|
} catch {
|
|
563
563
|
}
|
|
@@ -590,7 +590,7 @@ async function init(options = {}) {
|
|
|
590
590
|
codeToolType = await resolveCodeType(options.codeType);
|
|
591
591
|
} catch (error) {
|
|
592
592
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
593
|
-
console.error(
|
|
593
|
+
console.error(a.red(`${i18n.t("errors:generalError")} ${errorMessage}`));
|
|
594
594
|
codeToolType = DEFAULT_CODE_TOOL_TYPE;
|
|
595
595
|
}
|
|
596
596
|
options.codeType = codeToolType;
|
|
@@ -637,12 +637,12 @@ async function init(options = {}) {
|
|
|
637
637
|
try {
|
|
638
638
|
addCompletedOnboarding();
|
|
639
639
|
} catch (error) {
|
|
640
|
-
console.error(
|
|
640
|
+
console.error(a.red(i18n.t("errors:failedToSetOnboarding")), error);
|
|
641
641
|
}
|
|
642
642
|
try {
|
|
643
643
|
setPrimaryApiKey();
|
|
644
644
|
} catch (error) {
|
|
645
|
-
const { ensureI18nInitialized, i18n: i18nModule } = await import('./
|
|
645
|
+
const { ensureI18nInitialized, i18n: i18nModule } = await import('./index5.mjs');
|
|
646
646
|
ensureI18nInitialized();
|
|
647
647
|
console.error(i18nModule.t("mcp:primaryApiKeySetFailed"), error);
|
|
648
648
|
}
|
|
@@ -655,19 +655,19 @@ async function init(options = {}) {
|
|
|
655
655
|
message: i18n.t("api:configureApi"),
|
|
656
656
|
choices: [
|
|
657
657
|
{
|
|
658
|
-
name: `${i18n.t("api:useAuthToken")} - ${
|
|
658
|
+
name: `${i18n.t("api:useAuthToken")} - ${a.gray(i18n.t("api:authTokenDesc"))}`,
|
|
659
659
|
value: "auth_token",
|
|
660
660
|
short: i18n.t("api:useAuthToken")
|
|
661
661
|
},
|
|
662
662
|
{
|
|
663
|
-
name: `${i18n.t("api:useApiKey")} - ${
|
|
663
|
+
name: `${i18n.t("api:useApiKey")} - ${a.gray(i18n.t("api:apiKeyDesc"))}`,
|
|
664
664
|
value: "api_key",
|
|
665
665
|
short: i18n.t("api:useApiKey")
|
|
666
666
|
}
|
|
667
667
|
]
|
|
668
668
|
});
|
|
669
669
|
if (!apiChoice) {
|
|
670
|
-
console.log(
|
|
670
|
+
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
671
671
|
process__default.exit(0);
|
|
672
672
|
}
|
|
673
673
|
return await configureApiCompletely(apiChoice);
|
|
@@ -677,9 +677,9 @@ async function init(options = {}) {
|
|
|
677
677
|
displayBannerWithInfo(CODE_TOOL_BANNERS[codeToolType] || "CCJK");
|
|
678
678
|
}
|
|
679
679
|
if (isTermux()) {
|
|
680
|
-
console.log(
|
|
680
|
+
console.log(a.yellow(`
|
|
681
681
|
\u2139 ${i18n.t("installation:termuxDetected")}`));
|
|
682
|
-
console.log(
|
|
682
|
+
console.log(a.gray(i18n.t("installation:termuxEnvironmentInfo")));
|
|
683
683
|
}
|
|
684
684
|
let configLang = options.configLang;
|
|
685
685
|
if (codeToolType === "codex") {
|
|
@@ -742,7 +742,7 @@ async function init(options = {}) {
|
|
|
742
742
|
aiOutputLang: resolvedAiOutputLang ?? options.aiOutputLang ?? zcfConfig?.aiOutputLang ?? "en",
|
|
743
743
|
codeToolType
|
|
744
744
|
});
|
|
745
|
-
console.log(
|
|
745
|
+
console.log(a.green(i18n.t("codex:setupComplete")));
|
|
746
746
|
return;
|
|
747
747
|
}
|
|
748
748
|
const aiOutputLang = await resolveAiOutputLanguage(i18n.language, options.aiOutputLang, zcfConfig, options.skipPrompt);
|
|
@@ -751,12 +751,12 @@ async function init(options = {}) {
|
|
|
751
751
|
const { verifyInstallation, displayVerificationResult } = await import('./installer.mjs');
|
|
752
752
|
const verification = await verifyInstallation("claude-code");
|
|
753
753
|
if (verification.symlinkCreated) {
|
|
754
|
-
console.log(
|
|
754
|
+
console.log(a.green(`\u2714 ${i18n.t("installation:alreadyInstalled")}`));
|
|
755
755
|
displayVerificationResult(verification, "claude-code");
|
|
756
756
|
} else if (!verification.success) {
|
|
757
|
-
console.log(
|
|
757
|
+
console.log(a.yellow(`\u26A0 ${i18n.t("installation:verificationFailed")}`));
|
|
758
758
|
if (verification.error) {
|
|
759
|
-
console.log(
|
|
759
|
+
console.log(a.gray(` ${verification.error}`));
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
} else {
|
|
@@ -770,7 +770,7 @@ async function init(options = {}) {
|
|
|
770
770
|
if (shouldInstall) {
|
|
771
771
|
await installClaudeCode(false);
|
|
772
772
|
} else {
|
|
773
|
-
console.log(
|
|
773
|
+
console.log(a.yellow(i18n.t("common:skip")));
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
}
|
|
@@ -780,7 +780,7 @@ async function init(options = {}) {
|
|
|
780
780
|
ensureClaudeDir();
|
|
781
781
|
if (existsSync(SETTINGS_FILE) && needsMigration()) {
|
|
782
782
|
if (options.skipPrompt) {
|
|
783
|
-
console.log(
|
|
783
|
+
console.log(a.yellow("\n\u26A0\uFE0F Problematic configuration detected. Auto-fixing...\n"));
|
|
784
784
|
const result = migrateSettingsForTokenRetrieval();
|
|
785
785
|
displayMigrationResult(result);
|
|
786
786
|
} else {
|
|
@@ -796,7 +796,7 @@ async function init(options = {}) {
|
|
|
796
796
|
if (options.skipPrompt) {
|
|
797
797
|
action = options.configAction || "backup";
|
|
798
798
|
if (action === "skip") {
|
|
799
|
-
console.log(
|
|
799
|
+
console.log(a.yellow(i18n.t("common:skip")));
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
802
|
} else {
|
|
@@ -812,12 +812,12 @@ async function init(options = {}) {
|
|
|
812
812
|
])
|
|
813
813
|
});
|
|
814
814
|
if (!userAction) {
|
|
815
|
-
console.log(
|
|
815
|
+
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
816
816
|
process__default.exit(0);
|
|
817
817
|
}
|
|
818
818
|
action = userAction;
|
|
819
819
|
if (action === "skip") {
|
|
820
|
-
console.log(
|
|
820
|
+
console.log(a.yellow(i18n.t("common:skip")));
|
|
821
821
|
return;
|
|
822
822
|
}
|
|
823
823
|
}
|
|
@@ -867,24 +867,24 @@ async function init(options = {}) {
|
|
|
867
867
|
if (!ccrStatus.hasCorrectPackage) {
|
|
868
868
|
await installCcr();
|
|
869
869
|
} else {
|
|
870
|
-
console.log(
|
|
870
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
871
871
|
}
|
|
872
872
|
const existingCcrConfig = readCcrConfig();
|
|
873
873
|
if (existingCcrConfig) {
|
|
874
874
|
const backupPath = await backupCcrConfig();
|
|
875
875
|
if (backupPath) {
|
|
876
|
-
console.log(
|
|
876
|
+
console.log(a.gray(`\u2714 ${i18n.t("ccr:ccrBackupSuccess")}: ${backupPath}`));
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
const defaultCcrConfig = createDefaultCcrConfig();
|
|
880
880
|
writeCcrConfig(defaultCcrConfig);
|
|
881
|
-
console.log(
|
|
881
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrConfigSuccess")}`));
|
|
882
882
|
await configureCcrProxy(defaultCcrConfig);
|
|
883
|
-
console.log(
|
|
883
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:proxyConfigSuccess")}`));
|
|
884
884
|
try {
|
|
885
885
|
addCompletedOnboarding();
|
|
886
886
|
} catch (error) {
|
|
887
|
-
console.error(
|
|
887
|
+
console.error(a.red(i18n.t("errors:failedToSetOnboarding")), error);
|
|
888
888
|
}
|
|
889
889
|
apiConfig = null;
|
|
890
890
|
}
|
|
@@ -895,10 +895,10 @@ async function init(options = {}) {
|
|
|
895
895
|
case "official": {
|
|
896
896
|
const success = switchToOfficialLogin();
|
|
897
897
|
if (success) {
|
|
898
|
-
console.log(
|
|
898
|
+
console.log(a.green(`\u2714 ${i18n.t("api:officialLoginConfigured")}`));
|
|
899
899
|
apiConfig = null;
|
|
900
900
|
} else {
|
|
901
|
-
console.log(
|
|
901
|
+
console.log(a.red(i18n.t("api:officialLoginFailed")));
|
|
902
902
|
}
|
|
903
903
|
break;
|
|
904
904
|
}
|
|
@@ -910,11 +910,11 @@ async function init(options = {}) {
|
|
|
910
910
|
if (!ccrStatus.hasCorrectPackage) {
|
|
911
911
|
await installCcr();
|
|
912
912
|
} else {
|
|
913
|
-
console.log(
|
|
913
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
914
914
|
}
|
|
915
915
|
const ccrConfigured = await setupCcrConfiguration();
|
|
916
916
|
if (ccrConfigured) {
|
|
917
|
-
console.log(
|
|
917
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
|
|
918
918
|
apiConfig = null;
|
|
919
919
|
}
|
|
920
920
|
break;
|
|
@@ -923,7 +923,7 @@ async function init(options = {}) {
|
|
|
923
923
|
apiConfig = null;
|
|
924
924
|
break;
|
|
925
925
|
default:
|
|
926
|
-
console.log(
|
|
926
|
+
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
927
927
|
process__default.exit(0);
|
|
928
928
|
}
|
|
929
929
|
}
|
|
@@ -931,7 +931,7 @@ async function init(options = {}) {
|
|
|
931
931
|
if (["backup", "docs-only", "merge"].includes(action)) {
|
|
932
932
|
const backupDir = backupExistingConfig();
|
|
933
933
|
if (backupDir) {
|
|
934
|
-
console.log(
|
|
934
|
+
console.log(a.gray(`\u2714 ${i18n.t("configuration:backupSuccess")}: ${backupDir}`));
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
937
|
if (action === "docs-only") {
|
|
@@ -967,9 +967,9 @@ async function init(options = {}) {
|
|
|
967
967
|
if (apiConfig && action !== "docs-only") {
|
|
968
968
|
const configuredApi = configureApi(apiConfig);
|
|
969
969
|
if (configuredApi) {
|
|
970
|
-
console.log(
|
|
971
|
-
console.log(
|
|
972
|
-
console.log(
|
|
970
|
+
console.log(a.green(`\u2714 ${i18n.t("api:apiConfigSuccess")}`));
|
|
971
|
+
console.log(a.gray(` URL: ${configuredApi.url}`));
|
|
972
|
+
console.log(a.gray(` Key: ${formatApiKeyDisplay(configuredApi.key)}`));
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
const hasModelParams = options.apiModel || options.apiHaikuModel || options.apiSonnetModel || options.apiOpusModel;
|
|
@@ -982,16 +982,16 @@ async function init(options = {}) {
|
|
|
982
982
|
options.apiSonnetModel || void 0,
|
|
983
983
|
options.apiOpusModel || void 0
|
|
984
984
|
);
|
|
985
|
-
console.log(
|
|
985
|
+
console.log(a.green(`\u2714 ${i18n.t("api:modelConfigSuccess")}`));
|
|
986
986
|
if (options.apiModel) {
|
|
987
|
-
console.log(
|
|
987
|
+
console.log(a.gray(` ${i18n.t("api:primaryModel")}: ${options.apiModel}`));
|
|
988
988
|
}
|
|
989
989
|
if (options.apiHaikuModel)
|
|
990
|
-
console.log(
|
|
990
|
+
console.log(a.gray(` Haiku: ${options.apiHaikuModel}`));
|
|
991
991
|
if (options.apiSonnetModel)
|
|
992
|
-
console.log(
|
|
992
|
+
console.log(a.gray(` Sonnet: ${options.apiSonnetModel}`));
|
|
993
993
|
if (options.apiOpusModel)
|
|
994
|
-
console.log(
|
|
994
|
+
console.log(a.gray(` Opus: ${options.apiOpusModel}`));
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
if (!options.skipPrompt && !options.skipBanner) tracker.nextStep("Installing MCP services");
|
|
@@ -1008,7 +1008,7 @@ async function init(options = {}) {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
if (shouldConfigureMcp) {
|
|
1010
1010
|
if (isWindows()) {
|
|
1011
|
-
console.log(
|
|
1011
|
+
console.log(a.green(`\u2139 ${i18n.t("installation:windowsDetected")}`));
|
|
1012
1012
|
}
|
|
1013
1013
|
let selectedServices;
|
|
1014
1014
|
if (options.skipPrompt) {
|
|
@@ -1022,7 +1022,7 @@ async function init(options = {}) {
|
|
|
1022
1022
|
if (selectedServices.length > 0) {
|
|
1023
1023
|
const mcpBackupPath = backupMcpConfig();
|
|
1024
1024
|
if (mcpBackupPath) {
|
|
1025
|
-
console.log(
|
|
1025
|
+
console.log(a.gray(`\u2714 ${i18n.t("mcp:mcpBackupSuccess")}: ${mcpBackupPath}`));
|
|
1026
1026
|
}
|
|
1027
1027
|
const newServers = {};
|
|
1028
1028
|
for (const serviceId of selectedServices) {
|
|
@@ -1043,7 +1043,7 @@ async function init(options = {}) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
if (service.requiresApiKey) {
|
|
1045
1045
|
if (options.skipPrompt) {
|
|
1046
|
-
console.log(
|
|
1046
|
+
console.log(a.yellow(`${i18n.t("common:skip")}: ${service.name} (requires API key)`));
|
|
1047
1047
|
continue;
|
|
1048
1048
|
} else {
|
|
1049
1049
|
const response = await inquirer.prompt({
|
|
@@ -1053,7 +1053,7 @@ async function init(options = {}) {
|
|
|
1053
1053
|
validate: (value) => !!value || i18n.t("api:keyRequired")
|
|
1054
1054
|
});
|
|
1055
1055
|
if (!response.apiKey) {
|
|
1056
|
-
console.log(
|
|
1056
|
+
console.log(a.yellow(`${i18n.t("common:skip")}: ${service.name}`));
|
|
1057
1057
|
continue;
|
|
1058
1058
|
}
|
|
1059
1059
|
config = buildMcpServerConfig(service.config, response.apiKey, service.apiKeyPlaceholder, service.apiKeyEnvVar);
|
|
@@ -1067,7 +1067,7 @@ async function init(options = {}) {
|
|
|
1067
1067
|
try {
|
|
1068
1068
|
writeMcpConfig(mergedConfig);
|
|
1069
1069
|
syncMcpPermissions();
|
|
1070
|
-
console.log(
|
|
1070
|
+
console.log(a.green(`\u2714 ${i18n.t("mcp:mcpConfigSuccess")}`));
|
|
1071
1071
|
const { checkMcpPerformance, formatPerformanceWarning } = await import('./mcp-performance.mjs').then(function (n) { return n.e; });
|
|
1072
1072
|
const serviceCount = Object.keys(newServers).length;
|
|
1073
1073
|
const perfWarning = checkMcpPerformance(serviceCount);
|
|
@@ -1096,10 +1096,10 @@ async function init(options = {}) {
|
|
|
1096
1096
|
if (shouldInstallCometix) {
|
|
1097
1097
|
await installCometixLine();
|
|
1098
1098
|
} else {
|
|
1099
|
-
console.log(
|
|
1099
|
+
console.log(a.yellow(i18n.t("cometix:cometixSkipped")));
|
|
1100
1100
|
}
|
|
1101
1101
|
} else {
|
|
1102
|
-
console.log(
|
|
1102
|
+
console.log(a.green(`\u2714 ${i18n.t("cometix:cometixAlreadyInstalled")}`));
|
|
1103
1103
|
}
|
|
1104
1104
|
if (!options.skipPrompt || options.installSuperpowers) {
|
|
1105
1105
|
await handleSuperpowersInstallation(options);
|
|
@@ -1108,10 +1108,10 @@ async function init(options = {}) {
|
|
|
1108
1108
|
const { injectSmartGuide } = await import('./smart-guide.mjs');
|
|
1109
1109
|
const smartGuideSuccess = await injectSmartGuide(configLang);
|
|
1110
1110
|
if (smartGuideSuccess) {
|
|
1111
|
-
console.log(
|
|
1111
|
+
console.log(a.green(`\u2714 ${i18n.t("smartGuide:enabled")}`));
|
|
1112
1112
|
}
|
|
1113
1113
|
} catch {
|
|
1114
|
-
console.log(
|
|
1114
|
+
console.log(a.gray(`\u2139 ${i18n.t("smartGuide:skipped")}`));
|
|
1115
1115
|
}
|
|
1116
1116
|
if (!options.skipPrompt && !options.skipBanner) tracker.nextStep("Finalizing setup");
|
|
1117
1117
|
updateZcfConfig({
|
|
@@ -1132,38 +1132,38 @@ async function init(options = {}) {
|
|
|
1132
1132
|
if (confirmImport) {
|
|
1133
1133
|
try {
|
|
1134
1134
|
await importRecommendedEnv();
|
|
1135
|
-
console.log(
|
|
1135
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:envImportSuccess")}`));
|
|
1136
1136
|
} catch (error) {
|
|
1137
|
-
console.error(
|
|
1137
|
+
console.error(a.yellow(`\u26A0 ${i18n.t("configuration:envImportFailed")}: ${error}`));
|
|
1138
1138
|
}
|
|
1139
1139
|
try {
|
|
1140
1140
|
await importRecommendedPermissions();
|
|
1141
|
-
console.log(
|
|
1141
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:permissionsImportSuccess") || "\u6743\u9650\u914D\u7F6E\u5DF2\u5BFC\u5165"}`));
|
|
1142
1142
|
} catch (error) {
|
|
1143
|
-
console.error(
|
|
1143
|
+
console.error(a.yellow(`\u26A0 ${i18n.t("configuration:permissionsImportFailed")}: ${error}`));
|
|
1144
1144
|
}
|
|
1145
1145
|
console.log();
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
1148
|
if (!options.skipPrompt && !options.skipBanner) tracker.complete();
|
|
1149
1149
|
console.log("");
|
|
1150
|
-
console.log(
|
|
1151
|
-
console.log(
|
|
1152
|
-
console.log(
|
|
1153
|
-
console.log(`${
|
|
1154
|
-
console.log(
|
|
1155
|
-
console.log(`${
|
|
1156
|
-
console.log(
|
|
1157
|
-
console.log(
|
|
1158
|
-
console.log(
|
|
1159
|
-
console.log(`${
|
|
1160
|
-
console.log(
|
|
1161
|
-
console.log(
|
|
1162
|
-
console.log(`${
|
|
1163
|
-
console.log(
|
|
1164
|
-
console.log(
|
|
1165
|
-
console.log(`${
|
|
1166
|
-
console.log(
|
|
1150
|
+
console.log(a.bold.green("\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\u2557"));
|
|
1151
|
+
console.log(a.bold.green("\u2551") + a.bold.white(padToDisplayWidth(` ${i18n.t("configuration:setupCompleteTitle")}`, 62)) + a.bold.green("\u2551"));
|
|
1152
|
+
console.log(a.bold.green("\u2560\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\u2563"));
|
|
1153
|
+
console.log(`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`);
|
|
1154
|
+
console.log(a.bold.green("\u2551") + a.green(padToDisplayWidth(` ${i18n.t("configuration:nextSteps")}`, 62)) + a.bold.green("\u2551"));
|
|
1155
|
+
console.log(`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`);
|
|
1156
|
+
console.log(a.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep1")}`, 62) + a.bold.green("\u2551"));
|
|
1157
|
+
console.log(a.bold.green("\u2551") + a.dim(padToDisplayWidth(` ${i18n.t("configuration:guidanceStep1Detail")}`, 62)) + a.bold.green("\u2551"));
|
|
1158
|
+
console.log(a.bold.green("\u2551") + a.dim(padToDisplayWidth(` ${i18n.t("configuration:guidanceStep1Detail2")}`, 62)) + a.bold.green("\u2551"));
|
|
1159
|
+
console.log(`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`);
|
|
1160
|
+
console.log(a.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep2")}`, 62) + a.bold.green("\u2551"));
|
|
1161
|
+
console.log(a.bold.green("\u2551") + a.green(padToDisplayWidth(` ${i18n.t("configuration:guidanceStep2Example")}`, 62)) + a.bold.green("\u2551"));
|
|
1162
|
+
console.log(`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`);
|
|
1163
|
+
console.log(a.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep3")} `, 44) + a.yellow(padToDisplayWidth(i18n.t("configuration:guidanceStep3Command"), 18)) + a.bold.green("\u2551"));
|
|
1164
|
+
console.log(a.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep4")} `, 44) + a.yellow(padToDisplayWidth(i18n.t("configuration:guidanceStep4Command"), 18)) + a.bold.green("\u2551"));
|
|
1165
|
+
console.log(`${a.bold.green("\u2551")} ${a.bold.green("\u2551")}`);
|
|
1166
|
+
console.log(a.bold.green("\u255A\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\u255D"));
|
|
1167
1167
|
console.log("");
|
|
1168
1168
|
} catch (error) {
|
|
1169
1169
|
if (!handleExitPromptError(error)) {
|
|
@@ -1173,7 +1173,7 @@ async function init(options = {}) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
async function handleMultiConfigurations(options, codeToolType) {
|
|
1176
|
-
const { ensureI18nInitialized } = await import('./
|
|
1176
|
+
const { ensureI18nInitialized } = await import('./index5.mjs');
|
|
1177
1177
|
ensureI18nInitialized();
|
|
1178
1178
|
try {
|
|
1179
1179
|
let configs = [];
|
|
@@ -1199,7 +1199,7 @@ async function handleMultiConfigurations(options, codeToolType) {
|
|
|
1199
1199
|
} else if (codeToolType === "codex") {
|
|
1200
1200
|
await handleCodexConfigs(configs);
|
|
1201
1201
|
}
|
|
1202
|
-
console.log(
|
|
1202
|
+
console.log(a.green(`\u2714 ${i18n.t("multi-config:configsAddedSuccessfully")}`));
|
|
1203
1203
|
} catch (error) {
|
|
1204
1204
|
displayError(error, "Multi-config setup");
|
|
1205
1205
|
throw error;
|
|
@@ -1257,11 +1257,11 @@ async function handleClaudeCodeConfigs(configs) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
const storedProfile = result.addedProfile || ClaudeCodeConfigManager.getProfileByName(config.name) || profile;
|
|
1259
1259
|
addedProfiles.push(storedProfile);
|
|
1260
|
-
console.log(
|
|
1260
|
+
console.log(a.green(`\u2714 ${i18n.t("multi-config:profileAdded", { name: config.name })}`));
|
|
1261
1261
|
}
|
|
1262
1262
|
if (addedProfiles.length > 0) {
|
|
1263
1263
|
const summary = addedProfiles.map((profile) => `${profile.name} [${profile.authType}]`).join(", ");
|
|
1264
|
-
console.log(
|
|
1264
|
+
console.log(a.gray(` \u2022 ${ClaudeCodeConfigManager.CONFIG_FILE}: ${summary}`));
|
|
1265
1265
|
}
|
|
1266
1266
|
const defaultConfig = configs.find((c) => c.default);
|
|
1267
1267
|
if (defaultConfig) {
|
|
@@ -1269,7 +1269,7 @@ async function handleClaudeCodeConfigs(configs) {
|
|
|
1269
1269
|
if (profile && profile.id) {
|
|
1270
1270
|
await ClaudeCodeConfigManager.switchProfile(profile.id);
|
|
1271
1271
|
await ClaudeCodeConfigManager.applyProfileSettings(profile);
|
|
1272
|
-
console.log(
|
|
1272
|
+
console.log(a.green(`\u2714 ${i18n.t("multi-config:defaultProfileSet", { name: defaultConfig.name })}`));
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
1275
|
await ClaudeCodeConfigManager.syncCcrProfile();
|
|
@@ -1285,9 +1285,9 @@ async function handleCodexConfigs(configs) {
|
|
|
1285
1285
|
throw new Error(i18n.t("multi-config:providerAddFailed", { name: config.name, error: result.error }));
|
|
1286
1286
|
}
|
|
1287
1287
|
addedProviderIds.push(provider.id);
|
|
1288
|
-
console.log(
|
|
1288
|
+
console.log(a.green(`\u2714 ${i18n.t("multi-config:providerAdded", { name: config.name })}`));
|
|
1289
1289
|
} catch (error) {
|
|
1290
|
-
console.error(
|
|
1290
|
+
console.error(a.red(i18n.t("multi-config:providerAddFailed", {
|
|
1291
1291
|
name: config.name,
|
|
1292
1292
|
error: error instanceof Error ? error.message : String(error)
|
|
1293
1293
|
})));
|
|
@@ -1301,9 +1301,9 @@ async function handleCodexConfigs(configs) {
|
|
|
1301
1301
|
const providerId = displayName.toLowerCase().replace(/[^a-z0-9]/g, "-");
|
|
1302
1302
|
if (addedProviderIds.includes(providerId)) {
|
|
1303
1303
|
await switchCodexProvider(providerId);
|
|
1304
|
-
console.log(
|
|
1304
|
+
console.log(a.green(`\u2714 ${i18n.t("multi-config:defaultProviderSet", { name: displayName })}`));
|
|
1305
1305
|
} else {
|
|
1306
|
-
console.log(
|
|
1306
|
+
console.log(a.red(i18n.t("multi-config:providerAddFailed", { name: displayName, error: "provider not added" })));
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
@@ -1318,12 +1318,12 @@ async function saveSingleConfigToToml(apiConfig, provider, options) {
|
|
|
1318
1318
|
await ClaudeCodeConfigManager.switchProfile(savedProfile.id);
|
|
1319
1319
|
await ClaudeCodeConfigManager.applyProfileSettings(savedProfile);
|
|
1320
1320
|
}
|
|
1321
|
-
console.log(
|
|
1321
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:singleConfigSaved", { name: profile.name })}`));
|
|
1322
1322
|
} else {
|
|
1323
|
-
console.warn(
|
|
1323
|
+
console.warn(a.yellow(`${i18n.t("configuration:singleConfigSaveFailed")}: ${result.error}`));
|
|
1324
1324
|
}
|
|
1325
1325
|
} catch (error) {
|
|
1326
|
-
console.warn(
|
|
1326
|
+
console.warn(a.yellow(`${i18n.t("configuration:singleConfigSaveFailed")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
1327
1327
|
}
|
|
1328
1328
|
}
|
|
1329
1329
|
async function buildClaudeCodeProfile(params) {
|
|
@@ -1410,41 +1410,41 @@ async function convertToCodexProvider(config) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
async function smartInit(options = {}) {
|
|
1412
1412
|
try {
|
|
1413
|
-
console.log(
|
|
1414
|
-
console.log(
|
|
1415
|
-
const { analyzeProject } = await import('./
|
|
1413
|
+
console.log(a.bold.green("\n\u{1F9E0} Smart Initialization Mode\n"));
|
|
1414
|
+
console.log(a.gray("Analyzing your project to generate optimal configuration...\n"));
|
|
1415
|
+
const { analyzeProject } = await import('./index14.mjs');
|
|
1416
1416
|
const analysis = await analyzeProject();
|
|
1417
|
-
console.log(
|
|
1418
|
-
console.log(
|
|
1419
|
-
console.log(
|
|
1420
|
-
console.log(
|
|
1417
|
+
console.log(a.cyan("\u{1F4CA} Project Analysis:"));
|
|
1418
|
+
console.log(a.gray(` \u2022 Type: ${analysis.projectType}`));
|
|
1419
|
+
console.log(a.gray(` \u2022 Languages: ${analysis.techStack.languages.join(", ")}`));
|
|
1420
|
+
console.log(a.gray(` \u2022 Runtime: ${analysis.techStack.runtime}`));
|
|
1421
1421
|
if (analysis.frameworks.length > 0) {
|
|
1422
|
-
console.log(
|
|
1422
|
+
console.log(a.gray(` \u2022 Frameworks: ${analysis.frameworks.join(", ")}`));
|
|
1423
1423
|
}
|
|
1424
1424
|
if (analysis.buildTool) {
|
|
1425
|
-
console.log(
|
|
1425
|
+
console.log(a.gray(` \u2022 Build Tool: ${analysis.buildTool}`));
|
|
1426
1426
|
}
|
|
1427
|
-
console.log(
|
|
1428
|
-
console.log(
|
|
1429
|
-
console.log(
|
|
1427
|
+
console.log(a.gray(` \u2022 Has Tests: ${analysis.hasTests ? "Yes" : "No"}`));
|
|
1428
|
+
console.log(a.gray(` \u2022 Has Database: ${analysis.hasDatabase ? "Yes" : "No"}`));
|
|
1429
|
+
console.log(a.gray(` \u2022 Has API: ${analysis.hasApi ? "Yes" : "No"}`));
|
|
1430
1430
|
if (analysis.cicd.length > 0) {
|
|
1431
|
-
console.log(
|
|
1431
|
+
console.log(a.gray(` \u2022 CI/CD: ${analysis.cicd.join(", ")}`));
|
|
1432
1432
|
}
|
|
1433
1433
|
console.log("");
|
|
1434
|
-
const { selectTemplates } = await import('./
|
|
1434
|
+
const { selectTemplates } = await import('./index14.mjs');
|
|
1435
1435
|
const selection = await selectTemplates(analysis);
|
|
1436
|
-
console.log(
|
|
1437
|
-
console.log(
|
|
1436
|
+
console.log(a.cyan("\u{1F3AF} Template Selection:"));
|
|
1437
|
+
console.log(a.gray(` \u2022 Agents: ${selection.agents.length} selected`));
|
|
1438
1438
|
for (const agent of selection.agents) {
|
|
1439
|
-
console.log(
|
|
1439
|
+
console.log(a.gray(` - ${agent.name} (${agent.category})`));
|
|
1440
1440
|
}
|
|
1441
|
-
console.log(
|
|
1441
|
+
console.log(a.gray(` \u2022 Skills: ${selection.skills.length} selected`));
|
|
1442
1442
|
for (const skill of selection.skills) {
|
|
1443
|
-
console.log(
|
|
1443
|
+
console.log(a.gray(` - ${skill.name} (${skill.category})`));
|
|
1444
1444
|
}
|
|
1445
1445
|
console.log("");
|
|
1446
|
-
console.log(
|
|
1447
|
-
console.log(
|
|
1446
|
+
console.log(a.cyan("\u{1F4A1} Reasoning:"));
|
|
1447
|
+
console.log(a.gray(selection.reasoning.split("\n").map((line) => ` ${line}`).join("\n")));
|
|
1448
1448
|
console.log("");
|
|
1449
1449
|
if (!options.skipPrompt && !options.yes) {
|
|
1450
1450
|
const shouldContinue = await promptBoolean({
|
|
@@ -1452,38 +1452,38 @@ async function smartInit(options = {}) {
|
|
|
1452
1452
|
defaultValue: true
|
|
1453
1453
|
});
|
|
1454
1454
|
if (!shouldContinue) {
|
|
1455
|
-
console.log(
|
|
1455
|
+
console.log(a.yellow("Smart initialization cancelled."));
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
|
-
console.log(
|
|
1460
|
-
const { generateConfigs, writeConfigs } = await import('./
|
|
1459
|
+
console.log(a.gray("\n\u{1F527} Generating configurations...\n"));
|
|
1460
|
+
const { generateConfigs, writeConfigs } = await import('./index14.mjs');
|
|
1461
1461
|
const config = await generateConfigs(selection);
|
|
1462
1462
|
await writeConfigs(config);
|
|
1463
|
-
console.log(
|
|
1464
|
-
console.log(
|
|
1465
|
-
console.log(
|
|
1463
|
+
console.log(a.green("\u2714 Configurations generated successfully!"));
|
|
1464
|
+
console.log(a.gray(` \u2022 ${config.agents.length} agents installed`));
|
|
1465
|
+
console.log(a.gray(` \u2022 ${config.skills.length} skills installed`));
|
|
1466
1466
|
console.log("");
|
|
1467
|
-
console.log(
|
|
1467
|
+
console.log(a.gray("Running standard initialization...\n"));
|
|
1468
1468
|
options.smart = false;
|
|
1469
1469
|
options.skipPrompt = options.skipPrompt ?? false;
|
|
1470
1470
|
await init(options);
|
|
1471
1471
|
console.log("");
|
|
1472
|
-
console.log(
|
|
1472
|
+
console.log(a.bold.green("\u2705 Smart Initialization Complete!"));
|
|
1473
1473
|
console.log("");
|
|
1474
|
-
console.log(
|
|
1475
|
-
console.log(
|
|
1476
|
-
console.log(
|
|
1477
|
-
console.log(
|
|
1478
|
-
console.log(
|
|
1474
|
+
console.log(a.cyan("\u{1F3AF} What was configured:"));
|
|
1475
|
+
console.log(a.gray(" \u2022 Project-specific agents and skills"));
|
|
1476
|
+
console.log(a.gray(" \u2022 Claude Code base configuration"));
|
|
1477
|
+
console.log(a.gray(" \u2022 MCP services"));
|
|
1478
|
+
console.log(a.gray(" \u2022 Workflows and output styles"));
|
|
1479
1479
|
console.log("");
|
|
1480
|
-
console.log(
|
|
1481
|
-
console.log(
|
|
1482
|
-
console.log(
|
|
1483
|
-
console.log(
|
|
1480
|
+
console.log(a.cyan("\u{1F680} Next Steps:"));
|
|
1481
|
+
console.log(a.gray(" 1. Run: claude"));
|
|
1482
|
+
console.log(a.gray(" 2. Start coding with AI assistance!"));
|
|
1483
|
+
console.log(a.gray(" 3. Use generated skills with their triggers"));
|
|
1484
1484
|
console.log("");
|
|
1485
1485
|
} catch (error) {
|
|
1486
|
-
console.error(
|
|
1486
|
+
console.error(a.red("\u274C Smart initialization failed:"), error instanceof Error ? error.message : error);
|
|
1487
1487
|
throw error;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|