zcf 1.2.0 → 2.0.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 +87 -20
- package/dist/cli.mjs +436 -10
- package/dist/index.d.mts +211 -10
- package/dist/index.d.ts +211 -10
- package/dist/index.mjs +2 -1
- package/dist/shared/zcf.DGNSM22u.mjs +1661 -0
- package/package.json +2 -2
- package/templates/CLAUDE.md +7 -0
- package/templates/en/mcp.md +6 -0
- package/templates/en/personality.md +1 -0
- package/templates/en/{CLAUDE.md → rules.md} +1 -10
- package/templates/zh-CN/mcp.md +6 -0
- package/templates/zh-CN/personality.md +1 -0
- package/templates/zh-CN/{CLAUDE.md → rules.md} +6 -15
- package/dist/shared/zcf.D3MMT8L8.mjs +0 -988
package/dist/index.d.mts
CHANGED
|
@@ -79,6 +79,23 @@ declare const I18N: {
|
|
|
79
79
|
enterApiUrl: string;
|
|
80
80
|
enterAuthToken: string;
|
|
81
81
|
enterApiKey: string;
|
|
82
|
+
existingApiConfig: string;
|
|
83
|
+
apiConfigUrl: string;
|
|
84
|
+
apiConfigKey: string;
|
|
85
|
+
apiConfigAuthType: string;
|
|
86
|
+
selectApiAction: string;
|
|
87
|
+
keepExistingConfig: string;
|
|
88
|
+
modifyAllConfig: string;
|
|
89
|
+
modifyPartialConfig: string;
|
|
90
|
+
selectModifyItems: string;
|
|
91
|
+
modifyApiUrl: string;
|
|
92
|
+
modifyApiKey: string;
|
|
93
|
+
modifyAuthType: string;
|
|
94
|
+
continueModification: string;
|
|
95
|
+
modificationSaved: string;
|
|
96
|
+
enterNewApiUrl: string;
|
|
97
|
+
enterNewApiKey: string;
|
|
98
|
+
selectNewAuthType: string;
|
|
82
99
|
existingConfig: string;
|
|
83
100
|
backupAndOverwrite: string;
|
|
84
101
|
updateDocsOnly: string;
|
|
@@ -103,9 +120,6 @@ declare const I18N: {
|
|
|
103
120
|
cancelled: string;
|
|
104
121
|
apiKeyValidation: {
|
|
105
122
|
empty: string;
|
|
106
|
-
invalid: string;
|
|
107
|
-
tooShort: string;
|
|
108
|
-
tooLong: string;
|
|
109
123
|
example: string;
|
|
110
124
|
};
|
|
111
125
|
noExistingConfig: string;
|
|
@@ -115,6 +129,85 @@ declare const I18N: {
|
|
|
115
129
|
'zh-CN': string;
|
|
116
130
|
en: string;
|
|
117
131
|
};
|
|
132
|
+
selectFunction: string;
|
|
133
|
+
enterChoice: string;
|
|
134
|
+
menuOptions: {
|
|
135
|
+
fullInit: string;
|
|
136
|
+
importWorkflow: string;
|
|
137
|
+
configureApi: string;
|
|
138
|
+
configureMcp: string;
|
|
139
|
+
configureModel: string;
|
|
140
|
+
configureAiMemory: string;
|
|
141
|
+
clearCache: string;
|
|
142
|
+
changeLanguage: string;
|
|
143
|
+
exit: string;
|
|
144
|
+
};
|
|
145
|
+
menuDescriptions: {
|
|
146
|
+
fullInit: string;
|
|
147
|
+
importWorkflow: string;
|
|
148
|
+
configureApi: string;
|
|
149
|
+
configureMcp: string;
|
|
150
|
+
configureModel: string;
|
|
151
|
+
configureAiMemory: string;
|
|
152
|
+
clearCache: string;
|
|
153
|
+
changeLanguage: string;
|
|
154
|
+
};
|
|
155
|
+
returnToMenu: string;
|
|
156
|
+
goodbye: string;
|
|
157
|
+
selectDefaultModel: string;
|
|
158
|
+
modelConfigSuccess: string;
|
|
159
|
+
selectMemoryOption: string;
|
|
160
|
+
configureAiLanguage: string;
|
|
161
|
+
configureAiPersonality: string;
|
|
162
|
+
aiLanguageConfigured: string;
|
|
163
|
+
selectAiPersonality: string;
|
|
164
|
+
customPersonalityHint: string;
|
|
165
|
+
enterCustomPersonality: string;
|
|
166
|
+
personalityConfigured: string;
|
|
167
|
+
existingPersonality: string;
|
|
168
|
+
currentPersonality: string;
|
|
169
|
+
modifyPersonality: string;
|
|
170
|
+
keepPersonality: string;
|
|
171
|
+
confirmClearCache: string;
|
|
172
|
+
cacheCleared: string;
|
|
173
|
+
noCacheFound: string;
|
|
174
|
+
languageChanged: string;
|
|
175
|
+
fixWindowsMcp: string;
|
|
176
|
+
fixWindowsMcpDesc: string;
|
|
177
|
+
windowsMcpFixed: string;
|
|
178
|
+
configureMcpServices: string;
|
|
179
|
+
selectMcpOption: string;
|
|
180
|
+
invalidChoice: string;
|
|
181
|
+
urlRequired: string;
|
|
182
|
+
invalidUrl: string;
|
|
183
|
+
keyRequired: string;
|
|
184
|
+
invalidKeyFormat: string;
|
|
185
|
+
directiveCannotBeEmpty: string;
|
|
186
|
+
languageRequired: string;
|
|
187
|
+
failedToSetOnboarding: string;
|
|
188
|
+
failedToWriteMcpConfig: string;
|
|
189
|
+
templateDirNotFound: string;
|
|
190
|
+
failedToReadTemplateSettings: string;
|
|
191
|
+
failedToMergeSettings: string;
|
|
192
|
+
preservingExistingSettings: string;
|
|
193
|
+
failedToReadFile: string;
|
|
194
|
+
failedToWriteFile: string;
|
|
195
|
+
failedToCopyFile: string;
|
|
196
|
+
failedToReadDirectory: string;
|
|
197
|
+
failedToGetStats: string;
|
|
198
|
+
sourceDirNotExist: string;
|
|
199
|
+
invalidConfiguration: string;
|
|
200
|
+
failedToParseJson: string;
|
|
201
|
+
failedToBackupConfig: string;
|
|
202
|
+
failedToAddOnboardingFlag: string;
|
|
203
|
+
failedToApplyPersonality: string;
|
|
204
|
+
notConfigured: string;
|
|
205
|
+
none: string;
|
|
206
|
+
runFullInit: string;
|
|
207
|
+
forceOverwrite: string;
|
|
208
|
+
initClaudeConfig: string;
|
|
209
|
+
updatePromptsOnly: string;
|
|
210
|
+
spaceToSelectReturn: string;
|
|
118
211
|
};
|
|
119
212
|
en: {
|
|
120
213
|
selectScriptLang: string;
|
|
@@ -140,6 +233,23 @@ declare const I18N: {
|
|
|
140
233
|
enterApiUrl: string;
|
|
141
234
|
enterAuthToken: string;
|
|
142
235
|
enterApiKey: string;
|
|
236
|
+
existingApiConfig: string;
|
|
237
|
+
apiConfigUrl: string;
|
|
238
|
+
apiConfigKey: string;
|
|
239
|
+
apiConfigAuthType: string;
|
|
240
|
+
selectApiAction: string;
|
|
241
|
+
keepExistingConfig: string;
|
|
242
|
+
modifyAllConfig: string;
|
|
243
|
+
modifyPartialConfig: string;
|
|
244
|
+
selectModifyItems: string;
|
|
245
|
+
modifyApiUrl: string;
|
|
246
|
+
modifyApiKey: string;
|
|
247
|
+
modifyAuthType: string;
|
|
248
|
+
continueModification: string;
|
|
249
|
+
modificationSaved: string;
|
|
250
|
+
enterNewApiUrl: string;
|
|
251
|
+
enterNewApiKey: string;
|
|
252
|
+
selectNewAuthType: string;
|
|
143
253
|
existingConfig: string;
|
|
144
254
|
backupAndOverwrite: string;
|
|
145
255
|
updateDocsOnly: string;
|
|
@@ -164,9 +274,6 @@ declare const I18N: {
|
|
|
164
274
|
cancelled: string;
|
|
165
275
|
apiKeyValidation: {
|
|
166
276
|
empty: string;
|
|
167
|
-
invalid: string;
|
|
168
|
-
tooShort: string;
|
|
169
|
-
tooLong: string;
|
|
170
277
|
example: string;
|
|
171
278
|
};
|
|
172
279
|
noExistingConfig: string;
|
|
@@ -176,6 +283,85 @@ declare const I18N: {
|
|
|
176
283
|
'zh-CN': string;
|
|
177
284
|
en: string;
|
|
178
285
|
};
|
|
286
|
+
selectFunction: string;
|
|
287
|
+
enterChoice: string;
|
|
288
|
+
menuOptions: {
|
|
289
|
+
fullInit: string;
|
|
290
|
+
importWorkflow: string;
|
|
291
|
+
configureApi: string;
|
|
292
|
+
configureMcp: string;
|
|
293
|
+
configureModel: string;
|
|
294
|
+
configureAiMemory: string;
|
|
295
|
+
clearCache: string;
|
|
296
|
+
changeLanguage: string;
|
|
297
|
+
exit: string;
|
|
298
|
+
};
|
|
299
|
+
menuDescriptions: {
|
|
300
|
+
fullInit: string;
|
|
301
|
+
importWorkflow: string;
|
|
302
|
+
configureApi: string;
|
|
303
|
+
configureMcp: string;
|
|
304
|
+
configureModel: string;
|
|
305
|
+
configureAiMemory: string;
|
|
306
|
+
clearCache: string;
|
|
307
|
+
changeLanguage: string;
|
|
308
|
+
};
|
|
309
|
+
returnToMenu: string;
|
|
310
|
+
goodbye: string;
|
|
311
|
+
selectDefaultModel: string;
|
|
312
|
+
modelConfigSuccess: string;
|
|
313
|
+
selectMemoryOption: string;
|
|
314
|
+
configureAiLanguage: string;
|
|
315
|
+
configureAiPersonality: string;
|
|
316
|
+
aiLanguageConfigured: string;
|
|
317
|
+
selectAiPersonality: string;
|
|
318
|
+
customPersonalityHint: string;
|
|
319
|
+
enterCustomPersonality: string;
|
|
320
|
+
personalityConfigured: string;
|
|
321
|
+
existingPersonality: string;
|
|
322
|
+
currentPersonality: string;
|
|
323
|
+
modifyPersonality: string;
|
|
324
|
+
keepPersonality: string;
|
|
325
|
+
confirmClearCache: string;
|
|
326
|
+
cacheCleared: string;
|
|
327
|
+
noCacheFound: string;
|
|
328
|
+
languageChanged: string;
|
|
329
|
+
fixWindowsMcp: string;
|
|
330
|
+
fixWindowsMcpDesc: string;
|
|
331
|
+
windowsMcpFixed: string;
|
|
332
|
+
configureMcpServices: string;
|
|
333
|
+
selectMcpOption: string;
|
|
334
|
+
invalidChoice: string;
|
|
335
|
+
urlRequired: string;
|
|
336
|
+
invalidUrl: string;
|
|
337
|
+
keyRequired: string;
|
|
338
|
+
invalidKeyFormat: string;
|
|
339
|
+
directiveCannotBeEmpty: string;
|
|
340
|
+
languageRequired: string;
|
|
341
|
+
failedToSetOnboarding: string;
|
|
342
|
+
failedToWriteMcpConfig: string;
|
|
343
|
+
templateDirNotFound: string;
|
|
344
|
+
failedToReadTemplateSettings: string;
|
|
345
|
+
failedToMergeSettings: string;
|
|
346
|
+
preservingExistingSettings: string;
|
|
347
|
+
failedToReadFile: string;
|
|
348
|
+
failedToWriteFile: string;
|
|
349
|
+
failedToCopyFile: string;
|
|
350
|
+
failedToReadDirectory: string;
|
|
351
|
+
failedToGetStats: string;
|
|
352
|
+
sourceDirNotExist: string;
|
|
353
|
+
invalidConfiguration: string;
|
|
354
|
+
failedToParseJson: string;
|
|
355
|
+
failedToBackupConfig: string;
|
|
356
|
+
failedToAddOnboardingFlag: string;
|
|
357
|
+
failedToApplyPersonality: string;
|
|
358
|
+
notConfigured: string;
|
|
359
|
+
none: string;
|
|
360
|
+
runFullInit: string;
|
|
361
|
+
forceOverwrite: string;
|
|
362
|
+
initClaudeConfig: string;
|
|
363
|
+
updatePromptsOnly: string;
|
|
364
|
+
spaceToSelectReturn: string;
|
|
179
365
|
};
|
|
180
366
|
};
|
|
181
367
|
declare const MCP_SERVICES: McpService[];
|
|
@@ -185,6 +371,7 @@ interface InitOptions {
|
|
|
185
371
|
configLang?: SupportedLang;
|
|
186
372
|
aiOutputLang?: AiOutputLanguage | string;
|
|
187
373
|
force?: boolean;
|
|
374
|
+
skipBanner?: boolean;
|
|
188
375
|
}
|
|
189
376
|
declare function init(options?: InitOptions): Promise<void>;
|
|
190
377
|
|
|
@@ -194,16 +381,30 @@ declare function commandExists(command: string): Promise<boolean>;
|
|
|
194
381
|
declare function isClaudeCodeInstalled(): Promise<boolean>;
|
|
195
382
|
declare function installClaudeCode(lang: SupportedLang): Promise<void>;
|
|
196
383
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
384
|
+
/**
|
|
385
|
+
* API configuration for Claude Code
|
|
386
|
+
*/
|
|
200
387
|
interface ApiConfig {
|
|
201
388
|
url: string;
|
|
202
389
|
key: string;
|
|
203
390
|
authType?: 'auth_token' | 'api_key';
|
|
204
391
|
}
|
|
392
|
+
|
|
393
|
+
declare function ensureClaudeDir(): void;
|
|
394
|
+
declare function backupExistingConfig(): string | null;
|
|
395
|
+
declare function copyConfigFiles(lang: SupportedLang, onlyMd?: boolean): void;
|
|
205
396
|
declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
|
|
206
397
|
declare function mergeConfigs(sourceFile: string, targetFile: string): void;
|
|
398
|
+
declare function updateDefaultModel(model: 'opus' | 'sonnet'): void;
|
|
399
|
+
/**
|
|
400
|
+
* Merge settings.json intelligently
|
|
401
|
+
* Preserves user's environment variables and custom configurations
|
|
402
|
+
*/
|
|
403
|
+
declare function mergeSettingsFile(templatePath: string, targetPath: string): void;
|
|
404
|
+
/**
|
|
405
|
+
* Get existing API configuration from settings.json
|
|
406
|
+
*/
|
|
407
|
+
declare function getExistingApiConfig(): ApiConfig | null;
|
|
207
408
|
declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
|
|
208
409
|
|
|
209
410
|
declare function getMcpConfigPath(): string;
|
|
@@ -215,5 +416,5 @@ declare function buildMcpServerConfig(baseConfig: McpServerConfig, apiKey?: stri
|
|
|
215
416
|
declare function fixWindowsMcpConfig(config: ClaudeConfiguration): ClaudeConfiguration;
|
|
216
417
|
declare function addCompletedOnboarding(): void;
|
|
217
418
|
|
|
218
|
-
export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, ClAUDE_CONFIG_FILE, I18N, LANG_LABELS, MCP_SERVICES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, commandExists, configureApi, copyConfigFiles, ensureClaudeDir, fixWindowsMcpConfig, getMcpConfigPath, getPlatform, init, installClaudeCode, isClaudeCodeInstalled, mergeConfigs, mergeMcpServers, readMcpConfig, writeMcpConfig };
|
|
419
|
+
export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, ClAUDE_CONFIG_FILE, I18N, LANG_LABELS, MCP_SERVICES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, commandExists, configureApi, copyConfigFiles, ensureClaudeDir, fixWindowsMcpConfig, getExistingApiConfig, getMcpConfigPath, getPlatform, init, installClaudeCode, isClaudeCodeInstalled, mergeConfigs, mergeMcpServers, mergeSettingsFile, readMcpConfig, updateDefaultModel, writeMcpConfig };
|
|
219
420
|
export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, McpServerConfig, McpService, SupportedLang };
|
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,23 @@ declare const I18N: {
|
|
|
79
79
|
enterApiUrl: string;
|
|
80
80
|
enterAuthToken: string;
|
|
81
81
|
enterApiKey: string;
|
|
82
|
+
existingApiConfig: string;
|
|
83
|
+
apiConfigUrl: string;
|
|
84
|
+
apiConfigKey: string;
|
|
85
|
+
apiConfigAuthType: string;
|
|
86
|
+
selectApiAction: string;
|
|
87
|
+
keepExistingConfig: string;
|
|
88
|
+
modifyAllConfig: string;
|
|
89
|
+
modifyPartialConfig: string;
|
|
90
|
+
selectModifyItems: string;
|
|
91
|
+
modifyApiUrl: string;
|
|
92
|
+
modifyApiKey: string;
|
|
93
|
+
modifyAuthType: string;
|
|
94
|
+
continueModification: string;
|
|
95
|
+
modificationSaved: string;
|
|
96
|
+
enterNewApiUrl: string;
|
|
97
|
+
enterNewApiKey: string;
|
|
98
|
+
selectNewAuthType: string;
|
|
82
99
|
existingConfig: string;
|
|
83
100
|
backupAndOverwrite: string;
|
|
84
101
|
updateDocsOnly: string;
|
|
@@ -103,9 +120,6 @@ declare const I18N: {
|
|
|
103
120
|
cancelled: string;
|
|
104
121
|
apiKeyValidation: {
|
|
105
122
|
empty: string;
|
|
106
|
-
invalid: string;
|
|
107
|
-
tooShort: string;
|
|
108
|
-
tooLong: string;
|
|
109
123
|
example: string;
|
|
110
124
|
};
|
|
111
125
|
noExistingConfig: string;
|
|
@@ -115,6 +129,85 @@ declare const I18N: {
|
|
|
115
129
|
'zh-CN': string;
|
|
116
130
|
en: string;
|
|
117
131
|
};
|
|
132
|
+
selectFunction: string;
|
|
133
|
+
enterChoice: string;
|
|
134
|
+
menuOptions: {
|
|
135
|
+
fullInit: string;
|
|
136
|
+
importWorkflow: string;
|
|
137
|
+
configureApi: string;
|
|
138
|
+
configureMcp: string;
|
|
139
|
+
configureModel: string;
|
|
140
|
+
configureAiMemory: string;
|
|
141
|
+
clearCache: string;
|
|
142
|
+
changeLanguage: string;
|
|
143
|
+
exit: string;
|
|
144
|
+
};
|
|
145
|
+
menuDescriptions: {
|
|
146
|
+
fullInit: string;
|
|
147
|
+
importWorkflow: string;
|
|
148
|
+
configureApi: string;
|
|
149
|
+
configureMcp: string;
|
|
150
|
+
configureModel: string;
|
|
151
|
+
configureAiMemory: string;
|
|
152
|
+
clearCache: string;
|
|
153
|
+
changeLanguage: string;
|
|
154
|
+
};
|
|
155
|
+
returnToMenu: string;
|
|
156
|
+
goodbye: string;
|
|
157
|
+
selectDefaultModel: string;
|
|
158
|
+
modelConfigSuccess: string;
|
|
159
|
+
selectMemoryOption: string;
|
|
160
|
+
configureAiLanguage: string;
|
|
161
|
+
configureAiPersonality: string;
|
|
162
|
+
aiLanguageConfigured: string;
|
|
163
|
+
selectAiPersonality: string;
|
|
164
|
+
customPersonalityHint: string;
|
|
165
|
+
enterCustomPersonality: string;
|
|
166
|
+
personalityConfigured: string;
|
|
167
|
+
existingPersonality: string;
|
|
168
|
+
currentPersonality: string;
|
|
169
|
+
modifyPersonality: string;
|
|
170
|
+
keepPersonality: string;
|
|
171
|
+
confirmClearCache: string;
|
|
172
|
+
cacheCleared: string;
|
|
173
|
+
noCacheFound: string;
|
|
174
|
+
languageChanged: string;
|
|
175
|
+
fixWindowsMcp: string;
|
|
176
|
+
fixWindowsMcpDesc: string;
|
|
177
|
+
windowsMcpFixed: string;
|
|
178
|
+
configureMcpServices: string;
|
|
179
|
+
selectMcpOption: string;
|
|
180
|
+
invalidChoice: string;
|
|
181
|
+
urlRequired: string;
|
|
182
|
+
invalidUrl: string;
|
|
183
|
+
keyRequired: string;
|
|
184
|
+
invalidKeyFormat: string;
|
|
185
|
+
directiveCannotBeEmpty: string;
|
|
186
|
+
languageRequired: string;
|
|
187
|
+
failedToSetOnboarding: string;
|
|
188
|
+
failedToWriteMcpConfig: string;
|
|
189
|
+
templateDirNotFound: string;
|
|
190
|
+
failedToReadTemplateSettings: string;
|
|
191
|
+
failedToMergeSettings: string;
|
|
192
|
+
preservingExistingSettings: string;
|
|
193
|
+
failedToReadFile: string;
|
|
194
|
+
failedToWriteFile: string;
|
|
195
|
+
failedToCopyFile: string;
|
|
196
|
+
failedToReadDirectory: string;
|
|
197
|
+
failedToGetStats: string;
|
|
198
|
+
sourceDirNotExist: string;
|
|
199
|
+
invalidConfiguration: string;
|
|
200
|
+
failedToParseJson: string;
|
|
201
|
+
failedToBackupConfig: string;
|
|
202
|
+
failedToAddOnboardingFlag: string;
|
|
203
|
+
failedToApplyPersonality: string;
|
|
204
|
+
notConfigured: string;
|
|
205
|
+
none: string;
|
|
206
|
+
runFullInit: string;
|
|
207
|
+
forceOverwrite: string;
|
|
208
|
+
initClaudeConfig: string;
|
|
209
|
+
updatePromptsOnly: string;
|
|
210
|
+
spaceToSelectReturn: string;
|
|
118
211
|
};
|
|
119
212
|
en: {
|
|
120
213
|
selectScriptLang: string;
|
|
@@ -140,6 +233,23 @@ declare const I18N: {
|
|
|
140
233
|
enterApiUrl: string;
|
|
141
234
|
enterAuthToken: string;
|
|
142
235
|
enterApiKey: string;
|
|
236
|
+
existingApiConfig: string;
|
|
237
|
+
apiConfigUrl: string;
|
|
238
|
+
apiConfigKey: string;
|
|
239
|
+
apiConfigAuthType: string;
|
|
240
|
+
selectApiAction: string;
|
|
241
|
+
keepExistingConfig: string;
|
|
242
|
+
modifyAllConfig: string;
|
|
243
|
+
modifyPartialConfig: string;
|
|
244
|
+
selectModifyItems: string;
|
|
245
|
+
modifyApiUrl: string;
|
|
246
|
+
modifyApiKey: string;
|
|
247
|
+
modifyAuthType: string;
|
|
248
|
+
continueModification: string;
|
|
249
|
+
modificationSaved: string;
|
|
250
|
+
enterNewApiUrl: string;
|
|
251
|
+
enterNewApiKey: string;
|
|
252
|
+
selectNewAuthType: string;
|
|
143
253
|
existingConfig: string;
|
|
144
254
|
backupAndOverwrite: string;
|
|
145
255
|
updateDocsOnly: string;
|
|
@@ -164,9 +274,6 @@ declare const I18N: {
|
|
|
164
274
|
cancelled: string;
|
|
165
275
|
apiKeyValidation: {
|
|
166
276
|
empty: string;
|
|
167
|
-
invalid: string;
|
|
168
|
-
tooShort: string;
|
|
169
|
-
tooLong: string;
|
|
170
277
|
example: string;
|
|
171
278
|
};
|
|
172
279
|
noExistingConfig: string;
|
|
@@ -176,6 +283,85 @@ declare const I18N: {
|
|
|
176
283
|
'zh-CN': string;
|
|
177
284
|
en: string;
|
|
178
285
|
};
|
|
286
|
+
selectFunction: string;
|
|
287
|
+
enterChoice: string;
|
|
288
|
+
menuOptions: {
|
|
289
|
+
fullInit: string;
|
|
290
|
+
importWorkflow: string;
|
|
291
|
+
configureApi: string;
|
|
292
|
+
configureMcp: string;
|
|
293
|
+
configureModel: string;
|
|
294
|
+
configureAiMemory: string;
|
|
295
|
+
clearCache: string;
|
|
296
|
+
changeLanguage: string;
|
|
297
|
+
exit: string;
|
|
298
|
+
};
|
|
299
|
+
menuDescriptions: {
|
|
300
|
+
fullInit: string;
|
|
301
|
+
importWorkflow: string;
|
|
302
|
+
configureApi: string;
|
|
303
|
+
configureMcp: string;
|
|
304
|
+
configureModel: string;
|
|
305
|
+
configureAiMemory: string;
|
|
306
|
+
clearCache: string;
|
|
307
|
+
changeLanguage: string;
|
|
308
|
+
};
|
|
309
|
+
returnToMenu: string;
|
|
310
|
+
goodbye: string;
|
|
311
|
+
selectDefaultModel: string;
|
|
312
|
+
modelConfigSuccess: string;
|
|
313
|
+
selectMemoryOption: string;
|
|
314
|
+
configureAiLanguage: string;
|
|
315
|
+
configureAiPersonality: string;
|
|
316
|
+
aiLanguageConfigured: string;
|
|
317
|
+
selectAiPersonality: string;
|
|
318
|
+
customPersonalityHint: string;
|
|
319
|
+
enterCustomPersonality: string;
|
|
320
|
+
personalityConfigured: string;
|
|
321
|
+
existingPersonality: string;
|
|
322
|
+
currentPersonality: string;
|
|
323
|
+
modifyPersonality: string;
|
|
324
|
+
keepPersonality: string;
|
|
325
|
+
confirmClearCache: string;
|
|
326
|
+
cacheCleared: string;
|
|
327
|
+
noCacheFound: string;
|
|
328
|
+
languageChanged: string;
|
|
329
|
+
fixWindowsMcp: string;
|
|
330
|
+
fixWindowsMcpDesc: string;
|
|
331
|
+
windowsMcpFixed: string;
|
|
332
|
+
configureMcpServices: string;
|
|
333
|
+
selectMcpOption: string;
|
|
334
|
+
invalidChoice: string;
|
|
335
|
+
urlRequired: string;
|
|
336
|
+
invalidUrl: string;
|
|
337
|
+
keyRequired: string;
|
|
338
|
+
invalidKeyFormat: string;
|
|
339
|
+
directiveCannotBeEmpty: string;
|
|
340
|
+
languageRequired: string;
|
|
341
|
+
failedToSetOnboarding: string;
|
|
342
|
+
failedToWriteMcpConfig: string;
|
|
343
|
+
templateDirNotFound: string;
|
|
344
|
+
failedToReadTemplateSettings: string;
|
|
345
|
+
failedToMergeSettings: string;
|
|
346
|
+
preservingExistingSettings: string;
|
|
347
|
+
failedToReadFile: string;
|
|
348
|
+
failedToWriteFile: string;
|
|
349
|
+
failedToCopyFile: string;
|
|
350
|
+
failedToReadDirectory: string;
|
|
351
|
+
failedToGetStats: string;
|
|
352
|
+
sourceDirNotExist: string;
|
|
353
|
+
invalidConfiguration: string;
|
|
354
|
+
failedToParseJson: string;
|
|
355
|
+
failedToBackupConfig: string;
|
|
356
|
+
failedToAddOnboardingFlag: string;
|
|
357
|
+
failedToApplyPersonality: string;
|
|
358
|
+
notConfigured: string;
|
|
359
|
+
none: string;
|
|
360
|
+
runFullInit: string;
|
|
361
|
+
forceOverwrite: string;
|
|
362
|
+
initClaudeConfig: string;
|
|
363
|
+
updatePromptsOnly: string;
|
|
364
|
+
spaceToSelectReturn: string;
|
|
179
365
|
};
|
|
180
366
|
};
|
|
181
367
|
declare const MCP_SERVICES: McpService[];
|
|
@@ -185,6 +371,7 @@ interface InitOptions {
|
|
|
185
371
|
configLang?: SupportedLang;
|
|
186
372
|
aiOutputLang?: AiOutputLanguage | string;
|
|
187
373
|
force?: boolean;
|
|
374
|
+
skipBanner?: boolean;
|
|
188
375
|
}
|
|
189
376
|
declare function init(options?: InitOptions): Promise<void>;
|
|
190
377
|
|
|
@@ -194,16 +381,30 @@ declare function commandExists(command: string): Promise<boolean>;
|
|
|
194
381
|
declare function isClaudeCodeInstalled(): Promise<boolean>;
|
|
195
382
|
declare function installClaudeCode(lang: SupportedLang): Promise<void>;
|
|
196
383
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
384
|
+
/**
|
|
385
|
+
* API configuration for Claude Code
|
|
386
|
+
*/
|
|
200
387
|
interface ApiConfig {
|
|
201
388
|
url: string;
|
|
202
389
|
key: string;
|
|
203
390
|
authType?: 'auth_token' | 'api_key';
|
|
204
391
|
}
|
|
392
|
+
|
|
393
|
+
declare function ensureClaudeDir(): void;
|
|
394
|
+
declare function backupExistingConfig(): string | null;
|
|
395
|
+
declare function copyConfigFiles(lang: SupportedLang, onlyMd?: boolean): void;
|
|
205
396
|
declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
|
|
206
397
|
declare function mergeConfigs(sourceFile: string, targetFile: string): void;
|
|
398
|
+
declare function updateDefaultModel(model: 'opus' | 'sonnet'): void;
|
|
399
|
+
/**
|
|
400
|
+
* Merge settings.json intelligently
|
|
401
|
+
* Preserves user's environment variables and custom configurations
|
|
402
|
+
*/
|
|
403
|
+
declare function mergeSettingsFile(templatePath: string, targetPath: string): void;
|
|
404
|
+
/**
|
|
405
|
+
* Get existing API configuration from settings.json
|
|
406
|
+
*/
|
|
407
|
+
declare function getExistingApiConfig(): ApiConfig | null;
|
|
207
408
|
declare function applyAiLanguageDirective(aiOutputLang: AiOutputLanguage | string): void;
|
|
208
409
|
|
|
209
410
|
declare function getMcpConfigPath(): string;
|
|
@@ -215,5 +416,5 @@ declare function buildMcpServerConfig(baseConfig: McpServerConfig, apiKey?: stri
|
|
|
215
416
|
declare function fixWindowsMcpConfig(config: ClaudeConfiguration): ClaudeConfiguration;
|
|
216
417
|
declare function addCompletedOnboarding(): void;
|
|
217
418
|
|
|
218
|
-
export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, ClAUDE_CONFIG_FILE, I18N, LANG_LABELS, MCP_SERVICES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, commandExists, configureApi, copyConfigFiles, ensureClaudeDir, fixWindowsMcpConfig, getMcpConfigPath, getPlatform, init, installClaudeCode, isClaudeCodeInstalled, mergeConfigs, mergeMcpServers, readMcpConfig, writeMcpConfig };
|
|
419
|
+
export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, ClAUDE_CONFIG_FILE, I18N, LANG_LABELS, MCP_SERVICES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, commandExists, configureApi, copyConfigFiles, ensureClaudeDir, fixWindowsMcpConfig, getExistingApiConfig, getMcpConfigPath, getPlatform, init, installClaudeCode, isClaudeCodeInstalled, mergeConfigs, mergeMcpServers, mergeSettingsFile, readMcpConfig, updateDefaultModel, writeMcpConfig };
|
|
219
420
|
export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, McpServerConfig, McpService, SupportedLang };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, a as CLAUDE_MD_FILE, b as ClAUDE_CONFIG_FILE, I as I18N, L as LANG_LABELS, M as MCP_SERVICES, S as SETTINGS_FILE, d as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE,
|
|
1
|
+
export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, a as CLAUDE_MD_FILE, b as ClAUDE_CONFIG_FILE, I as I18N, L as LANG_LABELS, M as MCP_SERVICES, S as SETTINGS_FILE, d as SUPPORTED_LANGS, Z as ZCF_CONFIG_FILE, y as addCompletedOnboarding, p as applyAiLanguageDirective, j as backupExistingConfig, s as backupMcpConfig, v as buildMcpServerConfig, c as commandExists, l as configureApi, k as copyConfigFiles, h as ensureClaudeDir, x as fixWindowsMcpConfig, o as getExistingApiConfig, q as getMcpConfigPath, g as getPlatform, i as init, f as installClaudeCode, e as isClaudeCodeInstalled, m as mergeConfigs, t as mergeMcpServers, n as mergeSettingsFile, r as readMcpConfig, u as updateDefaultModel, w as writeMcpConfig } from './shared/zcf.DGNSM22u.mjs';
|
|
2
2
|
import '@posva/prompts';
|
|
3
3
|
import 'ansis';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import 'dayjs';
|
|
8
|
+
import 'node:url';
|
|
8
9
|
import 'tinyexec';
|