zcf 3.2.3 → 3.3.0
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 +83 -14
- package/dist/chunks/api-providers.mjs +76 -0
- package/dist/chunks/claude-code-config-manager.mjs +21 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +56 -14
- package/dist/chunks/codex-config-switch.mjs +69 -10
- package/dist/chunks/codex-provider-manager.mjs +18 -8
- package/dist/chunks/codex-uninstaller.mjs +1 -1
- package/dist/chunks/commands.mjs +1 -1
- package/dist/chunks/features.mjs +637 -0
- package/dist/chunks/simple-config.mjs +172 -24
- package/dist/cli.mjs +12 -612
- package/dist/i18n/locales/en/api.json +6 -1
- package/dist/i18n/locales/en/errors.json +1 -0
- package/dist/i18n/locales/en/multi-config.json +2 -1
- package/dist/i18n/locales/zh-CN/api.json +6 -1
- package/dist/i18n/locales/zh-CN/errors.json +1 -0
- package/dist/i18n/locales/zh-CN/multi-config.json +2 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/templates/CLAUDE.md +190 -0
- package/templates/claude-code/en/output-styles/engineer-professional.md +2 -1
- package/templates/claude-code/en/output-styles/laowang-engineer.md +1 -0
- package/templates/claude-code/en/output-styles/nekomata-engineer.md +1 -0
- package/templates/claude-code/en/output-styles/ojousama-engineer.md +1 -0
- package/templates/claude-code/zh-CN/output-styles/engineer-professional.md +2 -1
- package/templates/claude-code/zh-CN/output-styles/laowang-engineer.md +1 -0
- package/templates/claude-code/zh-CN/output-styles/nekomata-engineer.md +1 -0
- package/templates/claude-code/zh-CN/output-styles/ojousama-engineer.md +1 -0
- package/templates/codex/en/system-prompt/engineer-professional.md +2 -1
- package/templates/codex/en/system-prompt/laowang-engineer.md +1 -0
- package/templates/codex/en/system-prompt/nekomata-engineer.md +1 -0
- package/templates/codex/en/system-prompt/ojousama-engineer.md +1 -0
- package/templates/codex/zh-CN/system-prompt/engineer-professional.md +2 -1
- package/templates/codex/zh-CN/system-prompt/laowang-engineer.md +1 -0
- package/templates/codex/zh-CN/system-prompt/nekomata-engineer.md +1 -0
- package/templates/codex/zh-CN/system-prompt/ojousama-engineer.md +1 -0
package/dist/cli.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import {
|
|
4
|
+
import { a5 as ensureI18nInitialized, a6 as i18n, ax as readCcrConfig, as as isCcrInstalled, at as installCcr, ay as configureCcrFeature, az as handleExitPromptError, aA as handleGeneralError, aB as COMETIX_COMMAND_NAME, aC as COMETIX_COMMANDS, aD as installCometixLine, a7 as addNumbersToChoices, aE as checkAndUpdateTools, aF as runCodexUpdate, aG as resolveCodeType$1, ad as readJsonConfig, aH as writeJsonConfig, j as ZCF_CONFIG_FILE, aI as displayBanner, an as readZcfConfig, al as updateZcfConfig, aJ as version, aK as resolveAiOutputLanguage, aL as updatePromptOnly, aM as selectAndInstallWorkflows, aN as checkClaudeCodeVersionAndPrompt, r as resolveCodeToolType$1, D as DEFAULT_CODE_TOOL_TYPE, p as isCodeToolType, aO as displayBannerWithInfo, l as CODE_TOOL_BANNERS, aP as runCodexUninstall, aQ as configureCodexMcp, aR as configureCodexApi, aS as runCodexWorkflowImportWithLanguageSelection, aT as runCodexFullInit, i as init, aU as switchCodexProvider, aV as listCodexProviders, ah as readCodexConfig, aW as switchToOfficialLogin, aX as switchToProvider, aY as readZcfConfigAsync, aZ as initI18n, a_ as selectScriptLanguage, am as changeLanguage } from './chunks/simple-config.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import inquirer from 'inquirer';
|
|
8
8
|
import { join } from 'pathe';
|
|
9
9
|
import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './chunks/commands.mjs';
|
|
10
|
+
import { changeScriptLanguageFeature, configureCodexAiMemoryFeature, configureCodexDefaultModelFeature, configureEnvPermissionFeature, configureAiMemoryFeature, configureDefaultModelFeature, configureMcpFeature, configureApiFeature } from './chunks/features.mjs';
|
|
10
11
|
import process from 'node:process';
|
|
11
12
|
import { x, exec as exec$1 } from 'tinyexec';
|
|
12
13
|
import { exec, spawn } from 'node:child_process';
|
|
@@ -147,614 +148,6 @@ ${ansis.dim("\u2500".repeat(50))}
|
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
async function handleCancellation() {
|
|
151
|
-
ensureI18nInitialized();
|
|
152
|
-
console.log(ansis.yellow(i18n.t("common:cancelled")));
|
|
153
|
-
}
|
|
154
|
-
async function handleOfficialLoginMode() {
|
|
155
|
-
ensureI18nInitialized();
|
|
156
|
-
const success = switchToOfficialLogin();
|
|
157
|
-
if (success) {
|
|
158
|
-
console.log(ansis.green(`\u2714 ${i18n.t("api:officialLoginConfigured")}`));
|
|
159
|
-
} else {
|
|
160
|
-
console.log(ansis.red(i18n.t("api:officialLoginFailed")));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
async function handleCustomApiMode() {
|
|
164
|
-
ensureI18nInitialized();
|
|
165
|
-
const zcfConfig = readZcfConfig();
|
|
166
|
-
const codeToolType = zcfConfig?.codeToolType || "claude-code";
|
|
167
|
-
if (codeToolType === "claude-code") {
|
|
168
|
-
const { configureIncrementalManagement } = await import('./chunks/claude-code-incremental-manager.mjs');
|
|
169
|
-
await configureIncrementalManagement();
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const existingConfig = getExistingApiConfig();
|
|
173
|
-
if (existingConfig) {
|
|
174
|
-
const configAction = await promptApiConfigurationAction();
|
|
175
|
-
if (configAction === "keep-existing") {
|
|
176
|
-
console.log(ansis.green(`\u2714 ${i18n.t("api:keepExistingConfig")}`));
|
|
177
|
-
return;
|
|
178
|
-
} else if (configAction === "modify-partial") {
|
|
179
|
-
await modifyApiConfigPartially(existingConfig);
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const { apiChoice } = await inquirer.prompt({
|
|
184
|
-
type: "list",
|
|
185
|
-
name: "apiChoice",
|
|
186
|
-
message: i18n.t("api:configureApi"),
|
|
187
|
-
choices: addNumbersToChoices([
|
|
188
|
-
{
|
|
189
|
-
name: `${i18n.t("api:useAuthToken")} - ${ansis.gray(i18n.t("api:authTokenDesc"))}`,
|
|
190
|
-
value: "auth_token",
|
|
191
|
-
short: i18n.t("api:useAuthToken")
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: `${i18n.t("api:useApiKey")} - ${ansis.gray(i18n.t("api:apiKeyDesc"))}`,
|
|
195
|
-
value: "api_key",
|
|
196
|
-
short: i18n.t("api:useApiKey")
|
|
197
|
-
},
|
|
198
|
-
{ name: i18n.t("api:skipApi"), value: "skip" }
|
|
199
|
-
])
|
|
200
|
-
});
|
|
201
|
-
if (!apiChoice || apiChoice === "skip") {
|
|
202
|
-
await handleCancellation();
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const { url } = await inquirer.prompt({
|
|
206
|
-
type: "input",
|
|
207
|
-
name: "url",
|
|
208
|
-
message: `${i18n.t("api:enterApiUrl")}${i18n.t("common:emptyToSkip")}`,
|
|
209
|
-
validate: (value) => {
|
|
210
|
-
if (!value) {
|
|
211
|
-
return true;
|
|
212
|
-
}
|
|
213
|
-
try {
|
|
214
|
-
void new URL(value);
|
|
215
|
-
return true;
|
|
216
|
-
} catch {
|
|
217
|
-
return i18n.t("api:invalidUrl");
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
if (url === void 0 || !url) {
|
|
222
|
-
await handleCancellation();
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
const keyMessage = apiChoice === "auth_token" ? `${i18n.t("api:enterAuthToken")}${i18n.t("common:emptyToSkip")}` : `${i18n.t("api:enterApiKey")}${i18n.t("common:emptyToSkip")}`;
|
|
226
|
-
const { key } = await inquirer.prompt({
|
|
227
|
-
type: "input",
|
|
228
|
-
name: "key",
|
|
229
|
-
message: keyMessage,
|
|
230
|
-
validate: (value) => {
|
|
231
|
-
if (!value) {
|
|
232
|
-
return true;
|
|
233
|
-
}
|
|
234
|
-
const validation = validateApiKey(value);
|
|
235
|
-
if (!validation.isValid) {
|
|
236
|
-
return validation.error || i18n.t("api:invalidKeyFormat");
|
|
237
|
-
}
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
if (key === void 0 || !key) {
|
|
242
|
-
await handleCancellation();
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
const apiConfig = { url, key, authType: apiChoice };
|
|
246
|
-
const configuredApi = configureApi(apiConfig);
|
|
247
|
-
if (configuredApi) {
|
|
248
|
-
console.log(ansis.green(`\u2714 ${i18n.t("api:apiConfigSuccess")}`));
|
|
249
|
-
console.log(ansis.gray(` URL: ${configuredApi.url}`));
|
|
250
|
-
console.log(ansis.gray(` Key: ${formatApiKeyDisplay(configuredApi.key)}`));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
async function handleCcrProxyMode() {
|
|
254
|
-
ensureI18nInitialized();
|
|
255
|
-
const ccrStatus = await isCcrInstalled();
|
|
256
|
-
if (!ccrStatus.hasCorrectPackage) {
|
|
257
|
-
await installCcr();
|
|
258
|
-
} else {
|
|
259
|
-
console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
260
|
-
}
|
|
261
|
-
const ccrConfigured = await setupCcrConfiguration();
|
|
262
|
-
if (ccrConfigured) {
|
|
263
|
-
console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
async function configureApiFeature() {
|
|
267
|
-
ensureI18nInitialized();
|
|
268
|
-
const { mode } = await inquirer.prompt({
|
|
269
|
-
type: "list",
|
|
270
|
-
name: "mode",
|
|
271
|
-
message: i18n.t("api:apiModePrompt"),
|
|
272
|
-
choices: addNumbersToChoices([
|
|
273
|
-
{ name: i18n.t("api:apiModeOfficial"), value: "official" },
|
|
274
|
-
{ name: i18n.t("api:apiModeCustom"), value: "custom" },
|
|
275
|
-
{ name: i18n.t("api:apiModeCcr"), value: "ccr" },
|
|
276
|
-
{ name: i18n.t("api:apiModeSkip"), value: "skip" }
|
|
277
|
-
])
|
|
278
|
-
});
|
|
279
|
-
if (!mode || mode === "skip") {
|
|
280
|
-
await handleCancellation();
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
switch (mode) {
|
|
284
|
-
case "official":
|
|
285
|
-
await handleOfficialLoginMode();
|
|
286
|
-
break;
|
|
287
|
-
case "custom":
|
|
288
|
-
await handleCustomApiMode();
|
|
289
|
-
break;
|
|
290
|
-
case "ccr":
|
|
291
|
-
await handleCcrProxyMode();
|
|
292
|
-
break;
|
|
293
|
-
default:
|
|
294
|
-
await handleCancellation();
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
async function configureMcpFeature() {
|
|
299
|
-
ensureI18nInitialized();
|
|
300
|
-
if (isWindows()) {
|
|
301
|
-
const { fixWindows } = await inquirer.prompt({
|
|
302
|
-
type: "confirm",
|
|
303
|
-
name: "fixWindows",
|
|
304
|
-
message: i18n.t("configuration:fixWindowsMcp") || "Fix Windows MCP configuration?",
|
|
305
|
-
default: true
|
|
306
|
-
});
|
|
307
|
-
if (fixWindows) {
|
|
308
|
-
const existingConfig = readMcpConfig() || { mcpServers: {} };
|
|
309
|
-
const fixedConfig = fixWindowsMcpConfig(existingConfig);
|
|
310
|
-
writeMcpConfig(fixedConfig);
|
|
311
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:windowsMcpConfigFixed")}`));
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
const selectedServices = await selectMcpServices();
|
|
315
|
-
if (!selectedServices) {
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
if (selectedServices.length > 0) {
|
|
319
|
-
const mcpBackupPath = backupMcpConfig();
|
|
320
|
-
if (mcpBackupPath) {
|
|
321
|
-
console.log(ansis.gray(`\u2714 ${i18n.t("mcp:mcpBackupSuccess")}: ${mcpBackupPath}`));
|
|
322
|
-
}
|
|
323
|
-
const newServers = {};
|
|
324
|
-
for (const serviceId of selectedServices) {
|
|
325
|
-
const service = (await getMcpServices()).find((s) => s.id === serviceId);
|
|
326
|
-
if (!service)
|
|
327
|
-
continue;
|
|
328
|
-
let config = service.config;
|
|
329
|
-
if (service.requiresApiKey) {
|
|
330
|
-
const { apiKey } = await inquirer.prompt({
|
|
331
|
-
type: "input",
|
|
332
|
-
name: "apiKey",
|
|
333
|
-
message: service.apiKeyPrompt,
|
|
334
|
-
validate: async (value) => !!value || i18n.t("api:keyRequired")
|
|
335
|
-
});
|
|
336
|
-
if (apiKey) {
|
|
337
|
-
config = buildMcpServerConfig(service.config, apiKey, service.apiKeyPlaceholder, service.apiKeyEnvVar);
|
|
338
|
-
} else {
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
newServers[service.id] = config;
|
|
343
|
-
}
|
|
344
|
-
const existingConfig = readMcpConfig();
|
|
345
|
-
let mergedConfig = mergeMcpServers(existingConfig, newServers);
|
|
346
|
-
mergedConfig = fixWindowsMcpConfig(mergedConfig);
|
|
347
|
-
writeMcpConfig(mergedConfig);
|
|
348
|
-
console.log(ansis.green(`\u2714 ${i18n.t("mcp:mcpConfigSuccess")}`));
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
async function configureDefaultModelFeature() {
|
|
352
|
-
ensureI18nInitialized();
|
|
353
|
-
const existingModel = getExistingModelConfig();
|
|
354
|
-
if (existingModel) {
|
|
355
|
-
console.log(`
|
|
356
|
-
${ansis.blue(`\u2139 ${i18n.t("configuration:existingModelConfig") || "Existing model configuration"}`)}`);
|
|
357
|
-
const modelDisplay = existingModel === "default" ? i18n.t("configuration:defaultModelOption") || "Default (Let Claude Code choose)" : existingModel.charAt(0).toUpperCase() + existingModel.slice(1);
|
|
358
|
-
console.log(ansis.gray(` ${i18n.t("configuration:currentModel") || "Current model"}: ${modelDisplay}
|
|
359
|
-
`));
|
|
360
|
-
const { modify } = await inquirer.prompt({
|
|
361
|
-
type: "confirm",
|
|
362
|
-
name: "modify",
|
|
363
|
-
message: i18n.t("configuration:modifyModel") || "Modify model configuration?",
|
|
364
|
-
default: false
|
|
365
|
-
});
|
|
366
|
-
if (!modify) {
|
|
367
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:keepModel") || "Keeping existing model configuration"}`));
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
const { model } = await inquirer.prompt({
|
|
372
|
-
type: "list",
|
|
373
|
-
name: "model",
|
|
374
|
-
message: i18n.t("configuration:selectDefaultModel") || "Select default model",
|
|
375
|
-
choices: addNumbersToChoices([
|
|
376
|
-
{
|
|
377
|
-
name: i18n.t("configuration:defaultModelOption") || "Default - Let Claude Code choose",
|
|
378
|
-
value: "default"
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
name: i18n.t("configuration:opusModelOption") || "Opus - Only use opus, high token consumption, use with caution",
|
|
382
|
-
value: "opus"
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
name: i18n.t("configuration:sonnet1mModelOption") || "Sonnet 1M - 1M context version",
|
|
386
|
-
value: "sonnet[1m]"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
name: i18n.t("configuration:customModelOption") || "Custom - Specify custom model names",
|
|
390
|
-
value: "custom"
|
|
391
|
-
}
|
|
392
|
-
]),
|
|
393
|
-
default: existingModel ? ["default", "opus", "sonnet[1m]", "custom"].indexOf(existingModel) : 0
|
|
394
|
-
});
|
|
395
|
-
if (!model) {
|
|
396
|
-
await handleCancellation();
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
if (model === "custom") {
|
|
400
|
-
const { primaryModel, fastModel } = await promptCustomModels();
|
|
401
|
-
if (!primaryModel.trim() && !fastModel.trim()) {
|
|
402
|
-
console.log(ansis.yellow(`\u26A0 ${i18n.t("configuration:customModelSkipped") || "Custom model configuration skipped"}`));
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
updateCustomModel(primaryModel, fastModel);
|
|
406
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:customModelConfigured") || "Custom model configuration completed"}`));
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
updateDefaultModel(model);
|
|
410
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:modelConfigured") || "Default model configured"}`));
|
|
411
|
-
}
|
|
412
|
-
async function promptCustomModels() {
|
|
413
|
-
const { primaryModel } = await inquirer.prompt({
|
|
414
|
-
type: "input",
|
|
415
|
-
name: "primaryModel",
|
|
416
|
-
message: `${i18n.t("configuration:enterPrimaryModel")}${i18n.t("common:emptyToSkip")}`,
|
|
417
|
-
default: ""
|
|
418
|
-
});
|
|
419
|
-
const { fastModel } = await inquirer.prompt({
|
|
420
|
-
type: "input",
|
|
421
|
-
name: "fastModel",
|
|
422
|
-
message: `${i18n.t("configuration:enterFastModel")}${i18n.t("common:emptyToSkip")}`,
|
|
423
|
-
default: ""
|
|
424
|
-
});
|
|
425
|
-
return { primaryModel, fastModel };
|
|
426
|
-
}
|
|
427
|
-
async function configureAiMemoryFeature() {
|
|
428
|
-
ensureI18nInitialized();
|
|
429
|
-
const { option } = await inquirer.prompt({
|
|
430
|
-
type: "list",
|
|
431
|
-
name: "option",
|
|
432
|
-
message: i18n.t("configuration:selectMemoryOption") || "Select configuration option",
|
|
433
|
-
choices: addNumbersToChoices([
|
|
434
|
-
{
|
|
435
|
-
name: i18n.t("configuration:configureAiLanguage") || "Configure AI output language",
|
|
436
|
-
value: "language"
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
name: i18n.t("configuration:configureOutputStyle") || "Configure global AI output style",
|
|
440
|
-
value: "outputStyle"
|
|
441
|
-
}
|
|
442
|
-
])
|
|
443
|
-
});
|
|
444
|
-
if (!option) {
|
|
445
|
-
return;
|
|
446
|
-
}
|
|
447
|
-
if (option === "language") {
|
|
448
|
-
const zcfConfig = readZcfConfig();
|
|
449
|
-
const existingLang = zcfConfig?.aiOutputLang;
|
|
450
|
-
if (existingLang) {
|
|
451
|
-
console.log(
|
|
452
|
-
`
|
|
453
|
-
${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existing AI output language configuration"}`)}`
|
|
454
|
-
);
|
|
455
|
-
console.log(ansis.gray(` ${i18n.t("configuration:currentLanguage") || "Current language"}: ${existingLang}
|
|
456
|
-
`));
|
|
457
|
-
const { modify } = await inquirer.prompt({
|
|
458
|
-
type: "confirm",
|
|
459
|
-
name: "modify",
|
|
460
|
-
message: i18n.t("configuration:modifyLanguage") || "Modify AI output language?",
|
|
461
|
-
default: false
|
|
462
|
-
});
|
|
463
|
-
if (!modify) {
|
|
464
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:keepLanguage") || "Keeping existing language configuration"}`));
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b4; });
|
|
469
|
-
const aiOutputLang = await selectAiOutputLanguage();
|
|
470
|
-
applyAiLanguageDirective(aiOutputLang);
|
|
471
|
-
updateZcfConfig({ aiOutputLang });
|
|
472
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:aiLanguageConfigured") || "AI output language configured"}`));
|
|
473
|
-
} else if (option === "outputStyle") {
|
|
474
|
-
await configureOutputStyle();
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
async function changeScriptLanguageFeature(currentLang) {
|
|
478
|
-
ensureI18nInitialized();
|
|
479
|
-
const { lang } = await inquirer.prompt({
|
|
480
|
-
type: "list",
|
|
481
|
-
name: "lang",
|
|
482
|
-
message: i18n.t("language:selectScriptLang"),
|
|
483
|
-
choices: addNumbersToChoices(
|
|
484
|
-
SUPPORTED_LANGS.map((l) => ({
|
|
485
|
-
name: LANG_LABELS[l],
|
|
486
|
-
value: l
|
|
487
|
-
}))
|
|
488
|
-
),
|
|
489
|
-
default: SUPPORTED_LANGS.indexOf(currentLang)
|
|
490
|
-
});
|
|
491
|
-
if (!lang) {
|
|
492
|
-
return currentLang;
|
|
493
|
-
}
|
|
494
|
-
updateZcfConfig({ preferredLang: lang });
|
|
495
|
-
await changeLanguage(lang);
|
|
496
|
-
console.log(ansis.green(`\u2714 ${i18n.t("language:languageChanged") || "Language changed"}`));
|
|
497
|
-
return lang;
|
|
498
|
-
}
|
|
499
|
-
async function configureCodexDefaultModelFeature() {
|
|
500
|
-
ensureI18nInitialized();
|
|
501
|
-
const { readCodexConfig } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
502
|
-
const existingConfig = readCodexConfig();
|
|
503
|
-
const currentModel = existingConfig?.model;
|
|
504
|
-
if (currentModel) {
|
|
505
|
-
console.log(`
|
|
506
|
-
${ansis.blue(`\u2139 ${i18n.t("configuration:existingModelConfig") || "Existing model configuration"}`)}`);
|
|
507
|
-
const modelDisplay = currentModel === "gpt-5-codex" ? "GPT-5-Codex" : currentModel === "gpt-5" ? "GPT-5" : currentModel.charAt(0).toUpperCase() + currentModel.slice(1);
|
|
508
|
-
console.log(ansis.gray(` ${i18n.t("configuration:currentModel") || "Current model"}: ${modelDisplay}
|
|
509
|
-
`));
|
|
510
|
-
const { modify } = await inquirer.prompt({
|
|
511
|
-
type: "confirm",
|
|
512
|
-
name: "modify",
|
|
513
|
-
message: i18n.t("configuration:modifyModel") || "Modify model configuration?",
|
|
514
|
-
default: false
|
|
515
|
-
});
|
|
516
|
-
if (!modify) {
|
|
517
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:keepModel") || "Keeping existing model configuration"}`));
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
const { model } = await inquirer.prompt({
|
|
522
|
-
type: "list",
|
|
523
|
-
name: "model",
|
|
524
|
-
message: i18n.t("configuration:selectDefaultModel") || "Select default model",
|
|
525
|
-
choices: addNumbersToChoices([
|
|
526
|
-
{
|
|
527
|
-
name: i18n.t("configuration:codexModelOptions.gpt5"),
|
|
528
|
-
value: "gpt-5"
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
name: i18n.t("configuration:codexModelOptions.gpt5Codex"),
|
|
532
|
-
value: "gpt-5-codex"
|
|
533
|
-
},
|
|
534
|
-
{
|
|
535
|
-
name: i18n.t("configuration:codexModelOptions.custom"),
|
|
536
|
-
value: "custom"
|
|
537
|
-
}
|
|
538
|
-
]),
|
|
539
|
-
default: currentModel ? ["gpt-5", "gpt-5-codex", "custom"].indexOf(currentModel) : 1
|
|
540
|
-
// Default to gpt-5-codex
|
|
541
|
-
});
|
|
542
|
-
if (!model) {
|
|
543
|
-
await handleCancellation();
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
if (model === "custom") {
|
|
547
|
-
const { customModel } = await inquirer.prompt({
|
|
548
|
-
type: "input",
|
|
549
|
-
name: "customModel",
|
|
550
|
-
message: `${i18n.t("configuration:enterCustomModel")}${i18n.t("common:emptyToSkip")}`,
|
|
551
|
-
default: ""
|
|
552
|
-
});
|
|
553
|
-
if (!customModel.trim()) {
|
|
554
|
-
console.log(ansis.yellow(`\u26A0 ${i18n.t("configuration:customModelSkipped") || "Custom model configuration skipped"}`));
|
|
555
|
-
return;
|
|
556
|
-
}
|
|
557
|
-
await updateCodexModelProvider(customModel.trim());
|
|
558
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:customModelConfigured") || "Custom model configuration completed"}`));
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
await updateCodexModelProvider(model);
|
|
562
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:modelConfigured") || "Default model configured"}`));
|
|
563
|
-
}
|
|
564
|
-
async function configureCodexAiMemoryFeature() {
|
|
565
|
-
ensureI18nInitialized();
|
|
566
|
-
const { option } = await inquirer.prompt({
|
|
567
|
-
type: "list",
|
|
568
|
-
name: "option",
|
|
569
|
-
message: i18n.t("configuration:selectMemoryOption") || "Select configuration option",
|
|
570
|
-
choices: addNumbersToChoices([
|
|
571
|
-
{
|
|
572
|
-
name: i18n.t("configuration:configureAiLanguage") || "Configure AI output language",
|
|
573
|
-
value: "language"
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
name: i18n.t("configuration:configureSystemPromptStyle") || "Configure global AI system prompt style",
|
|
577
|
-
value: "systemPrompt"
|
|
578
|
-
}
|
|
579
|
-
])
|
|
580
|
-
});
|
|
581
|
-
if (!option) {
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (option === "language") {
|
|
585
|
-
const zcfConfig = readZcfConfig();
|
|
586
|
-
const existingLang = zcfConfig?.aiOutputLang;
|
|
587
|
-
if (existingLang) {
|
|
588
|
-
console.log(
|
|
589
|
-
`
|
|
590
|
-
${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existing AI output language configuration"}`)}`
|
|
591
|
-
);
|
|
592
|
-
console.log(ansis.gray(` ${i18n.t("configuration:currentLanguage") || "Current language"}: ${existingLang}
|
|
593
|
-
`));
|
|
594
|
-
const { modify } = await inquirer.prompt({
|
|
595
|
-
type: "confirm",
|
|
596
|
-
name: "modify",
|
|
597
|
-
message: i18n.t("configuration:modifyLanguage") || "Modify AI output language?",
|
|
598
|
-
default: false
|
|
599
|
-
});
|
|
600
|
-
if (!modify) {
|
|
601
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:keepLanguage") || "Keeping existing language configuration"}`));
|
|
602
|
-
await ensureLanguageDirectiveInAgents(existingLang);
|
|
603
|
-
return;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b4; });
|
|
607
|
-
const aiOutputLang = await selectAiOutputLanguage();
|
|
608
|
-
await updateCodexLanguageDirective(aiOutputLang);
|
|
609
|
-
updateZcfConfig({ aiOutputLang });
|
|
610
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:aiLanguageConfigured") || "AI output language configured"}`));
|
|
611
|
-
} else if (option === "systemPrompt") {
|
|
612
|
-
const zcfConfig = readZcfConfig();
|
|
613
|
-
const currentLang = zcfConfig?.aiOutputLang || "English";
|
|
614
|
-
const { runCodexSystemPromptSelection } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
615
|
-
await runCodexSystemPromptSelection();
|
|
616
|
-
await ensureLanguageDirectiveInAgents(currentLang);
|
|
617
|
-
console.log(ansis.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
async function updateCodexModelProvider(modelProvider) {
|
|
621
|
-
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
622
|
-
const backupPath = backupCodexConfig();
|
|
623
|
-
if (backupPath) {
|
|
624
|
-
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
625
|
-
}
|
|
626
|
-
const existingConfig = readCodexConfig();
|
|
627
|
-
const updatedConfig = {
|
|
628
|
-
...existingConfig,
|
|
629
|
-
model: modelProvider,
|
|
630
|
-
// Set the model field
|
|
631
|
-
modelProvider: existingConfig?.modelProvider || null,
|
|
632
|
-
// Preserve existing API provider
|
|
633
|
-
providers: existingConfig?.providers || [],
|
|
634
|
-
mcpServices: existingConfig?.mcpServices || [],
|
|
635
|
-
managed: true,
|
|
636
|
-
otherConfig: existingConfig?.otherConfig || [],
|
|
637
|
-
modelProviderCommented: existingConfig?.modelProviderCommented
|
|
638
|
-
};
|
|
639
|
-
writeCodexConfig(updatedConfig);
|
|
640
|
-
}
|
|
641
|
-
async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
642
|
-
const { readFile, writeFile, exists } = await import('./chunks/simple-config.mjs').then(function (n) { return n.a$; });
|
|
643
|
-
const { homedir } = await import('node:os');
|
|
644
|
-
const { join } = await import('pathe');
|
|
645
|
-
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
646
|
-
if (!exists(CODEX_AGENTS_FILE)) {
|
|
647
|
-
console.log(ansis.yellow(i18n.t("codex:agentsFileNotFound")));
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
const content = readFile(CODEX_AGENTS_FILE);
|
|
651
|
-
const languageLabels = {
|
|
652
|
-
"Chinese": "Chinese-simplified",
|
|
653
|
-
"English": "English",
|
|
654
|
-
"zh-CN": "Chinese-simplified",
|
|
655
|
-
"en": "English"
|
|
656
|
-
};
|
|
657
|
-
const langLabel = languageLabels[aiOutputLang] || aiOutputLang;
|
|
658
|
-
const hasLanguageDirective = /\*\*Most Important:\s*Always respond in [^*]+\*\*/i.test(content);
|
|
659
|
-
if (!hasLanguageDirective) {
|
|
660
|
-
const { backupCodexAgents, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
661
|
-
const backupPath = backupCodexAgents();
|
|
662
|
-
if (backupPath) {
|
|
663
|
-
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
664
|
-
}
|
|
665
|
-
let updatedContent = content;
|
|
666
|
-
if (!updatedContent.endsWith("\n")) {
|
|
667
|
-
updatedContent += "\n";
|
|
668
|
-
}
|
|
669
|
-
updatedContent += `
|
|
670
|
-
**Most Important:Always respond in ${langLabel}**
|
|
671
|
-
`;
|
|
672
|
-
writeFile(CODEX_AGENTS_FILE, updatedContent);
|
|
673
|
-
console.log(ansis.gray(` ${i18n.t("configuration:addedLanguageDirective")}: ${langLabel}`));
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
async function updateCodexLanguageDirective(aiOutputLang) {
|
|
677
|
-
const { readFile, writeFile, exists } = await import('./chunks/simple-config.mjs').then(function (n) { return n.a$; });
|
|
678
|
-
const { backupCodexAgents, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
679
|
-
const { homedir } = await import('node:os');
|
|
680
|
-
const { join } = await import('pathe');
|
|
681
|
-
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
682
|
-
if (!exists(CODEX_AGENTS_FILE)) {
|
|
683
|
-
console.log(ansis.yellow(i18n.t("codex:agentsFileNotFound")));
|
|
684
|
-
return;
|
|
685
|
-
}
|
|
686
|
-
const backupPath = backupCodexAgents();
|
|
687
|
-
if (backupPath) {
|
|
688
|
-
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
689
|
-
}
|
|
690
|
-
let content = readFile(CODEX_AGENTS_FILE);
|
|
691
|
-
const languageLabels = {
|
|
692
|
-
"Chinese": "Chinese-simplified",
|
|
693
|
-
"English": "English",
|
|
694
|
-
"zh-CN": "Chinese-simplified",
|
|
695
|
-
"en": "English"
|
|
696
|
-
};
|
|
697
|
-
const langLabel = languageLabels[aiOutputLang] || aiOutputLang;
|
|
698
|
-
content = content.replace(/\*\*Most Important:\s*Always respond in [^*]+\*\*\s*/g, "");
|
|
699
|
-
if (!content.endsWith("\n")) {
|
|
700
|
-
content += "\n";
|
|
701
|
-
}
|
|
702
|
-
content += `
|
|
703
|
-
**Most Important:Always respond in ${langLabel}**
|
|
704
|
-
`;
|
|
705
|
-
writeFile(CODEX_AGENTS_FILE, content);
|
|
706
|
-
}
|
|
707
|
-
async function configureEnvPermissionFeature() {
|
|
708
|
-
ensureI18nInitialized();
|
|
709
|
-
const { choice } = await inquirer.prompt({
|
|
710
|
-
type: "list",
|
|
711
|
-
name: "choice",
|
|
712
|
-
message: i18n.t("configuration:selectEnvPermissionOption") || "Select option",
|
|
713
|
-
choices: addNumbersToChoices([
|
|
714
|
-
{
|
|
715
|
-
name: `${i18n.t("configuration:importRecommendedEnv") || "Import environment"} ${ansis.gray(
|
|
716
|
-
`- ${i18n.t("configuration:importRecommendedEnvDesc") || "Import env settings"}`
|
|
717
|
-
)}`,
|
|
718
|
-
value: "env"
|
|
719
|
-
},
|
|
720
|
-
{
|
|
721
|
-
name: `${i18n.t("configuration:importRecommendedPermissions") || "Import permissions"} ${ansis.gray(
|
|
722
|
-
`- ${i18n.t("configuration:importRecommendedPermissionsDesc") || "Import permission settings"}`
|
|
723
|
-
)}`,
|
|
724
|
-
value: "permissions"
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
name: `${i18n.t("configuration:openSettingsJson") || "Open settings"} ${ansis.gray(
|
|
728
|
-
`- ${i18n.t("configuration:openSettingsJsonDesc") || "View settings file"}`
|
|
729
|
-
)}`,
|
|
730
|
-
value: "open"
|
|
731
|
-
}
|
|
732
|
-
])
|
|
733
|
-
});
|
|
734
|
-
if (!choice) {
|
|
735
|
-
await handleCancellation();
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
try {
|
|
739
|
-
switch (choice) {
|
|
740
|
-
case "env":
|
|
741
|
-
await importRecommendedEnv();
|
|
742
|
-
console.log(ansis.green(`\u2705 ${i18n.t("configuration:envImportSuccess")}`));
|
|
743
|
-
break;
|
|
744
|
-
case "permissions":
|
|
745
|
-
await importRecommendedPermissions();
|
|
746
|
-
console.log(ansis.green(`\u2705 ${i18n.t("configuration:permissionsImportSuccess") || "Permissions imported"}`));
|
|
747
|
-
break;
|
|
748
|
-
case "open":
|
|
749
|
-
console.log(ansis.cyan(i18n.t("configuration:openingSettingsJson") || "Opening settings.json..."));
|
|
750
|
-
await openSettingsJson();
|
|
751
|
-
break;
|
|
752
|
-
}
|
|
753
|
-
} catch (error) {
|
|
754
|
-
console.error(ansis.red(`${i18n.t("common:error")}: ${error.message}`));
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
|
|
758
151
|
async function executeCcusage(args = []) {
|
|
759
152
|
try {
|
|
760
153
|
const command = "npx";
|
|
@@ -1784,7 +1177,7 @@ async function update(options = {}) {
|
|
|
1784
1177
|
}
|
|
1785
1178
|
return;
|
|
1786
1179
|
}
|
|
1787
|
-
const { resolveTemplateLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
1180
|
+
const { resolveTemplateLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
1788
1181
|
const configLang = await resolveTemplateLanguage(
|
|
1789
1182
|
options.configLang,
|
|
1790
1183
|
// Command line option
|
|
@@ -2413,7 +1806,7 @@ async function handleCodexInteractiveSwitch() {
|
|
|
2413
1806
|
}
|
|
2414
1807
|
let success = false;
|
|
2415
1808
|
if (selectedConfig === "official") {
|
|
2416
|
-
success = await switchToOfficialLogin
|
|
1809
|
+
success = await switchToOfficialLogin();
|
|
2417
1810
|
} else {
|
|
2418
1811
|
success = await switchToProvider(selectedConfig);
|
|
2419
1812
|
}
|
|
@@ -2430,6 +1823,11 @@ ${i18n.t("common:goodbye")}`));
|
|
|
2430
1823
|
}
|
|
2431
1824
|
}
|
|
2432
1825
|
|
|
1826
|
+
const configSwitch = {
|
|
1827
|
+
__proto__: null,
|
|
1828
|
+
configSwitchCommand: configSwitchCommand
|
|
1829
|
+
};
|
|
1830
|
+
|
|
2433
1831
|
async function resolveAndSwitchLanguage(lang, options, skipPrompt = false) {
|
|
2434
1832
|
const zcfConfig = await readZcfConfigAsync();
|
|
2435
1833
|
const targetLang = options?.allLang || lang || options?.lang || zcfConfig?.preferredLang || (skipPrompt ? "en" : await selectScriptLanguage());
|
|
@@ -2562,7 +1960,7 @@ async function setupCommands(cli) {
|
|
|
2562
1960
|
cli.command("", "Show interactive menu (default)").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--force, -f", "Force overwrite existing configuration").option("--code-type, -T <codeType>", "Select code tool type (claude-code, codex, cc, cx)").action(await withLanguageResolution(async (options) => {
|
|
2563
1961
|
await showMainMenu({ codeType: options.codeType });
|
|
2564
1962
|
}));
|
|
2565
|
-
cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--ai-output-lang, -a <lang>", "AI output language").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--config-action, -r <action>", `Config handling (new/backup/merge/docs-only/skip), ${i18n.t("cli:help.defaults.prefix")} backup`).option("--api-type, -t <type>", "API type (auth_token/api_key/ccr_proxy/skip)").option("--api-key, -k <key>", "API key (used for both API key and auth token types)").option("--api-url, -u <url>", "Custom API URL").option("--api-model, -M <model>", "Primary API model (e.g., claude-sonnet-4-5)").option("--api-fast-model, -F <model>", "Fast API model (e.g., claude-haiku-4-5)").option("--mcp-services, -m <services>", `Comma-separated MCP services to install (context7,mcp-deepwiki,Playwright,exa), "skip" to skip all, "all" for all non-key services, ${i18n.t("cli:help.defaults.prefix")} all`).option("--workflows, -w <workflows>", `Comma-separated workflows to install (sixStepsWorkflow,featPlanUx,gitWorkflow,bmadWorkflow), "skip" to skip all, "all" for all workflows, ${i18n.t("cli:help.defaults.prefix")} all`).option("--output-styles, -o <styles>", `Comma-separated output styles (engineer-professional,nekomata-engineer,laowang-engineer,default,explanatory,learning), "skip" to skip all, "all" for all custom styles, ${i18n.t("cli:help.defaults.prefix")} all`).option("--default-output-style, -d <style>", `Default output style, ${i18n.t("cli:help.defaults.prefix")} engineer-professional`).option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--code-type, -T <codeType>", "Select code tool type (claude-code, codex, cc, cx)").option("--install-cometix-line, -x <value>", `Install CCometixLine statusline tool (true/false), ${i18n.t("cli:help.defaults.prefix")} true`).option("--api-configs <configs>", "API configurations as JSON string for multiple profiles").option("--api-configs-file <file>", "Path to JSON file containing API configurations").action(await withLanguageResolution(async (options) => {
|
|
1963
|
+
cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--ai-output-lang, -a <lang>", "AI output language").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--config-action, -r <action>", `Config handling (new/backup/merge/docs-only/skip), ${i18n.t("cli:help.defaults.prefix")} backup`).option("--api-type, -t <type>", "API type (auth_token/api_key/ccr_proxy/skip)").option("--api-key, -k <key>", "API key (used for both API key and auth token types)").option("--api-url, -u <url>", "Custom API URL").option("--api-model, -M <model>", "Primary API model (e.g., claude-sonnet-4-5)").option("--api-fast-model, -F <model>", "Fast API model (e.g., claude-haiku-4-5)").option("--provider, -p <provider>", "API provider preset (302ai, glm, minimax, kimi, custom)").option("--mcp-services, -m <services>", `Comma-separated MCP services to install (context7,mcp-deepwiki,Playwright,exa), "skip" to skip all, "all" for all non-key services, ${i18n.t("cli:help.defaults.prefix")} all`).option("--workflows, -w <workflows>", `Comma-separated workflows to install (sixStepsWorkflow,featPlanUx,gitWorkflow,bmadWorkflow), "skip" to skip all, "all" for all workflows, ${i18n.t("cli:help.defaults.prefix")} all`).option("--output-styles, -o <styles>", `Comma-separated output styles (engineer-professional,nekomata-engineer,laowang-engineer,default,explanatory,learning), "skip" to skip all, "all" for all custom styles, ${i18n.t("cli:help.defaults.prefix")} all`).option("--default-output-style, -d <style>", `Default output style, ${i18n.t("cli:help.defaults.prefix")} engineer-professional`).option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--code-type, -T <codeType>", "Select code tool type (claude-code, codex, cc, cx)").option("--install-cometix-line, -x <value>", `Install CCometixLine statusline tool (true/false), ${i18n.t("cli:help.defaults.prefix")} true`).option("--api-configs <configs>", "API configurations as JSON string for multiple profiles").option("--api-configs-file <file>", "Path to JSON file containing API configurations").action(await withLanguageResolution(async (options) => {
|
|
2566
1964
|
await init(options);
|
|
2567
1965
|
}));
|
|
2568
1966
|
cli.command("update", "Update Claude Code prompts only").alias("u").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").action(await withLanguageResolution(async (options) => {
|
|
@@ -2597,3 +1995,5 @@ async function main() {
|
|
|
2597
1995
|
cli.parse();
|
|
2598
1996
|
}
|
|
2599
1997
|
main().catch(console.error);
|
|
1998
|
+
|
|
1999
|
+
export { configSwitch as c };
|