ccjk 2.6.2 → 3.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.mjs +1412 -0
- package/dist/chunks/api.mjs +7 -7
- package/dist/chunks/auto-updater.mjs +9 -9
- package/dist/chunks/ccr.mjs +4 -4
- package/dist/chunks/ccu.mjs +1 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +6 -6
- package/dist/chunks/codex.mjs +4 -4
- package/dist/chunks/commands2.mjs +5 -5
- package/dist/chunks/commit.mjs +2 -2
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +6 -6
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/config2.mjs +14 -14
- package/dist/chunks/doctor.mjs +3 -3
- package/dist/chunks/features.mjs +12 -12
- package/dist/chunks/help.mjs +35 -35
- package/dist/chunks/index.mjs +11 -11
- package/dist/chunks/init.mjs +21 -21
- package/dist/chunks/interview.mjs +33 -33
- package/dist/chunks/marketplace.mjs +8 -8
- package/dist/chunks/mcp.mjs +8 -8
- package/dist/chunks/menu.mjs +302 -293
- package/dist/chunks/notification.mjs +5 -5
- package/dist/chunks/onboarding.mjs +7 -7
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/permission-manager.mjs +3 -3
- package/dist/chunks/plugin.mjs +24 -24
- package/dist/chunks/prompts.mjs +3 -3
- package/dist/chunks/providers.mjs +13 -13
- package/dist/chunks/session.mjs +17 -17
- package/dist/chunks/skill.mjs +304 -0
- package/dist/chunks/skills-sync.mjs +4 -4
- package/dist/chunks/skills.mjs +2 -2
- package/dist/chunks/team.mjs +1 -1
- package/dist/chunks/uninstall.mjs +8 -8
- package/dist/chunks/update.mjs +4 -4
- package/dist/chunks/upgrade-manager.mjs +3 -3
- package/dist/chunks/version-checker.mjs +6 -6
- package/dist/chunks/workflows.mjs +2 -2
- package/dist/cli.mjs +48 -0
- package/dist/index.d.mts +157 -14
- package/dist/index.d.ts +157 -14
- package/dist/index.mjs +4 -4
- package/dist/shared/{ccjk.rLRHmcqD.mjs → ccjk.BQzWKmC3.mjs} +3 -3
- package/dist/shared/{ccjk.uVUeWAt8.mjs → ccjk.BZT_f2go.mjs} +7 -7
- package/dist/shared/{ccjk.-FoZ3zat.mjs → ccjk.BlPCiSHj.mjs} +10 -10
- package/dist/shared/ccjk.DH6cOJsf.mjs +1674 -0
- package/dist/shared/{ccjk.tB4-Y4Qb.mjs → ccjk.DrMygfCF.mjs} +1 -1
- package/dist/shared/ccjk.tJ08-yZt.mjs +179 -0
- package/package.json +1 -1
- package/dist/shared/ccjk.BhKlRJ0h.mjs +0 -114
package/dist/chunks/help.mjs
CHANGED
|
@@ -78,21 +78,21 @@ async function help(topic) {
|
|
|
78
78
|
}
|
|
79
79
|
function showHelpMenu() {
|
|
80
80
|
console.log("");
|
|
81
|
-
console.log(ansis.
|
|
81
|
+
console.log(ansis.green.bold("\u{1F4DA} CCJK \u5E2E\u52A9\u4E2D\u5FC3"));
|
|
82
82
|
console.log(ansis.gray("\u2500".repeat(50)));
|
|
83
83
|
console.log("");
|
|
84
84
|
console.log(ansis.yellow("\u5FEB\u901F\u5165\u95E8:"));
|
|
85
|
-
console.log(` ${ansis.
|
|
86
|
-
console.log(` ${ansis.
|
|
87
|
-
console.log(` ${ansis.
|
|
85
|
+
console.log(` ${ansis.green("ccjk help quick")} ${ansis.gray("- \u547D\u4EE4\u901F\u67E5\u5361\uFF08\u63A8\u8350\u65B0\u624B\uFF09")}`);
|
|
86
|
+
console.log(` ${ansis.green("ccjk help tutorial")} ${ansis.gray("- \u65B0\u624B\u5165\u95E8\u6559\u7A0B")}`);
|
|
87
|
+
console.log(` ${ansis.green("ccjk help examples")} ${ansis.gray("- \u5E38\u7528\u793A\u4F8B")}`);
|
|
88
88
|
console.log("");
|
|
89
89
|
console.log(ansis.yellow("\u4E13\u9898\u5E2E\u52A9:"));
|
|
90
|
-
console.log(` ${ansis.
|
|
91
|
-
console.log(` ${ansis.
|
|
90
|
+
console.log(` ${ansis.green("ccjk help mcp")} ${ansis.gray("- MCP \u670D\u52A1\u5668\u7BA1\u7406")}`);
|
|
91
|
+
console.log(` ${ansis.green("ccjk help faq")} ${ansis.gray("- \u5E38\u89C1\u95EE\u9898\u89E3\u7B54")}`);
|
|
92
92
|
console.log("");
|
|
93
93
|
console.log(ansis.yellow("\u547D\u4EE4\u5E2E\u52A9:"));
|
|
94
|
-
console.log(` ${ansis.
|
|
95
|
-
console.log(` ${ansis.
|
|
94
|
+
console.log(` ${ansis.green("ccjk help <command>")} ${ansis.gray("- \u67E5\u770B\u7279\u5B9A\u547D\u4EE4\u5E2E\u52A9")}`);
|
|
95
|
+
console.log(` ${ansis.green("ccjk <command> -h")} ${ansis.gray("- \u67E5\u770B\u547D\u4EE4\u9009\u9879")}`);
|
|
96
96
|
console.log("");
|
|
97
97
|
console.log(ansis.gray("\u2500".repeat(50)));
|
|
98
98
|
console.log(ansis.gray("\u{1F4A1} \u63D0\u793A: \u5728\u4EFB\u4F55\u83DC\u5355\u4E2D\u6309 ? \u6216 H \u53EF\u67E5\u770B\u4E0A\u4E0B\u6587\u5E2E\u52A9"));
|
|
@@ -100,7 +100,7 @@ function showHelpMenu() {
|
|
|
100
100
|
}
|
|
101
101
|
function showQuickReference() {
|
|
102
102
|
console.log("");
|
|
103
|
-
console.log(ansis.
|
|
103
|
+
console.log(ansis.green.bold("\u26A1 CCJK \u547D\u4EE4\u901F\u67E5\u5361"));
|
|
104
104
|
console.log(ansis.gray("\u2500".repeat(60)));
|
|
105
105
|
console.log("");
|
|
106
106
|
console.log(ansis.yellow.bold("\u{1F525} \u6700\u5E38\u7528\u547D\u4EE4:"));
|
|
@@ -124,7 +124,7 @@ function showQuickReference() {
|
|
|
124
124
|
console.log(ansis.yellow(cat.title));
|
|
125
125
|
for (const cmd of commands) {
|
|
126
126
|
const alias = cmd.alias ? ansis.gray(` (${cmd.alias})`) : "";
|
|
127
|
-
console.log(` ${ansis.
|
|
127
|
+
console.log(` ${ansis.green(cmd.name.padEnd(25))}${alias} ${ansis.gray(cmd.description)}`);
|
|
128
128
|
}
|
|
129
129
|
console.log("");
|
|
130
130
|
}
|
|
@@ -139,13 +139,13 @@ function printCommandBox(commands) {
|
|
|
139
139
|
console.log(ansis.gray(` \u250C${"\u2500".repeat(boxWidth)}\u2510`));
|
|
140
140
|
for (const { cmd, desc } of commands) {
|
|
141
141
|
const paddedCmd = cmd.padEnd(maxCmdLen);
|
|
142
|
-
console.log(ansis.gray(" \u2502 ") + ansis.
|
|
142
|
+
console.log(ansis.gray(" \u2502 ") + ansis.green.bold(paddedCmd) + ansis.gray(" \u2192 ") + desc.padEnd(boxWidth - maxCmdLen - 5) + ansis.gray(" \u2502"));
|
|
143
143
|
}
|
|
144
144
|
console.log(ansis.gray(` \u2514${"\u2500".repeat(boxWidth)}\u2518`));
|
|
145
145
|
}
|
|
146
146
|
function showMcpHelp() {
|
|
147
147
|
console.log("");
|
|
148
|
-
console.log(ansis.
|
|
148
|
+
console.log(ansis.green.bold("\u{1F50C} MCP \u670D\u52A1\u5668\u7BA1\u7406\u5E2E\u52A9"));
|
|
149
149
|
console.log(ansis.gray("\u2500".repeat(60)));
|
|
150
150
|
console.log("");
|
|
151
151
|
console.log(ansis.yellow("\u4EC0\u4E48\u662F MCP?"));
|
|
@@ -153,9 +153,9 @@ function showMcpHelp() {
|
|
|
153
153
|
console.log(ansis.gray(" \u5141\u8BB8 AI \u8BBF\u95EE\u5916\u90E8\u5DE5\u5177\u548C\u6570\u636E\u6E90\u3002"));
|
|
154
154
|
console.log("");
|
|
155
155
|
console.log(ansis.yellow("\u5E38\u7528\u547D\u4EE4:"));
|
|
156
|
-
console.log(` ${ansis.
|
|
157
|
-
console.log(` ${ansis.
|
|
158
|
-
console.log(` ${ansis.
|
|
156
|
+
console.log(` ${ansis.green("ccjk mcp doctor")} ${ansis.gray("- \u68C0\u67E5 MCP \u5065\u5EB7\u72B6\u6001")}`);
|
|
157
|
+
console.log(` ${ansis.green("ccjk mcp profile <name>")} ${ansis.gray("- \u5207\u6362 MCP \u914D\u7F6E\u9884\u8BBE")}`);
|
|
158
|
+
console.log(` ${ansis.green("ccjk mcp release")} ${ansis.gray("- \u91CA\u653E\u672A\u4F7F\u7528\u7684 MCP")}`);
|
|
159
159
|
console.log("");
|
|
160
160
|
console.log(ansis.yellow("\u53EF\u7528\u9884\u8BBE (Profile):"));
|
|
161
161
|
console.log(` ${ansis.green("minimal")} ${ansis.gray("- \u6700\u5C0F\u914D\u7F6E\uFF0C\u4EC5\u6838\u5FC3 MCP\uFF08\u63A8\u8350\u65E5\u5E38\u4F7F\u7528\uFF09")}`);
|
|
@@ -176,69 +176,69 @@ function showMcpHelp() {
|
|
|
176
176
|
}
|
|
177
177
|
function showExamples() {
|
|
178
178
|
console.log("");
|
|
179
|
-
console.log(ansis.
|
|
179
|
+
console.log(ansis.green.bold("\u{1F4DD} CCJK \u5E38\u7528\u793A\u4F8B"));
|
|
180
180
|
console.log(ansis.gray("\u2500".repeat(60)));
|
|
181
181
|
console.log("");
|
|
182
182
|
console.log(ansis.yellow("\u{1F680} \u9996\u6B21\u4F7F\u7528:"));
|
|
183
183
|
console.log(ansis.gray(" # \u4E00\u952E\u5B8C\u6210\u6240\u6709\u914D\u7F6E"));
|
|
184
|
-
console.log(` ${ansis.
|
|
184
|
+
console.log(` ${ansis.green("ccjk init")}`);
|
|
185
185
|
console.log("");
|
|
186
186
|
console.log(ansis.yellow("\u{1F527} \u65E5\u5E38\u7EF4\u62A4:"));
|
|
187
187
|
console.log(ansis.gray(" # \u68C0\u67E5\u73AF\u5883\u5065\u5EB7\u72B6\u6001"));
|
|
188
|
-
console.log(` ${ansis.
|
|
188
|
+
console.log(` ${ansis.green("ccjk doctor")}`);
|
|
189
189
|
console.log("");
|
|
190
190
|
console.log(ansis.gray(" # \u66F4\u65B0\u5230\u6700\u65B0\u914D\u7F6E"));
|
|
191
|
-
console.log(` ${ansis.
|
|
191
|
+
console.log(` ${ansis.green("ccjk update")}`);
|
|
192
192
|
console.log("");
|
|
193
193
|
console.log(ansis.yellow("\u26A1 MCP \u6027\u80FD\u4F18\u5316:"));
|
|
194
194
|
console.log(ansis.gray(" # \u68C0\u67E5 MCP \u72B6\u6001"));
|
|
195
|
-
console.log(` ${ansis.
|
|
195
|
+
console.log(` ${ansis.green("ccjk mcp doctor")}`);
|
|
196
196
|
console.log("");
|
|
197
197
|
console.log(ansis.gray(" # \u5207\u6362\u5230\u6700\u5C0F\u914D\u7F6E\uFF08\u63D0\u5347\u6027\u80FD\uFF09"));
|
|
198
|
-
console.log(` ${ansis.
|
|
198
|
+
console.log(` ${ansis.green("ccjk mcp profile minimal")}`);
|
|
199
199
|
console.log("");
|
|
200
200
|
console.log(ansis.gray(" # \u91CA\u653E\u672A\u4F7F\u7528\u7684 MCP"));
|
|
201
|
-
console.log(` ${ansis.
|
|
201
|
+
console.log(` ${ansis.green("ccjk mcp release")}`);
|
|
202
202
|
console.log("");
|
|
203
203
|
console.log(ansis.yellow("\u{1F4BB} \u5F00\u53D1\u5DE5\u4F5C\u6D41:"));
|
|
204
204
|
console.log(ansis.gray(" # \u542F\u52A8\u8BBF\u8C08\u9A71\u52A8\u5F00\u53D1"));
|
|
205
|
-
console.log(` ${ansis.
|
|
205
|
+
console.log(` ${ansis.green("ccjk interview")}`);
|
|
206
206
|
console.log("");
|
|
207
207
|
console.log(ansis.gray(" # \u667A\u80FD Git \u63D0\u4EA4"));
|
|
208
|
-
console.log(` ${ansis.
|
|
208
|
+
console.log(` ${ansis.green("ccjk commit -a")}`);
|
|
209
209
|
console.log("");
|
|
210
210
|
console.log(ansis.yellow("\u{1F504} \u914D\u7F6E\u5207\u6362:"));
|
|
211
211
|
console.log(ansis.gray(" # \u5207\u6362\u5DE5\u4F5C/\u4E2A\u4EBA\u914D\u7F6E"));
|
|
212
|
-
console.log(` ${ansis.
|
|
213
|
-
console.log(` ${ansis.
|
|
212
|
+
console.log(` ${ansis.green("ccjk config-switch work")}`);
|
|
213
|
+
console.log(` ${ansis.green("ccjk config-switch personal")}`);
|
|
214
214
|
console.log("");
|
|
215
215
|
console.log(ansis.gray("\u2500".repeat(60)));
|
|
216
216
|
console.log("");
|
|
217
217
|
}
|
|
218
218
|
function showTutorial() {
|
|
219
219
|
console.log("");
|
|
220
|
-
console.log(ansis.
|
|
220
|
+
console.log(ansis.green.bold("\u{1F393} CCJK \u65B0\u624B\u5165\u95E8\u6559\u7A0B"));
|
|
221
221
|
console.log(ansis.gray("\u2500".repeat(60)));
|
|
222
222
|
console.log("");
|
|
223
223
|
console.log(ansis.yellow.bold("\u7B2C 1 \u6B65: \u521D\u59CB\u5316\u914D\u7F6E"));
|
|
224
224
|
console.log(ansis.gray(" \u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u5B8C\u6210\u4E00\u952E\u914D\u7F6E:"));
|
|
225
|
-
console.log(` ${ansis.
|
|
225
|
+
console.log(` ${ansis.green.bold("ccjk init")}`);
|
|
226
226
|
console.log(ansis.gray(" \u8FD9\u5C06\u81EA\u52A8\u914D\u7F6E API\u3001\u5DE5\u4F5C\u6D41\u548C MCP \u670D\u52A1\u3002"));
|
|
227
227
|
console.log("");
|
|
228
228
|
console.log(ansis.yellow.bold("\u7B2C 2 \u6B65: \u9A8C\u8BC1\u5B89\u88C5"));
|
|
229
229
|
console.log(ansis.gray(" \u8FD0\u884C\u5065\u5EB7\u68C0\u67E5\u786E\u4FDD\u4E00\u5207\u6B63\u5E38:"));
|
|
230
|
-
console.log(` ${ansis.
|
|
230
|
+
console.log(` ${ansis.green.bold("ccjk doctor")}`);
|
|
231
231
|
console.log(ansis.gray(" \u5982\u679C\u6709\u95EE\u9898\uFF0C\u6309\u7167\u63D0\u793A\u4FEE\u590D\u3002"));
|
|
232
232
|
console.log("");
|
|
233
233
|
console.log(ansis.yellow.bold("\u7B2C 3 \u6B65: \u4F18\u5316\u6027\u80FD\uFF08\u63A8\u8350\uFF09"));
|
|
234
234
|
console.log(ansis.gray(" \u68C0\u67E5\u5E76\u4F18\u5316 MCP \u914D\u7F6E:"));
|
|
235
|
-
console.log(` ${ansis.
|
|
235
|
+
console.log(` ${ansis.green.bold("ccjk mcp doctor")}`);
|
|
236
236
|
console.log(ansis.gray(" \u5982\u679C MCP \u8FC7\u591A\uFF0C\u5207\u6362\u5230\u6700\u5C0F\u914D\u7F6E:"));
|
|
237
|
-
console.log(` ${ansis.
|
|
237
|
+
console.log(` ${ansis.green.bold("ccjk mcp profile minimal")}`);
|
|
238
238
|
console.log("");
|
|
239
239
|
console.log(ansis.yellow.bold("\u7B2C 4 \u6B65: \u5F00\u59CB\u4F7F\u7528"));
|
|
240
240
|
console.log(ansis.gray(" \u6253\u5F00\u4EA4\u4E92\u5F0F\u83DC\u5355\u63A2\u7D22\u66F4\u591A\u529F\u80FD:"));
|
|
241
|
-
console.log(` ${ansis.
|
|
241
|
+
console.log(` ${ansis.green.bold("ccjk")}`);
|
|
242
242
|
console.log("");
|
|
243
243
|
console.log(ansis.green.bold("\u2705 \u606D\u559C\uFF01\u4F60\u5DF2\u7ECF\u5B8C\u6210\u4E86\u57FA\u672C\u8BBE\u7F6E\u3002"));
|
|
244
244
|
console.log("");
|
|
@@ -251,7 +251,7 @@ function showTutorial() {
|
|
|
251
251
|
}
|
|
252
252
|
function showFaq() {
|
|
253
253
|
console.log("");
|
|
254
|
-
console.log(ansis.
|
|
254
|
+
console.log(ansis.green.bold("\u2753 \u5E38\u89C1\u95EE\u9898\u89E3\u7B54 (FAQ)"));
|
|
255
255
|
console.log(ansis.gray("\u2500".repeat(60)));
|
|
256
256
|
console.log("");
|
|
257
257
|
const faqs = [
|
|
@@ -313,7 +313,7 @@ function showFaq() {
|
|
|
313
313
|
}
|
|
314
314
|
function showCommandHelp(command) {
|
|
315
315
|
console.log("");
|
|
316
|
-
console.log(ansis.
|
|
316
|
+
console.log(ansis.green.bold(`\u{1F4D6} \u547D\u4EE4\u5E2E\u52A9: ${command.name}`));
|
|
317
317
|
console.log(ansis.gray("\u2500".repeat(50)));
|
|
318
318
|
console.log("");
|
|
319
319
|
console.log(ansis.yellow("\u63CF\u8FF0:"));
|
|
@@ -327,7 +327,7 @@ function showCommandHelp(command) {
|
|
|
327
327
|
if (command.examples && command.examples.length > 0) {
|
|
328
328
|
console.log(ansis.yellow("\u793A\u4F8B:"));
|
|
329
329
|
for (const example of command.examples) {
|
|
330
|
-
console.log(` ${ansis.
|
|
330
|
+
console.log(` ${ansis.green(example)}`);
|
|
331
331
|
}
|
|
332
332
|
console.log("");
|
|
333
333
|
}
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './init.mjs';
|
|
2
2
|
import { CCJK_PLUGINS_DIR, CCJK_GROUPS_DIR, AIDER_DIR, AIDER_CONFIG_FILE, AIDER_ENV_FILE, CODEX_AUTH_FILE, CODEX_DIR, CODEX_CONFIG_FILE, CODEX_AGENTS_FILE, CODEX_PROMPTS_DIR, CONTINUE_DIR, CONTINUE_CONFIG_FILE, CURSOR_CONFIG_FILE, CLINE_CONFIG_FILE, CLAUDE_DIR, CURSOR_DIR, CLINE_DIR, CODE_TOOL_TYPES, CODE_TOOL_INFO } from './constants.mjs';
|
|
3
|
-
import { S as STATUS, r as renderProgressBar, s as sectionDivider,
|
|
3
|
+
import { S as STATUS, r as renderProgressBar, s as sectionDivider, t as theme } from '../shared/ccjk.tJ08-yZt.mjs';
|
|
4
4
|
import './config.mjs';
|
|
5
5
|
import { detectAllConfigs } from './config-consolidator.mjs';
|
|
6
6
|
import '../shared/ccjk.Dut3wyoP.mjs';
|
|
@@ -14,7 +14,7 @@ import { getCurrentTemplateId } from './permission-manager.mjs';
|
|
|
14
14
|
import { checkClaudeCodeVersion, checkCcjkVersion } from './upgrade-manager.mjs';
|
|
15
15
|
import './onboarding.mjs';
|
|
16
16
|
import './platform.mjs';
|
|
17
|
-
import '../shared/ccjk
|
|
17
|
+
import '../shared/ccjk.BlPCiSHj.mjs';
|
|
18
18
|
import { existsSync, mkdirSync, readFileSync, readdirSync } from 'node:fs';
|
|
19
19
|
import { join } from 'pathe';
|
|
20
20
|
import { i18n, ensureI18nInitialized } from './index2.mjs';
|
|
@@ -1245,7 +1245,7 @@ async function configureIncrementalManagement() {
|
|
|
1245
1245
|
console.log(ansis.yellow(i18n.t("codex:noExistingProviders")));
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
|
-
console.log(ansis.
|
|
1248
|
+
console.log(ansis.green(i18n.t("codex:incrementalManagementTitle")));
|
|
1249
1249
|
console.log(ansis.gray(i18n.t("codex:currentProviderCount", { count: managementMode.providerCount })));
|
|
1250
1250
|
if (managementMode.currentProvider) {
|
|
1251
1251
|
console.log(ansis.gray(i18n.t("codex:currentDefaultProvider", { provider: managementMode.currentProvider })));
|
|
@@ -1504,7 +1504,7 @@ async function handleCopyProvider(providers) {
|
|
|
1504
1504
|
console.log(ansis.red(i18n.t("codex:providerNotFound")));
|
|
1505
1505
|
return;
|
|
1506
1506
|
}
|
|
1507
|
-
console.log(ansis.
|
|
1507
|
+
console.log(ansis.green(`
|
|
1508
1508
|
${i18n.t("codex:copyingProvider", { name: provider.name })}`));
|
|
1509
1509
|
const existingAuth = readJsonConfig(CODEX_AUTH_FILE, { defaultValue: {} }) || {};
|
|
1510
1510
|
const existingApiKey = existingAuth[provider.tempEnvKey] || "";
|
|
@@ -1630,7 +1630,7 @@ async function handleDeleteProvider(providers) {
|
|
|
1630
1630
|
if (result.success) {
|
|
1631
1631
|
console.log(ansis.green(i18n.t("codex:providersDeleted", { count: selectedProviderIds.length })));
|
|
1632
1632
|
if (result.newDefaultProvider) {
|
|
1633
|
-
console.log(ansis.
|
|
1633
|
+
console.log(ansis.green(i18n.t("codex:newDefaultProvider", { provider: result.newDefaultProvider })));
|
|
1634
1634
|
}
|
|
1635
1635
|
if (result.backupPath) {
|
|
1636
1636
|
console.log(ansis.gray(i18n.t("common:backupCreated", { path: result.backupPath })));
|
|
@@ -2713,7 +2713,7 @@ async function runHealthCheck() {
|
|
|
2713
2713
|
};
|
|
2714
2714
|
}
|
|
2715
2715
|
function displayHealthReport(report) {
|
|
2716
|
-
console.log(ansis.
|
|
2716
|
+
console.log(ansis.green("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 CCJK Environment Health \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
2717
2717
|
for (const check of report.checks) {
|
|
2718
2718
|
switch (check.status) {
|
|
2719
2719
|
case "pass":
|
|
@@ -2731,7 +2731,7 @@ function displayHealthReport(report) {
|
|
|
2731
2731
|
}
|
|
2732
2732
|
}
|
|
2733
2733
|
console.log("");
|
|
2734
|
-
console.log(`Score: ${ansis.
|
|
2734
|
+
console.log(`Score: ${ansis.green(report.score.toString())}/100`);
|
|
2735
2735
|
console.log(renderProgressBar(report.score, 40));
|
|
2736
2736
|
if (report.recommendations.length > 0) {
|
|
2737
2737
|
console.log(ansis.yellow("\nRecommendations:"));
|
|
@@ -2745,7 +2745,7 @@ async function runDoctor(fix = false) {
|
|
|
2745
2745
|
const report = await runHealthCheck();
|
|
2746
2746
|
displayHealthReport(report);
|
|
2747
2747
|
if (fix && report.recommendations.length > 0) {
|
|
2748
|
-
console.log(ansis.
|
|
2748
|
+
console.log(ansis.green("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Attempting Fixes \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
2749
2749
|
for (const check of report.checks) {
|
|
2750
2750
|
if (check.fixable && check.fixCommand && (check.status === "fail" || check.status === "warn")) {
|
|
2751
2751
|
const spinner = ora(`Fixing ${check.name}...`).start();
|
|
@@ -2822,7 +2822,7 @@ class MenuBuilder {
|
|
|
2822
2822
|
lines.push(ansis.white.bold(` ${icon}${section.title}`));
|
|
2823
2823
|
}
|
|
2824
2824
|
for (const item of visibleItems) {
|
|
2825
|
-
const keyPart = item.disabled ? ansis.gray(`[${item.key}]`) : item.highlight ? ansis.yellow.bold(`[${item.key}]`) : ansis.
|
|
2825
|
+
const keyPart = item.disabled ? ansis.gray(`[${item.key}]`) : item.highlight ? ansis.yellow.bold(`[${item.key}]`) : ansis.green.bold(`[${item.key}]`);
|
|
2826
2826
|
const iconPart = item.icon ? `${item.icon} ` : "";
|
|
2827
2827
|
const labelPart = item.disabled ? ansis.gray(item.label) : item.highlight ? ansis.yellow(item.label) : ansis.white(item.label);
|
|
2828
2828
|
const descPart = item.description ? ansis.gray(` - ${item.description}`) : "";
|
|
@@ -2840,7 +2840,7 @@ class MenuBuilder {
|
|
|
2840
2840
|
if (systemItems.length > 0) {
|
|
2841
2841
|
lines.push(` ${systemItems.join(" ")}`);
|
|
2842
2842
|
}
|
|
2843
|
-
lines.push(ansis.
|
|
2843
|
+
lines.push(ansis.green("\u2550".repeat(50)));
|
|
2844
2844
|
return lines.join("\n");
|
|
2845
2845
|
}
|
|
2846
2846
|
/**
|
|
@@ -2873,7 +2873,7 @@ class MenuBuilder {
|
|
|
2873
2873
|
{
|
|
2874
2874
|
type: "input",
|
|
2875
2875
|
name: "choice",
|
|
2876
|
-
message:
|
|
2876
|
+
message: theme.primary("Select option:"),
|
|
2877
2877
|
validate: (value) => {
|
|
2878
2878
|
if (validKeys.has(value)) {
|
|
2879
2879
|
return true;
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { z as runCodexFullInit, N as selectMcpServices, O as getMcpServices, M a
|
|
|
8
8
|
import { WORKFLOW_CONFIG_BASE } from './workflows2.mjs';
|
|
9
9
|
import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
|
|
10
10
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
11
|
-
import {
|
|
11
|
+
import { i as displayBannerWithInfo, e as padToDisplayWidth } from '../shared/ccjk.tJ08-yZt.mjs';
|
|
12
12
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
13
13
|
import { exec } from 'node:child_process';
|
|
14
14
|
import { homedir } from 'node:os';
|
|
@@ -22,8 +22,8 @@ import { updateCcr, updateClaudeCode } from './auto-updater.mjs';
|
|
|
22
22
|
import { wrapCommandWithSudo, isWindows, findCommandPath, getPlatform, getHomebrewCommandPaths, isTermux, getTermuxPrefix, isWSL, getWSLInfo, commandExists, getRecommendedInstallMethods } from './platform.mjs';
|
|
23
23
|
import { r as resolveCodeType } from '../shared/ccjk.CUdzQluX.mjs';
|
|
24
24
|
import { exists } from './fs-operations.mjs';
|
|
25
|
-
import { m as modifyApiConfigPartially, c as configureApiCompletely, s as selectAndInstallWorkflows, a as configureOutputStyle, f as formatApiKeyDisplay } from '../shared/ccjk.
|
|
26
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
25
|
+
import { m as modifyApiConfigPartially, c as configureApiCompletely, s as selectAndInstallWorkflows, a as configureOutputStyle, f as formatApiKeyDisplay } from '../shared/ccjk.BQzWKmC3.mjs';
|
|
26
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DrMygfCF.mjs';
|
|
27
27
|
import ora from 'ora';
|
|
28
28
|
import { exec as exec$1 } from 'tinyexec';
|
|
29
29
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
@@ -196,7 +196,7 @@ async function backupCcrConfig() {
|
|
|
196
196
|
const timestamp = `${dayjs().format("YYYY-MM-DDTHH-mm-ss-SSS")}Z`;
|
|
197
197
|
const backupFileName = `config.json.${timestamp}.bak`;
|
|
198
198
|
const backupPath = join(CCR_BACKUP_DIR, backupFileName);
|
|
199
|
-
console.log(ansis.
|
|
199
|
+
console.log(ansis.green(`${i18n.t("ccr:backupCcrConfig")}`));
|
|
200
200
|
copyFileSync(CCR_CONFIG_FILE, backupPath);
|
|
201
201
|
console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrBackupSuccess").replace("{path}", backupPath)}`));
|
|
202
202
|
return backupPath;
|
|
@@ -236,7 +236,7 @@ async function configureCcrProxy(ccrConfig) {
|
|
|
236
236
|
}
|
|
237
237
|
async function selectCcrPreset() {
|
|
238
238
|
ensureI18nInitialized();
|
|
239
|
-
console.log(ansis.
|
|
239
|
+
console.log(ansis.green(`${i18n.t("ccr:fetchingPresets")}`));
|
|
240
240
|
const presets = await fetchProviderPresets();
|
|
241
241
|
if (!presets || presets.length === 0) {
|
|
242
242
|
console.log(ansis.yellow(`${i18n.t("ccr:noPresetsAvailable")}`));
|
|
@@ -344,10 +344,10 @@ async function configureCcrWithPreset(preset) {
|
|
|
344
344
|
async function restartAndCheckCcrStatus() {
|
|
345
345
|
ensureI18nInitialized();
|
|
346
346
|
try {
|
|
347
|
-
console.log(ansis.
|
|
347
|
+
console.log(ansis.green(`${i18n.t("ccr:restartingCcr")}`));
|
|
348
348
|
await execAsync$3("ccr restart");
|
|
349
349
|
console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrRestartSuccess")}`));
|
|
350
|
-
console.log(ansis.
|
|
350
|
+
console.log(ansis.green(`${i18n.t("ccr:checkingCcrStatus")}`));
|
|
351
351
|
const { stdout } = await execAsync$3("ccr status");
|
|
352
352
|
console.log(ansis.gray(stdout));
|
|
353
353
|
} catch (error) {
|
|
@@ -361,8 +361,8 @@ async function showConfigurationTips(apiKey) {
|
|
|
361
361
|
ensureI18nInitialized();
|
|
362
362
|
console.log(ansis.bold.cyan(`
|
|
363
363
|
\u{1F4CC} ${i18n.t("ccr:configTips")}:`));
|
|
364
|
-
console.log(ansis.
|
|
365
|
-
console.log(ansis.
|
|
364
|
+
console.log(ansis.green(` \u2022 ${i18n.t("ccr:advancedConfigTip")}`));
|
|
365
|
+
console.log(ansis.green(` \u2022 ${i18n.t("ccr:manualConfigTip")}`));
|
|
366
366
|
console.log(ansis.bold.yellow(` \u2022 ${i18n.t("ccr:useClaudeCommand")}`));
|
|
367
367
|
if (apiKey) {
|
|
368
368
|
console.log(ansis.bold.green(` \u2022 ${i18n.t("ccr:ccrUiApiKey") || "CCR UI API Key"}: ${apiKey}`));
|
|
@@ -391,7 +391,7 @@ async function setupCcrConfiguration() {
|
|
|
391
391
|
try {
|
|
392
392
|
const existingConfig = readCcrConfig();
|
|
393
393
|
if (existingConfig) {
|
|
394
|
-
console.log(ansis.
|
|
394
|
+
console.log(ansis.green(`\u2139 ${i18n.t("ccr:existingCcrConfig")}`));
|
|
395
395
|
let shouldBackupAndReconfigure = false;
|
|
396
396
|
try {
|
|
397
397
|
shouldBackupAndReconfigure = await promptBoolean({
|
|
@@ -532,7 +532,7 @@ async function installCcr() {
|
|
|
532
532
|
} catch {
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
console.log(ansis.
|
|
535
|
+
console.log(ansis.green(`\u{1F4E6} ${i18n.t("ccr:installingCcr")}`));
|
|
536
536
|
try {
|
|
537
537
|
const installArgs = ["install", "-g", "@musistudio/claude-code-router", "--force"];
|
|
538
538
|
const { command, args, usedSudo } = wrapCommandWithSudo("npm", installArgs);
|
|
@@ -620,7 +620,7 @@ async function installCometixLine() {
|
|
|
620
620
|
if (isInstalled) {
|
|
621
621
|
console.log(ansis.green(`\u2714 ${i18n.t("cometix:cometixAlreadyInstalled")}`));
|
|
622
622
|
try {
|
|
623
|
-
console.log(ansis.
|
|
623
|
+
console.log(ansis.green(`${i18n.t("cometix:installingOrUpdating")}`));
|
|
624
624
|
await runInstallCommand();
|
|
625
625
|
console.log(ansis.green(`\u2714 ${i18n.t("cometix:installUpdateSuccess")}`));
|
|
626
626
|
} catch (error) {
|
|
@@ -634,12 +634,12 @@ async function installCometixLine() {
|
|
|
634
634
|
console.log(ansis.yellow(`\u26A0 ${i18n.t("cometix:statusLineConfigFailed") || "Failed to configure statusLine"}: ${error}`));
|
|
635
635
|
}
|
|
636
636
|
} else {
|
|
637
|
-
console.log(ansis.
|
|
637
|
+
console.log(ansis.green(`\u2139 ${i18n.t("cometix:statusLineAlreadyConfigured") || "Claude Code statusLine already configured"}`));
|
|
638
638
|
}
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
641
|
try {
|
|
642
|
-
console.log(ansis.
|
|
642
|
+
console.log(ansis.green(`${i18n.t("cometix:installingCometix")}`));
|
|
643
643
|
await runInstallCommand();
|
|
644
644
|
console.log(ansis.green(`\u2714 ${i18n.t("cometix:cometixInstallSuccess")}`));
|
|
645
645
|
try {
|
|
@@ -647,7 +647,7 @@ async function installCometixLine() {
|
|
|
647
647
|
console.log(ansis.green(`\u2714 ${i18n.t("cometix:statusLineConfigured") || "Claude Code statusLine configured"}`));
|
|
648
648
|
} catch (configError) {
|
|
649
649
|
console.log(ansis.yellow(`\u26A0 ${i18n.t("cometix:statusLineConfigFailed") || "Failed to configure statusLine"}: ${configError}`));
|
|
650
|
-
console.log(ansis.
|
|
650
|
+
console.log(ansis.green(`\u{1F4A1} ${i18n.t("cometix:statusLineManualConfig") || "Please manually add statusLine configuration to Claude Code settings"}`));
|
|
651
651
|
}
|
|
652
652
|
} catch (error) {
|
|
653
653
|
console.error(ansis.red(`\u2717 ${i18n.t("cometix:cometixInstallFailed")}: ${error}`));
|
|
@@ -1296,9 +1296,9 @@ function displayVerificationResult(result, codeType) {
|
|
|
1296
1296
|
console.log(ansis.yellow(`
|
|
1297
1297
|
\u26A0 ${i18n.t("installation:pathUpdateNeeded")}`));
|
|
1298
1298
|
console.log(ansis.gray(` ${i18n.t("installation:pathUpdateHint")}`));
|
|
1299
|
-
console.log(ansis.
|
|
1299
|
+
console.log(ansis.green(` export PATH="$HOME/.local/bin:$PATH"`));
|
|
1300
1300
|
console.log(ansis.gray(` ${i18n.t("installation:pathUpdatePermanent")}`));
|
|
1301
|
-
console.log(ansis.
|
|
1301
|
+
console.log(ansis.green(` echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc`));
|
|
1302
1302
|
}
|
|
1303
1303
|
} else {
|
|
1304
1304
|
console.log(ansis.yellow(`\u26A0 ${codeTypeName} ${i18n.t("installation:verificationFailed")}`));
|
|
@@ -1670,7 +1670,7 @@ async function handleSuperpowersInstallation(options) {
|
|
|
1670
1670
|
if (options.skipPrompt) {
|
|
1671
1671
|
shouldInstall = options.installSuperpowers === true;
|
|
1672
1672
|
} else {
|
|
1673
|
-
console.log(ansis.
|
|
1673
|
+
console.log(ansis.green(`
|
|
1674
1674
|
${i18n.t("superpowers:title")}`));
|
|
1675
1675
|
console.log(ansis.gray(i18n.t("superpowers:description")));
|
|
1676
1676
|
console.log(ansis.gray(i18n.t("superpowers:installPromptDescription")));
|
|
@@ -2114,7 +2114,7 @@ async function init(options = {}) {
|
|
|
2114
2114
|
}
|
|
2115
2115
|
if (shouldConfigureMcp) {
|
|
2116
2116
|
if (isWindows()) {
|
|
2117
|
-
console.log(ansis.
|
|
2117
|
+
console.log(ansis.green(`\u2139 ${i18n.t("installation:windowsDetected")}`));
|
|
2118
2118
|
}
|
|
2119
2119
|
let selectedServices;
|
|
2120
2120
|
if (options.skipPrompt) {
|
|
@@ -2232,14 +2232,14 @@ async function init(options = {}) {
|
|
|
2232
2232
|
console.log(ansis.bold.green("\u2551") + ansis.bold.white(padToDisplayWidth(` ${i18n.t("configuration:setupCompleteTitle")}`, 62)) + ansis.bold.green("\u2551"));
|
|
2233
2233
|
console.log(ansis.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"));
|
|
2234
2234
|
console.log(`${ansis.bold.green("\u2551")} ${ansis.bold.green("\u2551")}`);
|
|
2235
|
-
console.log(ansis.bold.green("\u2551") + ansis.
|
|
2235
|
+
console.log(ansis.bold.green("\u2551") + ansis.green(padToDisplayWidth(` ${i18n.t("configuration:nextSteps")}`, 62)) + ansis.bold.green("\u2551"));
|
|
2236
2236
|
console.log(`${ansis.bold.green("\u2551")} ${ansis.bold.green("\u2551")}`);
|
|
2237
2237
|
console.log(ansis.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep1")}`, 62) + ansis.bold.green("\u2551"));
|
|
2238
2238
|
console.log(ansis.bold.green("\u2551") + ansis.dim(padToDisplayWidth(` ${i18n.t("configuration:guidanceStep1Detail")}`, 62)) + ansis.bold.green("\u2551"));
|
|
2239
2239
|
console.log(ansis.bold.green("\u2551") + ansis.dim(padToDisplayWidth(` ${i18n.t("configuration:guidanceStep1Detail2")}`, 62)) + ansis.bold.green("\u2551"));
|
|
2240
2240
|
console.log(`${ansis.bold.green("\u2551")} ${ansis.bold.green("\u2551")}`);
|
|
2241
2241
|
console.log(ansis.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep2")}`, 62) + ansis.bold.green("\u2551"));
|
|
2242
|
-
console.log(ansis.bold.green("\u2551") + ansis.
|
|
2242
|
+
console.log(ansis.bold.green("\u2551") + ansis.green(padToDisplayWidth(` ${i18n.t("configuration:guidanceStep2Example")}`, 62)) + ansis.bold.green("\u2551"));
|
|
2243
2243
|
console.log(`${ansis.bold.green("\u2551")} ${ansis.bold.green("\u2551")}`);
|
|
2244
2244
|
console.log(ansis.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep3")} `, 44) + ansis.yellow(padToDisplayWidth(i18n.t("configuration:guidanceStep3Command"), 18)) + ansis.bold.green("\u2551"));
|
|
2245
2245
|
console.log(ansis.bold.green("\u2551") + padToDisplayWidth(` ${i18n.t("configuration:guidanceStep4")} `, 44) + ansis.yellow(padToDisplayWidth(i18n.t("configuration:guidanceStep4Command"), 18)) + ansis.bold.green("\u2551"));
|