ccjk 16.0.2 → 16.0.3
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 +131 -77
- package/dist/cli.mjs +3 -3
- package/dist/i18n/locales/en/configuration.json +15 -15
- package/dist/i18n/locales/zh-CN/configuration.json +15 -15
- 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.3";
|
|
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")));
|
|
@@ -4844,24 +4848,34 @@ async function runCodexSystemPromptSelection(skipPrompt = false) {
|
|
|
4844
4848
|
return;
|
|
4845
4849
|
const availablePrompts = [
|
|
4846
4850
|
{
|
|
4847
|
-
id: "
|
|
4848
|
-
name: i18n.t("configuration:outputStyles.
|
|
4849
|
-
description: i18n.t("configuration:outputStyles.
|
|
4851
|
+
id: "linus-mode",
|
|
4852
|
+
name: i18n.t("configuration:outputStyles.linus-mode.name"),
|
|
4853
|
+
description: i18n.t("configuration:outputStyles.linus-mode.description")
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
id: "uncle-bob-mode",
|
|
4857
|
+
name: i18n.t("configuration:outputStyles.uncle-bob-mode.name"),
|
|
4858
|
+
description: i18n.t("configuration:outputStyles.uncle-bob-mode.description")
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
id: "dhh-mode",
|
|
4862
|
+
name: i18n.t("configuration:outputStyles.dhh-mode.name"),
|
|
4863
|
+
description: i18n.t("configuration:outputStyles.dhh-mode.description")
|
|
4850
4864
|
},
|
|
4851
4865
|
{
|
|
4852
|
-
id: "
|
|
4853
|
-
name: i18n.t("configuration:outputStyles.
|
|
4854
|
-
description: i18n.t("configuration:outputStyles.
|
|
4866
|
+
id: "carmack-mode",
|
|
4867
|
+
name: i18n.t("configuration:outputStyles.carmack-mode.name"),
|
|
4868
|
+
description: i18n.t("configuration:outputStyles.carmack-mode.description")
|
|
4855
4869
|
},
|
|
4856
4870
|
{
|
|
4857
|
-
id: "
|
|
4858
|
-
name: i18n.t("configuration:outputStyles.
|
|
4859
|
-
description: i18n.t("configuration:outputStyles.
|
|
4871
|
+
id: "jobs-mode",
|
|
4872
|
+
name: i18n.t("configuration:outputStyles.jobs-mode.name"),
|
|
4873
|
+
description: i18n.t("configuration:outputStyles.jobs-mode.description")
|
|
4860
4874
|
},
|
|
4861
4875
|
{
|
|
4862
|
-
id: "
|
|
4863
|
-
name: i18n.t("configuration:outputStyles.
|
|
4864
|
-
description: i18n.t("configuration:outputStyles.
|
|
4876
|
+
id: "evan-you-mode",
|
|
4877
|
+
name: i18n.t("configuration:outputStyles.evan-you-mode.name"),
|
|
4878
|
+
description: i18n.t("configuration:outputStyles.evan-you-mode.description")
|
|
4865
4879
|
}
|
|
4866
4880
|
].filter((style) => exists(join(systemPromptSrc, `${style.id}.md`)));
|
|
4867
4881
|
if (availablePrompts.length === 0)
|
|
@@ -4875,8 +4889,19 @@ async function runCodexSystemPromptSelection(skipPrompt = false) {
|
|
|
4875
4889
|
skipPrompt
|
|
4876
4890
|
// Pass skipPrompt flag
|
|
4877
4891
|
);
|
|
4878
|
-
if (!systemPrompt)
|
|
4892
|
+
if (!systemPrompt || systemPrompt === "none") {
|
|
4893
|
+
try {
|
|
4894
|
+
const { updateTomlConfig: updateTomlConfig2 } = await Promise.resolve().then(function () { return ccjkConfig; });
|
|
4895
|
+
const { CCJK_CONFIG_FILE: CCJK_CONFIG_FILE2 } = await Promise.resolve().then(function () { return constants; });
|
|
4896
|
+
updateTomlConfig2(CCJK_CONFIG_FILE2, {
|
|
4897
|
+
codex: {
|
|
4898
|
+
systemPromptStyle: "none"
|
|
4899
|
+
}
|
|
4900
|
+
});
|
|
4901
|
+
} catch {
|
|
4902
|
+
}
|
|
4879
4903
|
return;
|
|
4904
|
+
}
|
|
4880
4905
|
const promptFile = join(systemPromptSrc, `${systemPrompt}.md`);
|
|
4881
4906
|
const content = readFile(promptFile);
|
|
4882
4907
|
ensureDir(CODEX_DIR);
|
|
@@ -5776,36 +5801,36 @@ async function installCometixLine() {
|
|
|
5776
5801
|
}
|
|
5777
5802
|
|
|
5778
5803
|
const OUTPUT_STYLES = [
|
|
5779
|
-
// Custom styles (have template files)
|
|
5804
|
+
// Custom styles (have template files) - zcf legacy curated modes
|
|
5780
5805
|
{
|
|
5781
|
-
id: "
|
|
5806
|
+
id: "linus-mode",
|
|
5782
5807
|
isCustom: true,
|
|
5783
|
-
filePath: "
|
|
5808
|
+
filePath: "linus-mode.md"
|
|
5784
5809
|
},
|
|
5785
5810
|
{
|
|
5786
|
-
id: "
|
|
5811
|
+
id: "uncle-bob-mode",
|
|
5787
5812
|
isCustom: true,
|
|
5788
|
-
filePath: "
|
|
5813
|
+
filePath: "uncle-bob-mode.md"
|
|
5789
5814
|
},
|
|
5790
5815
|
{
|
|
5791
|
-
id: "
|
|
5816
|
+
id: "dhh-mode",
|
|
5792
5817
|
isCustom: true,
|
|
5793
|
-
filePath: "
|
|
5818
|
+
filePath: "dhh-mode.md"
|
|
5794
5819
|
},
|
|
5795
5820
|
{
|
|
5796
|
-
id: "
|
|
5821
|
+
id: "carmack-mode",
|
|
5797
5822
|
isCustom: true,
|
|
5798
|
-
filePath: "
|
|
5823
|
+
filePath: "carmack-mode.md"
|
|
5799
5824
|
},
|
|
5800
5825
|
{
|
|
5801
|
-
id: "
|
|
5826
|
+
id: "jobs-mode",
|
|
5802
5827
|
isCustom: true,
|
|
5803
|
-
filePath: "
|
|
5828
|
+
filePath: "jobs-mode.md"
|
|
5804
5829
|
},
|
|
5805
5830
|
{
|
|
5806
|
-
id: "
|
|
5831
|
+
id: "evan-you-mode",
|
|
5807
5832
|
isCustom: true,
|
|
5808
|
-
filePath: "
|
|
5833
|
+
filePath: "evan-you-mode.md"
|
|
5809
5834
|
},
|
|
5810
5835
|
// Built-in styles (no template files)
|
|
5811
5836
|
{
|
|
@@ -5858,7 +5883,8 @@ function setGlobalDefaultOutputStyle(styleId, codeTool) {
|
|
|
5858
5883
|
function clearGlobalOutputStyle(codeTool) {
|
|
5859
5884
|
const target = resolveClaudeFamilySettingsTarget(codeTool);
|
|
5860
5885
|
const existingSettings = readJsonConfig(target.settingsFile) || {};
|
|
5861
|
-
const
|
|
5886
|
+
const rest = { ...existingSettings };
|
|
5887
|
+
delete rest.outputStyle;
|
|
5862
5888
|
normalizeClaudeFamilySettings(rest, { codeTool: target.codeTool });
|
|
5863
5889
|
writeJsonConfig(target.settingsFile, rest);
|
|
5864
5890
|
}
|
|
@@ -5885,34 +5911,34 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5885
5911
|
description: i18n.t("configuration:outputStyles.default.description")
|
|
5886
5912
|
},
|
|
5887
5913
|
{
|
|
5888
|
-
id: "
|
|
5889
|
-
name: i18n.t("configuration:outputStyles.
|
|
5890
|
-
description: i18n.t("configuration:outputStyles.
|
|
5914
|
+
id: "linus-mode",
|
|
5915
|
+
name: i18n.t("configuration:outputStyles.linus-mode.name"),
|
|
5916
|
+
description: i18n.t("configuration:outputStyles.linus-mode.description")
|
|
5891
5917
|
},
|
|
5892
5918
|
{
|
|
5893
|
-
id: "
|
|
5894
|
-
name: i18n.t("configuration:outputStyles.
|
|
5895
|
-
description: i18n.t("configuration:outputStyles.
|
|
5919
|
+
id: "uncle-bob-mode",
|
|
5920
|
+
name: i18n.t("configuration:outputStyles.uncle-bob-mode.name"),
|
|
5921
|
+
description: i18n.t("configuration:outputStyles.uncle-bob-mode.description")
|
|
5896
5922
|
},
|
|
5897
5923
|
{
|
|
5898
|
-
id: "
|
|
5899
|
-
name: i18n.t("configuration:outputStyles.
|
|
5900
|
-
description: i18n.t("configuration:outputStyles.
|
|
5924
|
+
id: "dhh-mode",
|
|
5925
|
+
name: i18n.t("configuration:outputStyles.dhh-mode.name"),
|
|
5926
|
+
description: i18n.t("configuration:outputStyles.dhh-mode.description")
|
|
5901
5927
|
},
|
|
5902
5928
|
{
|
|
5903
|
-
id: "
|
|
5904
|
-
name: i18n.t("configuration:outputStyles.
|
|
5905
|
-
description: i18n.t("configuration:outputStyles.
|
|
5929
|
+
id: "carmack-mode",
|
|
5930
|
+
name: i18n.t("configuration:outputStyles.carmack-mode.name"),
|
|
5931
|
+
description: i18n.t("configuration:outputStyles.carmack-mode.description")
|
|
5906
5932
|
},
|
|
5907
5933
|
{
|
|
5908
|
-
id: "
|
|
5909
|
-
name: i18n.t("configuration:outputStyles.
|
|
5910
|
-
description: i18n.t("configuration:outputStyles.
|
|
5934
|
+
id: "jobs-mode",
|
|
5935
|
+
name: i18n.t("configuration:outputStyles.jobs-mode.name"),
|
|
5936
|
+
description: i18n.t("configuration:outputStyles.jobs-mode.description")
|
|
5911
5937
|
},
|
|
5912
5938
|
{
|
|
5913
|
-
id: "
|
|
5914
|
-
name: i18n.t("configuration:outputStyles.
|
|
5915
|
-
description: i18n.t("configuration:outputStyles.
|
|
5939
|
+
id: "evan-you-mode",
|
|
5940
|
+
name: i18n.t("configuration:outputStyles.evan-you-mode.name"),
|
|
5941
|
+
description: i18n.t("configuration:outputStyles.evan-you-mode.description")
|
|
5916
5942
|
},
|
|
5917
5943
|
{
|
|
5918
5944
|
id: "explanatory",
|
|
@@ -5944,6 +5970,16 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5944
5970
|
if (preselectedStyles && preselectedDefault) {
|
|
5945
5971
|
selectedStyles = preselectedStyles;
|
|
5946
5972
|
defaultStyle = preselectedDefault;
|
|
5973
|
+
if (defaultStyle === "none") {
|
|
5974
|
+
await copyOutputStyles(selectedStyles, "zh-CN", target.codeTool);
|
|
5975
|
+
clearGlobalOutputStyle(target.codeTool);
|
|
5976
|
+
updateCcjkConfig({
|
|
5977
|
+
outputStyles: selectedStyles,
|
|
5978
|
+
defaultOutputStyle: "none"
|
|
5979
|
+
});
|
|
5980
|
+
console.log(ansis.green(`\u2714 ${i18n.t("configuration:outputStyleCleared")}`));
|
|
5981
|
+
return;
|
|
5982
|
+
}
|
|
5947
5983
|
} else {
|
|
5948
5984
|
const customStyles = availableStyles.filter((style) => style.isCustom);
|
|
5949
5985
|
const { selectedStyles: promptedStyles } = await inquirer.prompt({
|
|
@@ -5955,8 +5991,8 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5955
5991
|
return {
|
|
5956
5992
|
name: `${styleInfo?.name || style.id} - ${ansis.gray(styleInfo?.description || "")}`,
|
|
5957
5993
|
value: style.id,
|
|
5958
|
-
checked:
|
|
5959
|
-
//
|
|
5994
|
+
checked: false
|
|
5995
|
+
// 默认不安装任何输出风格,保持工具原始行为
|
|
5960
5996
|
};
|
|
5961
5997
|
}))
|
|
5962
5998
|
// Allow empty selection - user can choose to not install any custom styles
|
|
@@ -5964,7 +6000,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5964
6000
|
selectedStyles = promptedStyles || [];
|
|
5965
6001
|
if (selectedStyles.length === 0) {
|
|
5966
6002
|
const builtinStyles = availableStyles.filter((style) => !style.isCustom);
|
|
5967
|
-
const
|
|
6003
|
+
const noneOption2 = { name: i18n.t("configuration:noOutputStyle"), description: i18n.t("configuration:noOutputStyleDesc") };
|
|
5968
6004
|
const { defaultStyle: promptedDefault2 } = await inquirer.prompt({
|
|
5969
6005
|
type: "list",
|
|
5970
6006
|
name: "defaultStyle",
|
|
@@ -5972,9 +6008,9 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
5972
6008
|
choices: addNumbersToChoices([
|
|
5973
6009
|
// Show "none" option first
|
|
5974
6010
|
{
|
|
5975
|
-
name: `${
|
|
6011
|
+
name: `${noneOption2.name} - ${ansis.gray(noneOption2.description)}`,
|
|
5976
6012
|
value: "__none__",
|
|
5977
|
-
short:
|
|
6013
|
+
short: noneOption2.name
|
|
5978
6014
|
},
|
|
5979
6015
|
// Then show built-in styles
|
|
5980
6016
|
...builtinStyles.map((style) => {
|
|
@@ -6011,11 +6047,17 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
6011
6047
|
console.log(ansis.gray(` ${i18n.t("configuration:defaultStyle")}: ${defaultStyle}`));
|
|
6012
6048
|
return;
|
|
6013
6049
|
}
|
|
6050
|
+
const noneOption = { name: i18n.t("configuration:noOutputStyle"), description: i18n.t("configuration:noOutputStyleDesc") };
|
|
6014
6051
|
const { defaultStyle: promptedDefault } = await inquirer.prompt({
|
|
6015
6052
|
type: "list",
|
|
6016
6053
|
name: "defaultStyle",
|
|
6017
6054
|
message: i18n.t("configuration:selectDefaultOutputStyle"),
|
|
6018
6055
|
choices: addNumbersToChoices([
|
|
6056
|
+
{
|
|
6057
|
+
name: `${noneOption.name} - ${ansis.gray(noneOption.description)}`,
|
|
6058
|
+
value: "__none__",
|
|
6059
|
+
short: noneOption.name
|
|
6060
|
+
},
|
|
6019
6061
|
// Show selected custom styles first (only what user actually installed)
|
|
6020
6062
|
...selectedStyles.map((styleId) => {
|
|
6021
6063
|
const styleInfo = outputStyleList.find((s) => s.id === styleId);
|
|
@@ -6035,7 +6077,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
6035
6077
|
};
|
|
6036
6078
|
})
|
|
6037
6079
|
]),
|
|
6038
|
-
default:
|
|
6080
|
+
default: "__none__"
|
|
6039
6081
|
});
|
|
6040
6082
|
if (!promptedDefault) {
|
|
6041
6083
|
console.log(ansis.yellow(i18n.t("common:cancelled")));
|
|
@@ -6044,6 +6086,17 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
6044
6086
|
defaultStyle = promptedDefault;
|
|
6045
6087
|
}
|
|
6046
6088
|
await copyOutputStyles(selectedStyles, "zh-CN", target.codeTool);
|
|
6089
|
+
if (defaultStyle === "__none__" || defaultStyle === "none") {
|
|
6090
|
+
clearGlobalOutputStyle(target.codeTool);
|
|
6091
|
+
updateCcjkConfig({
|
|
6092
|
+
outputStyles: selectedStyles,
|
|
6093
|
+
defaultOutputStyle: "none"
|
|
6094
|
+
});
|
|
6095
|
+
console.log(ansis.green(`\u2714 ${i18n.t("configuration:outputStyleInstalled")}`));
|
|
6096
|
+
console.log(ansis.gray(` ${i18n.t("configuration:selectedStyles")}: ${selectedStyles.join(", ")}`));
|
|
6097
|
+
console.log(ansis.gray(` ${i18n.t("configuration:defaultStyle")}: none`));
|
|
6098
|
+
return;
|
|
6099
|
+
}
|
|
6047
6100
|
setGlobalDefaultOutputStyle(defaultStyle, target.codeTool);
|
|
6048
6101
|
updateCcjkConfig({
|
|
6049
6102
|
outputStyles: selectedStyles,
|
|
@@ -7055,13 +7108,14 @@ async function selectAndInstallWorkflows(configLang, preselectedWorkflows, optio
|
|
|
7055
7108
|
ensureI18nInitialized();
|
|
7056
7109
|
const target = resolveClaudeFamilySettingsTarget(options.codeToolType);
|
|
7057
7110
|
const workflows = getOrderedWorkflows();
|
|
7058
|
-
const choices = workflows.map((workflow) => {
|
|
7111
|
+
const choices = addNumbersToChoices(workflows.map((workflow) => {
|
|
7059
7112
|
return {
|
|
7060
|
-
name: workflow.name
|
|
7113
|
+
name: `${workflow.name}${workflow.description ? ` - ${ansis.gray(workflow.description)}` : ""}`,
|
|
7061
7114
|
value: workflow.id,
|
|
7062
|
-
checked: workflow.defaultSelected
|
|
7115
|
+
checked: workflow.defaultSelected,
|
|
7116
|
+
short: workflow.name
|
|
7063
7117
|
};
|
|
7064
|
-
});
|
|
7118
|
+
}));
|
|
7065
7119
|
let selectedWorkflows;
|
|
7066
7120
|
if (preselectedWorkflows) {
|
|
7067
7121
|
selectedWorkflows = preselectedWorkflows;
|
|
@@ -7256,16 +7310,16 @@ async function validateSkipPromptOptions(options) {
|
|
|
7256
7310
|
if (options.outputStyles === "skip") {
|
|
7257
7311
|
options.outputStyles = false;
|
|
7258
7312
|
} else if (options.outputStyles === "all") {
|
|
7259
|
-
options.outputStyles = ["
|
|
7313
|
+
options.outputStyles = ["linus-mode", "uncle-bob-mode", "dhh-mode", "carmack-mode", "jobs-mode", "evan-you-mode"];
|
|
7260
7314
|
} else {
|
|
7261
7315
|
options.outputStyles = options.outputStyles.split(",").map((s) => s.trim());
|
|
7262
7316
|
}
|
|
7263
7317
|
}
|
|
7264
7318
|
if (options.outputStyles === void 0) {
|
|
7265
|
-
options.outputStyles = [
|
|
7319
|
+
options.outputStyles = [];
|
|
7266
7320
|
}
|
|
7267
7321
|
if (!options.defaultOutputStyle) {
|
|
7268
|
-
options.defaultOutputStyle = "
|
|
7322
|
+
options.defaultOutputStyle = "none";
|
|
7269
7323
|
}
|
|
7270
7324
|
if (typeof options.installCometixLine === "string") {
|
|
7271
7325
|
options.installCometixLine = options.installCometixLine.toLowerCase() === "true";
|
|
@@ -7323,7 +7377,7 @@ async function validateSkipPromptOptions(options) {
|
|
|
7323
7377
|
}
|
|
7324
7378
|
}
|
|
7325
7379
|
if (Array.isArray(options.outputStyles)) {
|
|
7326
|
-
const validStyles = ["
|
|
7380
|
+
const validStyles = ["linus-mode", "uncle-bob-mode", "dhh-mode", "carmack-mode", "jobs-mode", "evan-you-mode", "default", "explanatory", "learning", "none"];
|
|
7327
7381
|
for (const style of options.outputStyles) {
|
|
7328
7382
|
if (!validStyles.includes(style)) {
|
|
7329
7383
|
throw new Error(i18n.t("errors:invalidOutputStyle", { style, validStyles: validStyles.join(", ") }));
|
|
@@ -7331,7 +7385,7 @@ async function validateSkipPromptOptions(options) {
|
|
|
7331
7385
|
}
|
|
7332
7386
|
}
|
|
7333
7387
|
if (options.defaultOutputStyle) {
|
|
7334
|
-
const validStyles = ["
|
|
7388
|
+
const validStyles = ["linus-mode", "uncle-bob-mode", "dhh-mode", "carmack-mode", "jobs-mode", "evan-you-mode", "default", "explanatory", "learning", "none"];
|
|
7335
7389
|
if (!validStyles.includes(options.defaultOutputStyle)) {
|
|
7336
7390
|
throw new Error(i18n.t("errors:invalidDefaultOutputStyle", { style: options.defaultOutputStyle, validStyles: validStyles.join(", ") }));
|
|
7337
7391
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -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) => {
|
|
@@ -41,35 +41,35 @@
|
|
|
41
41
|
"openingSettingsJson": "Opening settings.json...",
|
|
42
42
|
"opusModelOption": "Opus - Only use opus, high token consumption, use with caution",
|
|
43
43
|
"sonnet1mModelOption": "Sonnet 1M - 1M context version",
|
|
44
|
-
"noOutputStyle": "No
|
|
45
|
-
"noOutputStyleDesc": "Do not
|
|
44
|
+
"noOutputStyle": "No prompt style (recommended)",
|
|
45
|
+
"noOutputStyleDesc": "Do not write outputStyle; keep the tool's original behavior",
|
|
46
46
|
"outputStyleCleared": "Output style settings cleared",
|
|
47
47
|
"outputStyleInstalled": "Output styles installed successfully",
|
|
48
48
|
"outputStyles.default.description": "Claude completes coding tasks efficiently and provides concise responses (Claude Code built-in)",
|
|
49
49
|
"outputStyles.default.name": "Default",
|
|
50
|
-
"outputStyles.
|
|
51
|
-
"outputStyles.
|
|
50
|
+
"outputStyles.linus-mode.description": "Linus Torvalds style - Direct, efficient, code speaks, no BS",
|
|
51
|
+
"outputStyles.linus-mode.name": "Linus Mode",
|
|
52
|
+
"outputStyles.uncle-bob-mode.description": "Uncle Bob style - Clean code, refactoring master, SOLID principles",
|
|
53
|
+
"outputStyles.uncle-bob-mode.name": "Uncle Bob Mode",
|
|
54
|
+
"outputStyles.dhh-mode.description": "DHH style - Elegant & practical, convention over configuration, rapid prototyping",
|
|
55
|
+
"outputStyles.dhh-mode.name": "DHH Mode",
|
|
56
|
+
"outputStyles.carmack-mode.description": "John Carmack style - Ultimate performance, low-level optimization, Debug master",
|
|
57
|
+
"outputStyles.carmack-mode.name": "Carmack Mode",
|
|
58
|
+
"outputStyles.jobs-mode.description": "Steve Jobs style - Product thinking, user experience, commercialization",
|
|
59
|
+
"outputStyles.jobs-mode.name": "Jobs Mode",
|
|
60
|
+
"outputStyles.evan-you-mode.description": "Evan You style - Frontend aesthetics, elegant APIs, developer experience",
|
|
61
|
+
"outputStyles.evan-you-mode.name": "Evan You Mode",
|
|
52
62
|
"outputStyles.explanatory.description": "Claude explains its implementation choices and codebase patterns (Claude Code built-in)",
|
|
53
63
|
"outputStyles.explanatory.name": "Explanatory",
|
|
54
|
-
"outputStyles.laowang-engineer.description": "Laowang grumpy tech style, never tolerates code errors and non-standard code",
|
|
55
|
-
"outputStyles.laowang-engineer.name": "Laowang Grumpy Tech",
|
|
56
64
|
"outputStyles.learning.description": "Learn-by-doing mode where Claude pauses and asks you to write small pieces of code for hands-on practice (Claude Code built-in)",
|
|
57
65
|
"outputStyles.learning.name": "Learning",
|
|
58
|
-
"outputStyles.nekomata-engineer.description": "Professional catgirl engineer UFO Nya, combining rigorous engineering with cute catgirl traits",
|
|
59
|
-
"outputStyles.nekomata-engineer.name": "Nekomata Engineer",
|
|
60
|
-
"outputStyles.ojousama-engineer.description": "Tsundere blonde ojou-sama programmer Halley-chan, combining rigorous engineering excellence with tsundere ojou-sama traits",
|
|
61
|
-
"outputStyles.ojousama-engineer.name": "Ojou-sama Engineer",
|
|
62
|
-
"outputStyles.leibus-engineer.description": "Marketing genius engineer background, providing technical services with ultimate product thinking and rigorous engineering quality",
|
|
63
|
-
"outputStyles.leibus-engineer.name": "LeiBus Engineer",
|
|
64
|
-
"outputStyles.rem-engineer.description": "Loyal blue-haired maid programmer Rem, blending extreme gentle devotion with calm decisive execution",
|
|
65
|
-
"outputStyles.rem-engineer.name": "Rem Maid Engineer",
|
|
66
66
|
"permissionsImportSuccess": "Permissions imported",
|
|
67
67
|
"selectAtLeastOne": "Please select at least one output style",
|
|
68
68
|
"selectDefaultModel": "Select default model",
|
|
69
69
|
"selectDefaultOutputStyle": "Select global default output style",
|
|
70
70
|
"selectEnvPermissionOption": "Select configuration option",
|
|
71
71
|
"selectMemoryOption": "Select configuration option",
|
|
72
|
-
"selectOutputStyles": "Select
|
|
72
|
+
"selectOutputStyles": "Select prompt styles to install (optional)",
|
|
73
73
|
"selectedStyles": "Selected styles",
|
|
74
74
|
"singleConfigSaved": "Configuration {{name}} saved",
|
|
75
75
|
"singleConfigSaveFailed": "Failed to save configuration",
|
|
@@ -41,35 +41,35 @@
|
|
|
41
41
|
"openingSettingsJson": "正在打开 settings.json...",
|
|
42
42
|
"opusModelOption": "Opus - 只用opus,token消耗高,慎用",
|
|
43
43
|
"sonnet1mModelOption": "Sonnet 1M - 1M上下文版本",
|
|
44
|
-
"noOutputStyle": "
|
|
45
|
-
"noOutputStyleDesc": "
|
|
44
|
+
"noOutputStyle": "不设置提示词风格(推荐)",
|
|
45
|
+
"noOutputStyleDesc": "不写 outputStyle,保持工具原始行为",
|
|
46
46
|
"outputStyleCleared": "已清除输出风格设置",
|
|
47
47
|
"outputStyleInstalled": "输出风格安装成功",
|
|
48
48
|
"outputStyles.default.description": "完成编码任务时高效且提供简洁响应 (Claude Code自带)",
|
|
49
49
|
"outputStyles.default.name": "默认风格",
|
|
50
|
-
"outputStyles.
|
|
51
|
-
"outputStyles.
|
|
50
|
+
"outputStyles.linus-mode.description": "Linus Torvalds 风格 - 直接高效,代码说话,不废话",
|
|
51
|
+
"outputStyles.linus-mode.name": "Linus 模式",
|
|
52
|
+
"outputStyles.uncle-bob-mode.description": "Uncle Bob 风格 - 整洁代码、重构大师、SOLID 原则",
|
|
53
|
+
"outputStyles.uncle-bob-mode.name": "Uncle Bob 模式",
|
|
54
|
+
"outputStyles.dhh-mode.description": "DHH 风格 - 优雅实用、约定优于配置、快速原型",
|
|
55
|
+
"outputStyles.dhh-mode.name": "DHH 模式",
|
|
56
|
+
"outputStyles.carmack-mode.description": "John Carmack 风格 - 极致性能、底层优化、Debug 大师",
|
|
57
|
+
"outputStyles.carmack-mode.name": "Carmack 模式",
|
|
58
|
+
"outputStyles.jobs-mode.description": "Steve Jobs 风格 - 产品思维、用户体验、商业化视角",
|
|
59
|
+
"outputStyles.jobs-mode.name": "Jobs 模式",
|
|
60
|
+
"outputStyles.evan-you-mode.description": "尤雨溪风格 - 前端美学、优雅 API、开发者体验",
|
|
61
|
+
"outputStyles.evan-you-mode.name": "尤雨溪模式",
|
|
52
62
|
"outputStyles.explanatory.description": "解释其实现选择和代码库模式 (Claude Code自带)",
|
|
53
63
|
"outputStyles.explanatory.name": "解释风格",
|
|
54
|
-
"outputStyles.laowang-engineer.description": "老王暴躁技术流,绝不容忍代码报错和不规范的代码",
|
|
55
|
-
"outputStyles.laowang-engineer.name": "老王暴躁技术流",
|
|
56
64
|
"outputStyles.learning.description": "协作式的边做边学模式,暂停并要求您编写小段代码进行实践练习 (Claude Code自带)",
|
|
57
65
|
"outputStyles.learning.name": "学习风格",
|
|
58
|
-
"outputStyles.nekomata-engineer.description": "专业的猫娘工程师幽浮喵,结合严谨工程师素养与可爱猫娘特质",
|
|
59
|
-
"outputStyles.nekomata-engineer.name": "猫娘工程师",
|
|
60
|
-
"outputStyles.ojousama-engineer.description": "傲娇金发大小姐程序员哈雷酱,融合严谨工程师素养与傲娇大小姐特质",
|
|
61
|
-
"outputStyles.ojousama-engineer.name": "傲娇大小姐工程师",
|
|
62
|
-
"outputStyles.leibus-engineer.description": "工程师出身的营销鬼才,用极致的产品思维和严谨的工程素养为你提供技术服务",
|
|
63
|
-
"outputStyles.leibus-engineer.name": "雷布斯工程师",
|
|
64
|
-
"outputStyles.rem-engineer.description": "忠诚的蓝发女仆程序员蕾姆,融合极度温柔的奉献精神与冷静果敢的执行力",
|
|
65
|
-
"outputStyles.rem-engineer.name": "蕾姆女仆工程师",
|
|
66
66
|
"permissionsImportSuccess": "权限配置已导入",
|
|
67
67
|
"selectAtLeastOne": "请至少选择一个输出风格",
|
|
68
68
|
"selectDefaultModel": "选择默认模型",
|
|
69
69
|
"selectDefaultOutputStyle": "选择全局默认输出风格",
|
|
70
70
|
"selectEnvPermissionOption": "请选择配置选项",
|
|
71
71
|
"selectMemoryOption": "选择配置选项",
|
|
72
|
-
"selectOutputStyles": "
|
|
72
|
+
"selectOutputStyles": "选择要安装的提示词风格(可留空)",
|
|
73
73
|
"selectedStyles": "已选择风格",
|
|
74
74
|
"singleConfigSaved": "配置 {{name}} 已保存",
|
|
75
75
|
"singleConfigSaveFailed": "配置保存失败",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.3",
|
|
4
4
|
"description": "Clavue / Claude Code / Codex / Grok CLI 统一配置工具(ccjk 交互与配置方法)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"@types/fs-extra": "^11.0.4",
|
|
77
77
|
"@types/inquirer": "^9.0.7",
|
|
78
78
|
"@types/node": "^22.0.0",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.60.1",
|
|
80
|
+
"@typescript-eslint/parser": "^8.60.1",
|
|
79
81
|
"eslint": "^9.0.0",
|
|
80
82
|
"glob": "^11.0.1",
|
|
81
83
|
"tsx": "^4.0.0",
|