ccjk 16.0.2 → 16.0.4
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/simple-config.mjs +255 -83
- package/dist/cli.mjs +5 -5
- package/dist/i18n/locales/en/configuration.json +15 -15
- package/dist/i18n/locales/en/mcp.json +8 -0
- package/dist/i18n/locales/en/menu.json +2 -2
- package/dist/i18n/locales/zh-CN/configuration.json +15 -15
- package/dist/i18n/locales/zh-CN/mcp.json +8 -0
- package/dist/i18n/locales/zh-CN/menu.json +2 -2
- package/package.json +3 -1
- package/templates/common/output-styles/en/carmack-mode.md +367 -0
- package/templates/common/output-styles/en/dhh-mode.md +251 -0
- package/templates/common/output-styles/en/evan-you-mode.md +525 -0
- package/templates/common/output-styles/en/jobs-mode.md +355 -0
- package/templates/common/output-styles/en/linus-mode.md +121 -0
- package/templates/common/output-styles/en/uncle-bob-mode.md +207 -0
- package/templates/common/output-styles/zh-CN/carmack-mode.md +367 -0
- package/templates/common/output-styles/zh-CN/dhh-mode.md +251 -0
- package/templates/common/output-styles/zh-CN/evan-you-mode.md +525 -0
- package/templates/common/output-styles/zh-CN/jobs-mode.md +355 -0
- package/templates/common/output-styles/zh-CN/linus-mode.md +121 -0
- package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +207 -0
|
@@ -18,7 +18,7 @@ import i18next from 'i18next';
|
|
|
18
18
|
import Backend from 'i18next-fs-backend';
|
|
19
19
|
import { edit, stringify, parse, initSync } from '@rainbowatcher/toml-edit-js';
|
|
20
20
|
|
|
21
|
-
const version = "16.0.
|
|
21
|
+
const version = "16.0.4";
|
|
22
22
|
const homepage = "https://github.com/miounet11/ccjk#readme";
|
|
23
23
|
|
|
24
24
|
const i18n = i18next.createInstance();
|
|
@@ -1312,10 +1312,10 @@ function writeTomlConfig(configPath, config) {
|
|
|
1312
1312
|
if (config.claudeCode.version !== void 0) {
|
|
1313
1313
|
edits.push(["claudeCode.version", config.claudeCode.version]);
|
|
1314
1314
|
}
|
|
1315
|
-
edits.push(
|
|
1316
|
-
|
|
1317
|
-
["codex.systemPromptStyle", config.codex.systemPromptStyle]
|
|
1318
|
-
|
|
1315
|
+
edits.push(["codex.enabled", config.codex.enabled]);
|
|
1316
|
+
if (config.codex.systemPromptStyle !== void 0) {
|
|
1317
|
+
edits.push(["codex.systemPromptStyle", config.codex.systemPromptStyle]);
|
|
1318
|
+
}
|
|
1319
1319
|
try {
|
|
1320
1320
|
let updatedContent = batchEditToml(existingContent, edits);
|
|
1321
1321
|
updatedContent = updateTopLevelTomlFields(
|
|
@@ -1348,15 +1348,14 @@ function createDefaultTomlConfig(preferredLang = "en", claudeCodeInstallType = "
|
|
|
1348
1348
|
},
|
|
1349
1349
|
claudeCode: {
|
|
1350
1350
|
enabled: true,
|
|
1351
|
-
outputStyles: [
|
|
1352
|
-
defaultOutputStyle: "
|
|
1351
|
+
outputStyles: [],
|
|
1352
|
+
defaultOutputStyle: "none",
|
|
1353
1353
|
installType: claudeCodeInstallType,
|
|
1354
1354
|
currentProfile: "",
|
|
1355
1355
|
profiles: {}
|
|
1356
1356
|
},
|
|
1357
1357
|
codex: {
|
|
1358
|
-
enabled: false
|
|
1359
|
-
systemPromptStyle: "engineer-professional"
|
|
1358
|
+
enabled: false
|
|
1360
1359
|
}
|
|
1361
1360
|
};
|
|
1362
1361
|
}
|
|
@@ -1383,7 +1382,7 @@ function migrateFromJsonConfig(jsonConfig) {
|
|
|
1383
1382
|
},
|
|
1384
1383
|
codex: {
|
|
1385
1384
|
enabled: jsonConfig.codeToolType === "codex",
|
|
1386
|
-
systemPromptStyle: jsonConfig.systemPromptStyle || defaultConfig.codex.systemPromptStyle
|
|
1385
|
+
...jsonConfig.systemPromptStyle || defaultConfig.codex.systemPromptStyle ? { systemPromptStyle: jsonConfig.systemPromptStyle || defaultConfig.codex.systemPromptStyle } : {}
|
|
1387
1386
|
}
|
|
1388
1387
|
};
|
|
1389
1388
|
return tomlConfig;
|
|
@@ -3658,18 +3657,23 @@ async function resolveSystemPromptStyle(availablePrompts, commandLineOption, sav
|
|
|
3658
3657
|
}
|
|
3659
3658
|
}
|
|
3660
3659
|
if (skipPrompt) {
|
|
3661
|
-
return "
|
|
3660
|
+
return "none";
|
|
3662
3661
|
}
|
|
3663
3662
|
const { systemPrompt } = await inquirer.prompt([{
|
|
3664
3663
|
type: "list",
|
|
3665
3664
|
name: "systemPrompt",
|
|
3666
3665
|
message: i18n.t("codex:systemPromptPrompt"),
|
|
3667
|
-
choices: addNumbersToChoices(
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3666
|
+
choices: addNumbersToChoices([
|
|
3667
|
+
{
|
|
3668
|
+
name: `${i18n.t("configuration:noOutputStyle")} - ${ansis.gray(i18n.t("configuration:noOutputStyleDesc"))}`,
|
|
3669
|
+
value: "none"
|
|
3670
|
+
},
|
|
3671
|
+
...availablePrompts.map((style) => ({
|
|
3672
|
+
name: `${style.name} - ${ansis.gray(style.description)}`,
|
|
3673
|
+
value: style.id
|
|
3674
|
+
}))
|
|
3675
|
+
]),
|
|
3676
|
+
default: "none"
|
|
3673
3677
|
}]);
|
|
3674
3678
|
if (!systemPrompt) {
|
|
3675
3679
|
console.log(ansis.yellow(i18n.t("common:cancelled")));
|
|
@@ -3898,13 +3902,18 @@ function upsertCodexMcpService(serviceId, service) {
|
|
|
3898
3902
|
ensureDir(CODEX_DIR);
|
|
3899
3903
|
writeFile(CODEX_CONFIG_FILE, "");
|
|
3900
3904
|
}
|
|
3901
|
-
let content = readFile(CODEX_CONFIG_FILE) || "";
|
|
3905
|
+
let content = repairBareInlineTableLines(readFile(CODEX_CONFIG_FILE) || "");
|
|
3902
3906
|
const basePath = `mcp_servers.${serviceId}`;
|
|
3903
|
-
|
|
3904
|
-
|
|
3907
|
+
let existingService;
|
|
3908
|
+
try {
|
|
3909
|
+
const parsed = content ? parseToml(content) : {};
|
|
3910
|
+
existingService = parsed.mcp_servers?.[serviceId];
|
|
3911
|
+
} catch {
|
|
3912
|
+
existingService = void 0;
|
|
3913
|
+
}
|
|
3905
3914
|
if (existingService?.url && !existingService?.command) {
|
|
3906
3915
|
if (service.env && Object.keys(service.env).length > 0) {
|
|
3907
|
-
content =
|
|
3916
|
+
content = upsertMcpEnv(content, serviceId, service.env);
|
|
3908
3917
|
}
|
|
3909
3918
|
if (service.startup_timeout_sec) {
|
|
3910
3919
|
content = editToml(content, `${basePath}.startup_timeout_sec`, service.startup_timeout_sec);
|
|
@@ -3914,7 +3923,7 @@ function upsertCodexMcpService(serviceId, service) {
|
|
|
3914
3923
|
content = editToml(content, `${basePath}.command`, normalizedCommand);
|
|
3915
3924
|
content = editToml(content, `${basePath}.args`, service.args || []);
|
|
3916
3925
|
if (service.env && Object.keys(service.env).length > 0) {
|
|
3917
|
-
content =
|
|
3926
|
+
content = upsertMcpEnv(content, serviceId, service.env);
|
|
3918
3927
|
}
|
|
3919
3928
|
if (service.startup_timeout_sec) {
|
|
3920
3929
|
content = editToml(content, `${basePath}.startup_timeout_sec`, service.startup_timeout_sec);
|
|
@@ -3950,6 +3959,41 @@ function batchUpdateCodexMcpServices(services, options = {}) {
|
|
|
3950
3959
|
function escapeRegex(str) {
|
|
3951
3960
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3952
3961
|
}
|
|
3962
|
+
function repairBareInlineTableLines(content) {
|
|
3963
|
+
return content.split("\n").map((line) => {
|
|
3964
|
+
const match = line.match(/^(\s*)(\{.*\})\s*$/);
|
|
3965
|
+
if (!match)
|
|
3966
|
+
return line;
|
|
3967
|
+
const table = match[2];
|
|
3968
|
+
return /[A-Za-z0-9_-]+\s*=/.test(table) ? `${match[1]}env = ${table}` : line;
|
|
3969
|
+
}).join("\n");
|
|
3970
|
+
}
|
|
3971
|
+
function upsertMcpEnv(content, serviceId, env) {
|
|
3972
|
+
const sectionHeader = `[mcp_servers.${serviceId}]`;
|
|
3973
|
+
const sectionIndex = content.indexOf(sectionHeader);
|
|
3974
|
+
if (sectionIndex === -1)
|
|
3975
|
+
return editToml(content, `mcp_servers.${serviceId}.env`, env);
|
|
3976
|
+
const envLine = `env = { ${Object.entries(env).map(([key, value]) => `${formatTomlKey(key)} = ${formatTomlString(value)}`).join(", ")} }`;
|
|
3977
|
+
const bodyStart = sectionIndex + sectionHeader.length;
|
|
3978
|
+
const nextSectionOffset = content.slice(bodyStart).search(/\n\[/);
|
|
3979
|
+
const sectionEnd = nextSectionOffset === -1 ? content.length : bodyStart + nextSectionOffset;
|
|
3980
|
+
const section = content.slice(sectionIndex, sectionEnd);
|
|
3981
|
+
if (/^env\s*=/m.test(section)) {
|
|
3982
|
+
const updatedSection = section.replace(/^env\s*=.*$/m, envLine);
|
|
3983
|
+
return content.slice(0, sectionIndex) + updatedSection + content.slice(sectionEnd);
|
|
3984
|
+
}
|
|
3985
|
+
const insertAt = bodyStart;
|
|
3986
|
+
const prefix = content.slice(0, insertAt);
|
|
3987
|
+
const suffix = content.slice(insertAt);
|
|
3988
|
+
return `${prefix}
|
|
3989
|
+
${envLine}${suffix}`;
|
|
3990
|
+
}
|
|
3991
|
+
function formatTomlKey(key) {
|
|
3992
|
+
return /^[A-Za-z0-9_-]+$/.test(key) ? key : JSON.stringify(key);
|
|
3993
|
+
}
|
|
3994
|
+
function formatTomlString(value) {
|
|
3995
|
+
return JSON.stringify(normalizeTomlPath(String(value)));
|
|
3996
|
+
}
|
|
3953
3997
|
|
|
3954
3998
|
const codexTomlUpdater = {
|
|
3955
3999
|
__proto__: null,
|
|
@@ -3962,6 +4006,83 @@ const codexTomlUpdater = {
|
|
|
3962
4006
|
upsertCodexProvider: upsertCodexProvider
|
|
3963
4007
|
};
|
|
3964
4008
|
|
|
4009
|
+
async function manageCodexMcp() {
|
|
4010
|
+
ensureI18nInitialized();
|
|
4011
|
+
const { action } = await inquirer.prompt({
|
|
4012
|
+
type: "list",
|
|
4013
|
+
name: "action",
|
|
4014
|
+
message: i18n.t("mcp:manageCodexMcp"),
|
|
4015
|
+
choices: [
|
|
4016
|
+
{ name: i18n.t("mcp:installOrUpdateMcp"), value: "install" },
|
|
4017
|
+
{ name: i18n.t("mcp:removeInstalledMcp"), value: "remove" },
|
|
4018
|
+
{ name: i18n.t("mcp:listInstalledMcp"), value: "list" },
|
|
4019
|
+
{ name: i18n.t("common:back"), value: "back" }
|
|
4020
|
+
]
|
|
4021
|
+
});
|
|
4022
|
+
if (action === "install") {
|
|
4023
|
+
await configureCodexMcp();
|
|
4024
|
+
return;
|
|
4025
|
+
}
|
|
4026
|
+
if (action === "remove") {
|
|
4027
|
+
await removeCodexMcpServices();
|
|
4028
|
+
return;
|
|
4029
|
+
}
|
|
4030
|
+
if (action === "list") {
|
|
4031
|
+
listCodexMcpServices();
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
function getInstalledCodexMcpServices() {
|
|
4035
|
+
return readCodexConfig()?.mcpServices || [];
|
|
4036
|
+
}
|
|
4037
|
+
function listCodexMcpServices() {
|
|
4038
|
+
const services = getInstalledCodexMcpServices();
|
|
4039
|
+
if (services.length === 0) {
|
|
4040
|
+
console.log(ansis.yellow(i18n.t("codex:noMcpConfigured")));
|
|
4041
|
+
return;
|
|
4042
|
+
}
|
|
4043
|
+
console.log(ansis.bold(i18n.t("mcp:installedMcpCount", { count: services.length })));
|
|
4044
|
+
for (const service of services) {
|
|
4045
|
+
const args = service.args?.length ? ` ${service.args.join(" ")}` : "";
|
|
4046
|
+
console.log(` ${ansis.cyan(service.id)} ${ansis.dim(`${service.command}${args}`)}`);
|
|
4047
|
+
}
|
|
4048
|
+
}
|
|
4049
|
+
async function removeCodexMcpServices() {
|
|
4050
|
+
const services = getInstalledCodexMcpServices();
|
|
4051
|
+
if (services.length === 0) {
|
|
4052
|
+
console.log(ansis.yellow(i18n.t("codex:noMcpConfigured")));
|
|
4053
|
+
return;
|
|
4054
|
+
}
|
|
4055
|
+
const { selected } = await inquirer.prompt({
|
|
4056
|
+
type: "checkbox",
|
|
4057
|
+
name: "selected",
|
|
4058
|
+
message: `${i18n.t("mcp:selectMcpServicesToRemove")}${i18n.t("common:multiSelectHint")}`,
|
|
4059
|
+
choices: services.sort((a, b) => a.id.localeCompare(b.id)).map((service) => ({
|
|
4060
|
+
name: `${service.id} - ${ansis.gray(service.command)}`,
|
|
4061
|
+
value: service.id
|
|
4062
|
+
}))
|
|
4063
|
+
});
|
|
4064
|
+
if (!selected || selected.length === 0) {
|
|
4065
|
+
console.log(ansis.yellow(i18n.t("common:cancelled")));
|
|
4066
|
+
return;
|
|
4067
|
+
}
|
|
4068
|
+
const { confirmed } = await inquirer.prompt({
|
|
4069
|
+
type: "confirm",
|
|
4070
|
+
name: "confirmed",
|
|
4071
|
+
message: i18n.t("mcp:confirmRemoveMcp", { services: selected.join(", ") }),
|
|
4072
|
+
default: true
|
|
4073
|
+
});
|
|
4074
|
+
if (!confirmed) {
|
|
4075
|
+
console.log(ansis.yellow(i18n.t("common:cancelled")));
|
|
4076
|
+
return;
|
|
4077
|
+
}
|
|
4078
|
+
const backupPath = backupCodexComplete();
|
|
4079
|
+
if (backupPath)
|
|
4080
|
+
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
4081
|
+
for (const id of selected)
|
|
4082
|
+
deleteCodexMcpService(id);
|
|
4083
|
+
updateCcjkConfig({ codeToolType: "codex" });
|
|
4084
|
+
console.log(ansis.green(i18n.t("mcp:mcpRemoved", { services: selected.join(", ") })));
|
|
4085
|
+
}
|
|
3965
4086
|
async function configureCodexMcp(options) {
|
|
3966
4087
|
ensureI18nInitialized();
|
|
3967
4088
|
const { skipPrompt = false } = options ?? {};
|
|
@@ -4844,24 +4965,34 @@ async function runCodexSystemPromptSelection(skipPrompt = false) {
|
|
|
4844
4965
|
return;
|
|
4845
4966
|
const availablePrompts = [
|
|
4846
4967
|
{
|
|
4847
|
-
id: "
|
|
4848
|
-
name: i18n.t("configuration:outputStyles.
|
|
4849
|
-
description: i18n.t("configuration:outputStyles.
|
|
4968
|
+
id: "linus-mode",
|
|
4969
|
+
name: i18n.t("configuration:outputStyles.linus-mode.name"),
|
|
4970
|
+
description: i18n.t("configuration:outputStyles.linus-mode.description")
|
|
4971
|
+
},
|
|
4972
|
+
{
|
|
4973
|
+
id: "uncle-bob-mode",
|
|
4974
|
+
name: i18n.t("configuration:outputStyles.uncle-bob-mode.name"),
|
|
4975
|
+
description: i18n.t("configuration:outputStyles.uncle-bob-mode.description")
|
|
4976
|
+
},
|
|
4977
|
+
{
|
|
4978
|
+
id: "dhh-mode",
|
|
4979
|
+
name: i18n.t("configuration:outputStyles.dhh-mode.name"),
|
|
4980
|
+
description: i18n.t("configuration:outputStyles.dhh-mode.description")
|
|
4850
4981
|
},
|
|
4851
4982
|
{
|
|
4852
|
-
id: "
|
|
4853
|
-
name: i18n.t("configuration:outputStyles.
|
|
4854
|
-
description: i18n.t("configuration:outputStyles.
|
|
4983
|
+
id: "carmack-mode",
|
|
4984
|
+
name: i18n.t("configuration:outputStyles.carmack-mode.name"),
|
|
4985
|
+
description: i18n.t("configuration:outputStyles.carmack-mode.description")
|
|
4855
4986
|
},
|
|
4856
4987
|
{
|
|
4857
|
-
id: "
|
|
4858
|
-
name: i18n.t("configuration:outputStyles.
|
|
4859
|
-
description: i18n.t("configuration:outputStyles.
|
|
4988
|
+
id: "jobs-mode",
|
|
4989
|
+
name: i18n.t("configuration:outputStyles.jobs-mode.name"),
|
|
4990
|
+
description: i18n.t("configuration:outputStyles.jobs-mode.description")
|
|
4860
4991
|
},
|
|
4861
4992
|
{
|
|
4862
|
-
id: "
|
|
4863
|
-
name: i18n.t("configuration:outputStyles.
|
|
4864
|
-
description: i18n.t("configuration:outputStyles.
|
|
4993
|
+
id: "evan-you-mode",
|
|
4994
|
+
name: i18n.t("configuration:outputStyles.evan-you-mode.name"),
|
|
4995
|
+
description: i18n.t("configuration:outputStyles.evan-you-mode.description")
|
|
4865
4996
|
}
|
|
4866
4997
|
].filter((style) => exists(join(systemPromptSrc, `${style.id}.md`)));
|
|
4867
4998
|
if (availablePrompts.length === 0)
|
|
@@ -4875,8 +5006,19 @@ async function runCodexSystemPromptSelection(skipPrompt = false) {
|
|
|
4875
5006
|
skipPrompt
|
|
4876
5007
|
// Pass skipPrompt flag
|
|
4877
5008
|
);
|
|
4878
|
-
if (!systemPrompt)
|
|
5009
|
+
if (!systemPrompt || systemPrompt === "none") {
|
|
5010
|
+
try {
|
|
5011
|
+
const { updateTomlConfig: updateTomlConfig2 } = await Promise.resolve().then(function () { return ccjkConfig; });
|
|
5012
|
+
const { CCJK_CONFIG_FILE: CCJK_CONFIG_FILE2 } = await Promise.resolve().then(function () { return constants; });
|
|
5013
|
+
updateTomlConfig2(CCJK_CONFIG_FILE2, {
|
|
5014
|
+
codex: {
|
|
5015
|
+
systemPromptStyle: "none"
|
|
5016
|
+
}
|
|
5017
|
+
});
|
|
5018
|
+
} catch {
|
|
5019
|
+
}
|
|
4879
5020
|
return;
|
|
5021
|
+
}
|
|
4880
5022
|
const promptFile = join(systemPromptSrc, `${systemPrompt}.md`);
|
|
4881
5023
|
const content = readFile(promptFile);
|
|
4882
5024
|
ensureDir(CODEX_DIR);
|
|
@@ -5609,6 +5751,7 @@ const codex = {
|
|
|
5609
5751
|
installCodexCli: installCodexCli,
|
|
5610
5752
|
isCodexInstalled: isCodexInstalled$1,
|
|
5611
5753
|
listCodexProviders: listCodexProviders,
|
|
5754
|
+
manageCodexMcp: manageCodexMcp,
|
|
5612
5755
|
migrateEnvKeyInContent: migrateEnvKeyInContent,
|
|
5613
5756
|
migrateEnvKeyToTempEnvKey: migrateEnvKeyToTempEnvKey,
|
|
5614
5757
|
needsEnvKeyMigration: needsEnvKeyMigration,
|
|
@@ -5776,36 +5919,36 @@ async function installCometixLine() {
|
|
|
5776
5919
|
}
|
|
5777
5920
|
|
|
5778
5921
|
const OUTPUT_STYLES = [
|
|
5779
|
-
// Custom styles (have template files)
|
|
5922
|
+
// Custom styles (have template files) - zcf legacy curated modes
|
|
5780
5923
|
{
|
|
5781
|
-
id: "
|
|
5924
|
+
id: "linus-mode",
|
|
5782
5925
|
isCustom: true,
|
|
5783
|
-
filePath: "
|
|
5926
|
+
filePath: "linus-mode.md"
|
|
5784
5927
|
},
|
|
5785
5928
|
{
|
|
5786
|
-
id: "
|
|
5929
|
+
id: "uncle-bob-mode",
|
|
5787
5930
|
isCustom: true,
|
|
5788
|
-
filePath: "
|
|
5931
|
+
filePath: "uncle-bob-mode.md"
|
|
5789
5932
|
},
|
|
5790
5933
|
{
|
|
5791
|
-
id: "
|
|
5934
|
+
id: "dhh-mode",
|
|
5792
5935
|
isCustom: true,
|
|
5793
|
-
filePath: "
|
|
5936
|
+
filePath: "dhh-mode.md"
|
|
5794
5937
|
},
|
|
5795
5938
|
{
|
|
5796
|
-
id: "
|
|
5939
|
+
id: "carmack-mode",
|
|
5797
5940
|
isCustom: true,
|
|
5798
|
-
filePath: "
|
|
5941
|
+
filePath: "carmack-mode.md"
|
|
5799
5942
|
},
|
|
5800
5943
|
{
|
|
5801
|
-
id: "
|
|
5944
|
+
id: "jobs-mode",
|
|
5802
5945
|
isCustom: true,
|
|
5803
|
-
filePath: "
|
|
5946
|
+
filePath: "jobs-mode.md"
|
|
5804
5947
|
},
|
|
5805
5948
|
{
|
|
5806
|
-
id: "
|
|
5949
|
+
id: "evan-you-mode",
|
|
5807
5950
|
isCustom: true,
|
|
5808
|
-
filePath: "
|
|
5951
|
+
filePath: "evan-you-mode.md"
|
|
5809
5952
|
},
|
|
5810
5953
|
// Built-in styles (no template files)
|
|
5811
5954
|
{
|
|
@@ -5858,7 +6001,8 @@ function setGlobalDefaultOutputStyle(styleId, codeTool) {
|
|
|
5858
6001
|
function clearGlobalOutputStyle(codeTool) {
|
|
5859
6002
|
const target = resolveClaudeFamilySettingsTarget(codeTool);
|
|
5860
6003
|
const existingSettings = readJsonConfig(target.settingsFile) || {};
|
|
5861
|
-
const
|
|
6004
|
+
const rest = { ...existingSettings };
|
|
6005
|
+
delete rest.outputStyle;
|
|
5862
6006
|
normalizeClaudeFamilySettings(rest, { codeTool: target.codeTool });
|
|
5863
6007
|
writeJsonConfig(target.settingsFile, rest);
|
|
5864
6008
|
}
|
|
@@ -5885,34 +6029,34 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5885
6029
|
description: i18n.t("configuration:outputStyles.default.description")
|
|
5886
6030
|
},
|
|
5887
6031
|
{
|
|
5888
|
-
id: "
|
|
5889
|
-
name: i18n.t("configuration:outputStyles.
|
|
5890
|
-
description: i18n.t("configuration:outputStyles.
|
|
6032
|
+
id: "linus-mode",
|
|
6033
|
+
name: i18n.t("configuration:outputStyles.linus-mode.name"),
|
|
6034
|
+
description: i18n.t("configuration:outputStyles.linus-mode.description")
|
|
5891
6035
|
},
|
|
5892
6036
|
{
|
|
5893
|
-
id: "
|
|
5894
|
-
name: i18n.t("configuration:outputStyles.
|
|
5895
|
-
description: i18n.t("configuration:outputStyles.
|
|
6037
|
+
id: "uncle-bob-mode",
|
|
6038
|
+
name: i18n.t("configuration:outputStyles.uncle-bob-mode.name"),
|
|
6039
|
+
description: i18n.t("configuration:outputStyles.uncle-bob-mode.description")
|
|
5896
6040
|
},
|
|
5897
6041
|
{
|
|
5898
|
-
id: "
|
|
5899
|
-
name: i18n.t("configuration:outputStyles.
|
|
5900
|
-
description: i18n.t("configuration:outputStyles.
|
|
6042
|
+
id: "dhh-mode",
|
|
6043
|
+
name: i18n.t("configuration:outputStyles.dhh-mode.name"),
|
|
6044
|
+
description: i18n.t("configuration:outputStyles.dhh-mode.description")
|
|
5901
6045
|
},
|
|
5902
6046
|
{
|
|
5903
|
-
id: "
|
|
5904
|
-
name: i18n.t("configuration:outputStyles.
|
|
5905
|
-
description: i18n.t("configuration:outputStyles.
|
|
6047
|
+
id: "carmack-mode",
|
|
6048
|
+
name: i18n.t("configuration:outputStyles.carmack-mode.name"),
|
|
6049
|
+
description: i18n.t("configuration:outputStyles.carmack-mode.description")
|
|
5906
6050
|
},
|
|
5907
6051
|
{
|
|
5908
|
-
id: "
|
|
5909
|
-
name: i18n.t("configuration:outputStyles.
|
|
5910
|
-
description: i18n.t("configuration:outputStyles.
|
|
6052
|
+
id: "jobs-mode",
|
|
6053
|
+
name: i18n.t("configuration:outputStyles.jobs-mode.name"),
|
|
6054
|
+
description: i18n.t("configuration:outputStyles.jobs-mode.description")
|
|
5911
6055
|
},
|
|
5912
6056
|
{
|
|
5913
|
-
id: "
|
|
5914
|
-
name: i18n.t("configuration:outputStyles.
|
|
5915
|
-
description: i18n.t("configuration:outputStyles.
|
|
6057
|
+
id: "evan-you-mode",
|
|
6058
|
+
name: i18n.t("configuration:outputStyles.evan-you-mode.name"),
|
|
6059
|
+
description: i18n.t("configuration:outputStyles.evan-you-mode.description")
|
|
5916
6060
|
},
|
|
5917
6061
|
{
|
|
5918
6062
|
id: "explanatory",
|
|
@@ -5944,6 +6088,16 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5944
6088
|
if (preselectedStyles && preselectedDefault) {
|
|
5945
6089
|
selectedStyles = preselectedStyles;
|
|
5946
6090
|
defaultStyle = preselectedDefault;
|
|
6091
|
+
if (defaultStyle === "none") {
|
|
6092
|
+
await copyOutputStyles(selectedStyles, "zh-CN", target.codeTool);
|
|
6093
|
+
clearGlobalOutputStyle(target.codeTool);
|
|
6094
|
+
updateCcjkConfig({
|
|
6095
|
+
outputStyles: selectedStyles,
|
|
6096
|
+
defaultOutputStyle: "none"
|
|
6097
|
+
});
|
|
6098
|
+
console.log(ansis.green(`\u2714 ${i18n.t("configuration:outputStyleCleared")}`));
|
|
6099
|
+
return;
|
|
6100
|
+
}
|
|
5947
6101
|
} else {
|
|
5948
6102
|
const customStyles = availableStyles.filter((style) => style.isCustom);
|
|
5949
6103
|
const { selectedStyles: promptedStyles } = await inquirer.prompt({
|
|
@@ -5955,8 +6109,8 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5955
6109
|
return {
|
|
5956
6110
|
name: `${styleInfo?.name || style.id} - ${ansis.gray(styleInfo?.description || "")}`,
|
|
5957
6111
|
value: style.id,
|
|
5958
|
-
checked:
|
|
5959
|
-
//
|
|
6112
|
+
checked: false
|
|
6113
|
+
// 默认不安装任何输出风格,保持工具原始行为
|
|
5960
6114
|
};
|
|
5961
6115
|
}))
|
|
5962
6116
|
// Allow empty selection - user can choose to not install any custom styles
|
|
@@ -5964,7 +6118,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5964
6118
|
selectedStyles = promptedStyles || [];
|
|
5965
6119
|
if (selectedStyles.length === 0) {
|
|
5966
6120
|
const builtinStyles = availableStyles.filter((style) => !style.isCustom);
|
|
5967
|
-
const
|
|
6121
|
+
const noneOption2 = { name: i18n.t("configuration:noOutputStyle"), description: i18n.t("configuration:noOutputStyleDesc") };
|
|
5968
6122
|
const { defaultStyle: promptedDefault2 } = await inquirer.prompt({
|
|
5969
6123
|
type: "list",
|
|
5970
6124
|
name: "defaultStyle",
|
|
@@ -5972,9 +6126,9 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5972
6126
|
choices: addNumbersToChoices([
|
|
5973
6127
|
// Show "none" option first
|
|
5974
6128
|
{
|
|
5975
|
-
name: `${
|
|
6129
|
+
name: `${noneOption2.name} - ${ansis.gray(noneOption2.description)}`,
|
|
5976
6130
|
value: "__none__",
|
|
5977
|
-
short:
|
|
6131
|
+
short: noneOption2.name
|
|
5978
6132
|
},
|
|
5979
6133
|
// Then show built-in styles
|
|
5980
6134
|
...builtinStyles.map((style) => {
|
|
@@ -6011,11 +6165,17 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
6011
6165
|
console.log(ansis.gray(` ${i18n.t("configuration:defaultStyle")}: ${defaultStyle}`));
|
|
6012
6166
|
return;
|
|
6013
6167
|
}
|
|
6168
|
+
const noneOption = { name: i18n.t("configuration:noOutputStyle"), description: i18n.t("configuration:noOutputStyleDesc") };
|
|
6014
6169
|
const { defaultStyle: promptedDefault } = await inquirer.prompt({
|
|
6015
6170
|
type: "list",
|
|
6016
6171
|
name: "defaultStyle",
|
|
6017
6172
|
message: i18n.t("configuration:selectDefaultOutputStyle"),
|
|
6018
6173
|
choices: addNumbersToChoices([
|
|
6174
|
+
{
|
|
6175
|
+
name: `${noneOption.name} - ${ansis.gray(noneOption.description)}`,
|
|
6176
|
+
value: "__none__",
|
|
6177
|
+
short: noneOption.name
|
|
6178
|
+
},
|
|
6019
6179
|
// Show selected custom styles first (only what user actually installed)
|
|
6020
6180
|
...selectedStyles.map((styleId) => {
|
|
6021
6181
|
const styleInfo = outputStyleList.find((s) => s.id === styleId);
|
|
@@ -6035,7 +6195,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
6035
6195
|
};
|
|
6036
6196
|
})
|
|
6037
6197
|
]),
|
|
6038
|
-
default:
|
|
6198
|
+
default: "__none__"
|
|
6039
6199
|
});
|
|
6040
6200
|
if (!promptedDefault) {
|
|
6041
6201
|
console.log(ansis.yellow(i18n.t("common:cancelled")));
|
|
@@ -6044,6 +6204,17 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
6044
6204
|
defaultStyle = promptedDefault;
|
|
6045
6205
|
}
|
|
6046
6206
|
await copyOutputStyles(selectedStyles, "zh-CN", target.codeTool);
|
|
6207
|
+
if (defaultStyle === "__none__" || defaultStyle === "none") {
|
|
6208
|
+
clearGlobalOutputStyle(target.codeTool);
|
|
6209
|
+
updateCcjkConfig({
|
|
6210
|
+
outputStyles: selectedStyles,
|
|
6211
|
+
defaultOutputStyle: "none"
|
|
6212
|
+
});
|
|
6213
|
+
console.log(ansis.green(`\u2714 ${i18n.t("configuration:outputStyleInstalled")}`));
|
|
6214
|
+
console.log(ansis.gray(` ${i18n.t("configuration:selectedStyles")}: ${selectedStyles.join(", ")}`));
|
|
6215
|
+
console.log(ansis.gray(` ${i18n.t("configuration:defaultStyle")}: none`));
|
|
6216
|
+
return;
|
|
6217
|
+
}
|
|
6047
6218
|
setGlobalDefaultOutputStyle(defaultStyle, target.codeTool);
|
|
6048
6219
|
updateCcjkConfig({
|
|
6049
6220
|
outputStyles: selectedStyles,
|
|
@@ -7055,13 +7226,14 @@ async function selectAndInstallWorkflows(configLang, preselectedWorkflows, optio
|
|
|
7055
7226
|
ensureI18nInitialized();
|
|
7056
7227
|
const target = resolveClaudeFamilySettingsTarget(options.codeToolType);
|
|
7057
7228
|
const workflows = getOrderedWorkflows();
|
|
7058
|
-
const choices = workflows.map((workflow) => {
|
|
7229
|
+
const choices = addNumbersToChoices(workflows.map((workflow) => {
|
|
7059
7230
|
return {
|
|
7060
|
-
name: workflow.name
|
|
7231
|
+
name: `${workflow.name}${workflow.description ? ` - ${ansis.gray(workflow.description)}` : ""}`,
|
|
7061
7232
|
value: workflow.id,
|
|
7062
|
-
checked: workflow.defaultSelected
|
|
7233
|
+
checked: workflow.defaultSelected,
|
|
7234
|
+
short: workflow.name
|
|
7063
7235
|
};
|
|
7064
|
-
});
|
|
7236
|
+
}));
|
|
7065
7237
|
let selectedWorkflows;
|
|
7066
7238
|
if (preselectedWorkflows) {
|
|
7067
7239
|
selectedWorkflows = preselectedWorkflows;
|
|
@@ -7256,16 +7428,16 @@ async function validateSkipPromptOptions(options) {
|
|
|
7256
7428
|
if (options.outputStyles === "skip") {
|
|
7257
7429
|
options.outputStyles = false;
|
|
7258
7430
|
} else if (options.outputStyles === "all") {
|
|
7259
|
-
options.outputStyles = ["
|
|
7431
|
+
options.outputStyles = ["linus-mode", "uncle-bob-mode", "dhh-mode", "carmack-mode", "jobs-mode", "evan-you-mode"];
|
|
7260
7432
|
} else {
|
|
7261
7433
|
options.outputStyles = options.outputStyles.split(",").map((s) => s.trim());
|
|
7262
7434
|
}
|
|
7263
7435
|
}
|
|
7264
7436
|
if (options.outputStyles === void 0) {
|
|
7265
|
-
options.outputStyles = [
|
|
7437
|
+
options.outputStyles = [];
|
|
7266
7438
|
}
|
|
7267
7439
|
if (!options.defaultOutputStyle) {
|
|
7268
|
-
options.defaultOutputStyle = "
|
|
7440
|
+
options.defaultOutputStyle = "none";
|
|
7269
7441
|
}
|
|
7270
7442
|
if (typeof options.installCometixLine === "string") {
|
|
7271
7443
|
options.installCometixLine = options.installCometixLine.toLowerCase() === "true";
|
|
@@ -7323,7 +7495,7 @@ async function validateSkipPromptOptions(options) {
|
|
|
7323
7495
|
}
|
|
7324
7496
|
}
|
|
7325
7497
|
if (Array.isArray(options.outputStyles)) {
|
|
7326
|
-
const validStyles = ["
|
|
7498
|
+
const validStyles = ["linus-mode", "uncle-bob-mode", "dhh-mode", "carmack-mode", "jobs-mode", "evan-you-mode", "default", "explanatory", "learning", "none"];
|
|
7327
7499
|
for (const style of options.outputStyles) {
|
|
7328
7500
|
if (!validStyles.includes(style)) {
|
|
7329
7501
|
throw new Error(i18n.t("errors:invalidOutputStyle", { style, validStyles: validStyles.join(", ") }));
|
|
@@ -7331,7 +7503,7 @@ async function validateSkipPromptOptions(options) {
|
|
|
7331
7503
|
}
|
|
7332
7504
|
}
|
|
7333
7505
|
if (options.defaultOutputStyle) {
|
|
7334
|
-
const validStyles = ["
|
|
7506
|
+
const validStyles = ["linus-mode", "uncle-bob-mode", "dhh-mode", "carmack-mode", "jobs-mode", "evan-you-mode", "default", "explanatory", "learning", "none"];
|
|
7335
7507
|
if (!validStyles.includes(options.defaultOutputStyle)) {
|
|
7336
7508
|
throw new Error(i18n.t("errors:invalidDefaultOutputStyle", { style: options.defaultOutputStyle, validStyles: validStyles.join(", ") }));
|
|
7337
7509
|
}
|
|
@@ -8276,4 +8448,4 @@ async function openSettingsJson(codeTool) {
|
|
|
8276
8448
|
}
|
|
8277
8449
|
}
|
|
8278
8450
|
|
|
8279
|
-
export { installClaudeCode as $, AI_OUTPUT_LANGUAGES as A, buildMcpServerConfig as B, CCJK_CONFIG_DIR as C, DEFAULT_CODE_TOOL_TYPE as D, cleanupPermissions as E, commandExists as F, configureApi as G, copyConfigFiles as H, createHomebrewSymlink as I, detectInstalledVersion as J, displayVerificationResult as K, LANG_LABELS as L, ensureApiKeyApproved as M, ensureClaudeDir as N, executeInstallMethod as O, fixWindowsMcpConfig as P, getAiOutputLanguageLabel as Q, getExistingApiConfig as R, SETTINGS_FILE as S, getExistingModelConfig as T, getInstallationStatus as U, getMcpConfigPath as V, getPlatform as W, handleInstallFailure as X, importRecommendedEnv as Y, importRecommendedPermissions as Z, init as _, API_DEFAULT_URL as a, COMETIX_COMMAND_NAME as a$, installCodex as a0, isClaudeCodeInstalled as a1, isCodeToolType as a2, isCodexInstalled as a3, isLocalClaudeCodeInstalled as a4, manageApiKeyApproval as a5, mergeAndCleanPermissions as a6, mergeConfigs as a7, mergeMcpServers as a8, mergeSettingsFile as a9, exists as aA, readJsonConfig as aB, writeTomlConfig as aC, clearModelEnv as aD, normalizeClaudeFamilySettings as aE, copyFile as aF, detectConfigManagementMode as aG, readCodexConfig as aH, backupCodexComplete as aI, writeAuthFile as aJ, updateCcjkConfig as aK, changeLanguage as aL, readCcjkConfig as aM, configureOutputStyle as aN, isClaudeFamilyCodeTool as aO, isWindows as aP, selectMcpServices as aQ, getMcpServices as aR, isCcrInstalled as aS, installCcr as aT, setupCcrConfiguration as aU, modifyApiConfigPartially as aV, formatApiKeyDisplay as aW, readCcrConfig as aX, configureCcrFeature as aY, handleExitPromptError as aZ, handleGeneralError as a_, openSettingsJson as aa, promptApiConfigurationAction as ab, readMcpConfig as ac, removeApiKeyFromRejected as ad, removeLocalClaudeCode as ae, resolveCodeToolType as af, selectInstallMethod as ag, setInstallMethod as ah, setPrimaryApiKey as ai, settingsFileForTool as aj, switchToOfficialLogin$1 as ak, uninstallCodeTool as al, updateCustomModel as am, updateDefaultModel as an, verifyInstallation as ao, writeMcpConfig as ap, ensureI18nInitialized as aq, getActiveCodeTool as ar, i18n as as, addNumbersToChoices as at, validateApiKey as au, promptBoolean as av, resolveClaudeFamilySettingsTarget as aw, ensureDir as ax, readDefaultTomlConfig as ay, createDefaultTomlConfig as az, API_ENV_KEY as b, COMETIX_COMMANDS as b0, installCometixLine as b1, checkAndUpdateTools as b2, runCodexUpdate as b3, resolveCodeType as b4, writeJsonConfig as b5, displayBanner as b6, version as b7, resolveAiOutputLanguage as b8, updatePromptOnly as b9, installer as bA, selectAndInstallWorkflows as ba, checkClaudeCodeVersionAndPrompt as bb, STARTUP_CODE_TOOL_CHOICES as bc, displayBannerWithInfo as bd, runCodexUninstall as be,
|
|
8451
|
+
export { installClaudeCode as $, AI_OUTPUT_LANGUAGES as A, buildMcpServerConfig as B, CCJK_CONFIG_DIR as C, DEFAULT_CODE_TOOL_TYPE as D, cleanupPermissions as E, commandExists as F, configureApi as G, copyConfigFiles as H, createHomebrewSymlink as I, detectInstalledVersion as J, displayVerificationResult as K, LANG_LABELS as L, ensureApiKeyApproved as M, ensureClaudeDir as N, executeInstallMethod as O, fixWindowsMcpConfig as P, getAiOutputLanguageLabel as Q, getExistingApiConfig as R, SETTINGS_FILE as S, getExistingModelConfig as T, getInstallationStatus as U, getMcpConfigPath as V, getPlatform as W, handleInstallFailure as X, importRecommendedEnv as Y, importRecommendedPermissions as Z, init as _, API_DEFAULT_URL as a, COMETIX_COMMAND_NAME as a$, installCodex as a0, isClaudeCodeInstalled as a1, isCodeToolType as a2, isCodexInstalled as a3, isLocalClaudeCodeInstalled as a4, manageApiKeyApproval as a5, mergeAndCleanPermissions as a6, mergeConfigs as a7, mergeMcpServers as a8, mergeSettingsFile as a9, exists as aA, readJsonConfig as aB, writeTomlConfig as aC, clearModelEnv as aD, normalizeClaudeFamilySettings as aE, copyFile as aF, detectConfigManagementMode as aG, readCodexConfig as aH, backupCodexComplete as aI, writeAuthFile as aJ, updateCcjkConfig as aK, changeLanguage as aL, readCcjkConfig as aM, configureOutputStyle as aN, isClaudeFamilyCodeTool as aO, isWindows as aP, selectMcpServices as aQ, getMcpServices as aR, isCcrInstalled as aS, installCcr as aT, setupCcrConfiguration as aU, modifyApiConfigPartially as aV, formatApiKeyDisplay as aW, readCcrConfig as aX, configureCcrFeature as aY, handleExitPromptError as aZ, handleGeneralError as a_, openSettingsJson as aa, promptApiConfigurationAction as ab, readMcpConfig as ac, removeApiKeyFromRejected as ad, removeLocalClaudeCode as ae, resolveCodeToolType as af, selectInstallMethod as ag, setInstallMethod as ah, setPrimaryApiKey as ai, settingsFileForTool as aj, switchToOfficialLogin$1 as ak, uninstallCodeTool as al, updateCustomModel as am, updateDefaultModel as an, verifyInstallation as ao, writeMcpConfig as ap, ensureI18nInitialized as aq, getActiveCodeTool as ar, i18n as as, addNumbersToChoices as at, validateApiKey as au, promptBoolean as av, resolveClaudeFamilySettingsTarget as aw, ensureDir as ax, readDefaultTomlConfig as ay, createDefaultTomlConfig as az, API_ENV_KEY as b, COMETIX_COMMANDS as b0, installCometixLine as b1, checkAndUpdateTools as b2, runCodexUpdate as b3, resolveCodeType as b4, writeJsonConfig as b5, displayBanner as b6, version as b7, resolveAiOutputLanguage as b8, updatePromptOnly as b9, installer as bA, selectAndInstallWorkflows as ba, checkClaudeCodeVersionAndPrompt as bb, STARTUP_CODE_TOOL_CHOICES as bc, displayBannerWithInfo as bd, runCodexUninstall as be, manageCodexMcp as bf, configureCodexApi as bg, runCodexWorkflowImportWithLanguageSelection as bh, runCodexFullInit as bi, switchCodexProvider as bj, listCodexProviders as bk, switchToOfficialLogin as bl, switchToProvider as bm, readCcjkConfigAsync as bn, initI18n as bo, selectScriptLanguage as bp, index as bq, fsOperations as br, jsonConfig as bs, claudeConfig as bt, config$1 as bu, config as bv, prompts as bw, codexProfileV2 as bx, codexTomlUpdater as by, codex as bz, CCJK_CONFIG_FILE as c, CLAUDE_DIR as d, CLAUDE_MD_FILE as e, CLAUDE_VSC_CONFIG_FILE as f, CLAVUE_CONFIG_FILE as g, CLAVUE_DIR as h, CLAVUE_MD_FILE as i, CLAVUE_SETTINGS_FILE as j, CODEX_AGENTS_FILE as k, CODEX_AUTH_FILE as l, CODEX_CONFIG_FILE as m, CODEX_DIR as n, CODEX_PROMPTS_DIR as o, CODE_TOOL_ALIASES as p, CODE_TOOL_BANNERS as q, CODE_TOOL_TYPES as r, ClAUDE_CONFIG_FILE as s, LEGACY_CCJK_CONFIG_FILES as t, SUPPORTED_LANGS as u, activeSettingsFile as v, addCompletedOnboarding as w, applyAiLanguageDirective as x, backupExistingConfig as y, backupMcpConfig as z };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { aq as ensureI18nInitialized, as as i18n, aX as readCcrConfig, aS as isCcrInstalled, aT as installCcr, aY as configureCcrFeature, av as promptBoolean, aZ as handleExitPromptError, a_ as handleGeneralError, a$ as COMETIX_COMMAND_NAME, b0 as COMETIX_COMMANDS, b1 as installCometixLine, at as addNumbersToChoices, b2 as checkAndUpdateTools, b3 as runCodexUpdate, b4 as resolveCodeType$1, aB as readJsonConfig, b5 as writeJsonConfig, c as CCJK_CONFIG_FILE, aM as readCcjkConfig, D as DEFAULT_CODE_TOOL_TYPE, a2 as isCodeToolType, b6 as displayBanner, aK as updateCcjkConfig, b7 as version, b8 as resolveAiOutputLanguage, aO as isClaudeFamilyCodeTool, b9 as updatePromptOnly, ba as selectAndInstallWorkflows, bb as checkClaudeCodeVersionAndPrompt, af as resolveCodeToolType$1, v as activeSettingsFile, C as CCJK_CONFIG_DIR, aL as changeLanguage, u as SUPPORTED_LANGS, L as LANG_LABELS, bc as STARTUP_CODE_TOOL_CHOICES, bd as displayBannerWithInfo, q as CODE_TOOL_BANNERS, _ as init, be as runCodexUninstall, bf as
|
|
4
|
+
import { aq as ensureI18nInitialized, as as i18n, aX as readCcrConfig, aS as isCcrInstalled, aT as installCcr, aY as configureCcrFeature, av as promptBoolean, aZ as handleExitPromptError, a_ as handleGeneralError, a$ as COMETIX_COMMAND_NAME, b0 as COMETIX_COMMANDS, b1 as installCometixLine, at as addNumbersToChoices, b2 as checkAndUpdateTools, b3 as runCodexUpdate, b4 as resolveCodeType$1, aB as readJsonConfig, b5 as writeJsonConfig, c as CCJK_CONFIG_FILE, aM as readCcjkConfig, D as DEFAULT_CODE_TOOL_TYPE, a2 as isCodeToolType, b6 as displayBanner, aK as updateCcjkConfig, b7 as version, b8 as resolveAiOutputLanguage, aO as isClaudeFamilyCodeTool, b9 as updatePromptOnly, ba as selectAndInstallWorkflows, bb as checkClaudeCodeVersionAndPrompt, af as resolveCodeToolType$1, v as activeSettingsFile, C as CCJK_CONFIG_DIR, aL as changeLanguage, u as SUPPORTED_LANGS, L as LANG_LABELS, bc as STARTUP_CODE_TOOL_CHOICES, bd as displayBannerWithInfo, q as CODE_TOOL_BANNERS, _ as init, be as runCodexUninstall, bf as manageCodexMcp, bg as configureCodexApi, bh as runCodexWorkflowImportWithLanguageSelection, bi as runCodexFullInit, bj as switchCodexProvider, bk as listCodexProviders, aH as readCodexConfig, bl as switchToOfficialLogin, bm as switchToProvider, bn as readCcjkConfigAsync, bo as initI18n, bp as selectScriptLanguage } from './chunks/simple-config.mjs';
|
|
5
5
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import inquirer from 'inquirer';
|
|
@@ -2205,7 +2205,7 @@ async function showCodexMenu() {
|
|
|
2205
2205
|
await configureCodexApi();
|
|
2206
2206
|
break;
|
|
2207
2207
|
case "4":
|
|
2208
|
-
await
|
|
2208
|
+
await manageCodexMcp();
|
|
2209
2209
|
break;
|
|
2210
2210
|
case "5":
|
|
2211
2211
|
await configureCodexDefaultModelFeature();
|
|
@@ -2766,8 +2766,8 @@ function customizeHelp(sections) {
|
|
|
2766
2766
|
` ${ansis.green("--config-action, -r")} <action> ${i18n.t("cli:help.optionDescriptions.configHandling")} (${i18n.t("cli:help.defaults.prefix")} backup)`,
|
|
2767
2767
|
` ${ansis.green("--mcp-services, -m")} <list> ${i18n.t("cli:help.optionDescriptions.mcpServices")} (${i18n.t("cli:help.defaults.prefix")} all non-key services)`,
|
|
2768
2768
|
` ${ansis.green("--workflows, -w")} <list> ${i18n.t("cli:help.optionDescriptions.workflows")} (${i18n.t("cli:help.defaults.prefix")} all workflows)`,
|
|
2769
|
-
` ${ansis.green("--output-styles, -o")} <styles> ${i18n.t("cli:help.optionDescriptions.outputStyles")} (${i18n.t("cli:help.defaults.prefix")}
|
|
2770
|
-
` ${ansis.green("--default-output-style, -d")} <style> ${i18n.t("cli:help.optionDescriptions.defaultOutputStyle")} (${i18n.t("cli:help.defaults.prefix")}
|
|
2769
|
+
` ${ansis.green("--output-styles, -o")} <styles> ${i18n.t("cli:help.optionDescriptions.outputStyles")} (${i18n.t("cli:help.defaults.prefix")} none)`,
|
|
2770
|
+
` ${ansis.green("--default-output-style, -d")} <style> ${i18n.t("cli:help.optionDescriptions.defaultOutputStyle")} (${i18n.t("cli:help.defaults.prefix")} none)`,
|
|
2771
2771
|
` ${ansis.green("--code-type, -T")} <type> ${i18n.t("cli:help.optionDescriptions.codeToolType")} (claude-code, codex, cc=claude-code, cx=codex)`,
|
|
2772
2772
|
` ${ansis.green("--install-cometix-line, -x")} <value> ${i18n.t("cli:help.optionDescriptions.installStatuslineTool")} (${i18n.t("cli:help.defaults.prefix")} true)`
|
|
2773
2773
|
].join("\n")
|
|
@@ -2826,7 +2826,7 @@ async function setupCommands(cli) {
|
|
|
2826
2826
|
cli.command("", "Show interactive menu (default)").option("--lang, -l <lang>", "CCJK 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 (clavue, claude-code, codex, grok, cv, cc, cx, gk)").action(await withLanguageResolution(async (options) => {
|
|
2827
2827
|
await showMainMenu({ codeType: options.codeType });
|
|
2828
2828
|
}, true));
|
|
2829
|
-
cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "CCJK 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-haiku-model, -H <model>", "Default Haiku model (e.g., claude-haiku-4-5)").option("--api-sonnet-model, -S <model>", "Default Sonnet model (e.g., claude-sonnet-4-5)").option("--api-opus-model, -O <model>", "Default Opus model (e.g., claude-opus-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 (
|
|
2829
|
+
cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "CCJK 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-haiku-model, -H <model>", "Default Haiku model (e.g., claude-haiku-4-5)").option("--api-sonnet-model, -S <model>", "Default Sonnet model (e.g., claude-sonnet-4-5)").option("--api-opus-model, -O <model>", "Default Opus model (e.g., claude-opus-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 (linus-mode,uncle-bob-mode,dhh-mode,carmack-mode,jobs-mode,evan-you-mode,default,explanatory,learning), "skip" to skip all, "all" for zcf curated styles, ${i18n.t("cli:help.defaults.prefix")} none`).option("--default-output-style, -d <style>", `Default output style (or "none" to keep original behavior), ${i18n.t("cli:help.defaults.prefix")} none`).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) => {
|
|
2830
2830
|
await init(options);
|
|
2831
2831
|
}));
|
|
2832
2832
|
cli.command("update", "Update Claude Code prompts only").alias("u").option("--lang, -l <lang>", "CCJK 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) => {
|