zcf 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/dist/chunks/claude-code-config-manager.mjs +8 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +1 -1
- package/dist/chunks/codex-provider-manager.mjs +1 -1
- package/dist/chunks/codex-uninstaller.mjs +1 -1
- package/dist/chunks/commands.mjs +1 -1
- package/dist/chunks/simple-config.mjs +107 -33
- package/dist/cli.mjs +14 -12
- package/dist/i18n/locales/en/api.json +3 -0
- package/dist/i18n/locales/en/cli.json +2 -0
- package/dist/i18n/locales/en/errors.json +2 -0
- package/dist/i18n/locales/en/mcp.json +2 -0
- package/dist/i18n/locales/en/multi-config.json +12 -1
- package/dist/i18n/locales/zh-CN/api.json +3 -0
- package/dist/i18n/locales/zh-CN/cli.json +2 -0
- package/dist/i18n/locales/zh-CN/errors.json +2 -0
- package/dist/i18n/locales/zh-CN/mcp.json +2 -0
- package/dist/i18n/locales/zh-CN/multi-config.json +12 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/templates/claude-code/common/settings.json +2 -1
package/README.md
CHANGED
|
@@ -105,6 +105,17 @@ npx zcf i -s -g zh-CN -t api_key -k "sk-xxx" -u "https://xxx.xxx"
|
|
|
105
105
|
|
|
106
106
|
# Complete version
|
|
107
107
|
npx zcf i --skip-prompt --all-lang zh-CN --api-type api_key --api-key "sk-xxx" --api-url "https://xxx.xxx"
|
|
108
|
+
|
|
109
|
+
# Shorthand version (with custom models)
|
|
110
|
+
npx zcf i -s -t api_key -k "sk-xxx" -M "claude-sonnet-4-5" -F "claude-haiku-4-5"
|
|
111
|
+
|
|
112
|
+
# Complete version (with custom models)
|
|
113
|
+
npx zcf i --skip-prompt \
|
|
114
|
+
--api-type api_key \
|
|
115
|
+
--api-key "sk-xxx" \
|
|
116
|
+
--api-url "https://xxx.xxx" \
|
|
117
|
+
--api-model "claude-sonnet-4-5" \
|
|
118
|
+
--api-fast-model "claude-haiku-4-5"
|
|
108
119
|
```
|
|
109
120
|
|
|
110
121
|
#### Non-interactive Mode Parameters
|
|
@@ -122,7 +133,9 @@ When using `--skip-prompt`, the following parameters are available:
|
|
|
122
133
|
| `--api-type, -t` | API configuration type | `auth_token`, `api_key`, `ccr_proxy`, `skip` | No | `skip` |
|
|
123
134
|
| `--api-key, -k` | API key (for both API key and auth token types) | string | Required when `api-type` is not `skip` | - |
|
|
124
135
|
| `--api-url, -u` | Custom API URL | URL string | No | official API |
|
|
125
|
-
| `--
|
|
136
|
+
| `--api-model, -M` | Primary API model | string (e.g., `claude-sonnet-4-5`) | No | - |
|
|
137
|
+
| `--api-fast-model, -F` | Fast API model (Claude Code only) | string (e.g., `claude-haiku-4-5`) | No | - |
|
|
138
|
+
| `--mcp-services, -m` | MCP services to install (multi-select, comma-separated) | `context7`, `open-websearch`, `spec-workflow`, `mcp-deepwiki`, `Playwright`, `exa`, `serena`, or `skip` for none | No | `all` |
|
|
126
139
|
| `--workflows, -w` | Workflows to install (multi-select, comma-separated) | `commonTools`, `sixStepsWorkflow`, `featPlanUx`, `gitWorkflow`, `bmadWorkflow`, or `skip` for none | No | `all` |
|
|
127
140
|
| `--output-styles, -o` | Output styles to install (multi-select, comma-separated) | `engineer-professional`, `nekomata-engineer`, `laowang-engineer`, `ojousama-engineer`, or `skip` for none | No | `all` |
|
|
128
141
|
| `--default-output-style, -d` | Default output style | Same as output styles plus built-in: `default`, `explanatory`, `learning` | No | `engineer-professional` |
|
|
@@ -179,6 +192,7 @@ npx zcf → Select 4 # Configure Codex MCP services
|
|
|
179
192
|
4. **MCP Services**: Full compatibility with existing MCP services including:
|
|
180
193
|
- Context7, Open WebSearch, Spec Workflow
|
|
181
194
|
- DeepWiki, Playwright, EXA search
|
|
195
|
+
- Serena Assistant for semantic code retrieval and editing
|
|
182
196
|
- Automatic service configuration with API key management
|
|
183
197
|
|
|
184
198
|
**File Locations:**
|
|
@@ -543,6 +557,7 @@ Enter your choice: _
|
|
|
543
557
|
◉ DeepWiki - Query GitHub repository docs and examples
|
|
544
558
|
◉ Playwright Browser Control - Direct browser automation control
|
|
545
559
|
◉ Exa AI Search - Web search using Exa AI
|
|
560
|
+
◉ Serena Assistant - Semantic code retrieval and editing akin to an IDE
|
|
546
561
|
◯ Install all services
|
|
547
562
|
|
|
548
563
|
✔ MCP services configured
|
|
@@ -815,7 +830,8 @@ A huge thank you to all our sponsors for their generous support!
|
|
|
815
830
|
- \*\*康 (first KFC sponsor🍗)
|
|
816
831
|
- \*东 (first coffee sponsor☕️)
|
|
817
832
|
- 炼\*3 (first Termux user sponsor📱)
|
|
818
|
-
-
|
|
833
|
+
- [chamo101](https://github.com/chamo101) (first GitHub issue sponsor 🎉)
|
|
834
|
+
- 16°C coffee (My best friend🤪, offered ChatGPT Pro $200 package)
|
|
819
835
|
|
|
820
836
|
## 📄 License
|
|
821
837
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
2
|
import { join } from 'pathe';
|
|
3
|
-
import { j as ZCF_CONFIG_FILE, Z as ZCF_CONFIG_DIR,
|
|
3
|
+
import { j as ZCF_CONFIG_FILE, Z as ZCF_CONFIG_DIR, a8 as ensureDir, a9 as readDefaultTomlConfig, aa as createDefaultTomlConfig, ab as exists, ac as readJsonConfig, ad as writeTomlConfig, S as SETTINGS_FILE, ae as copyFile } from './simple-config.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:process';
|
|
6
6
|
import 'ansis';
|
|
@@ -182,15 +182,15 @@ class ClaudeCodeConfigManager {
|
|
|
182
182
|
* Apply profile settings to Claude Code runtime
|
|
183
183
|
*/
|
|
184
184
|
static async applyProfileSettings(profile) {
|
|
185
|
-
const { ensureI18nInitialized, i18n } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
185
|
+
const { ensureI18nInitialized, i18n } = await import('./simple-config.mjs').then(function (n) { return n.a_; });
|
|
186
186
|
ensureI18nInitialized();
|
|
187
187
|
try {
|
|
188
188
|
if (!profile) {
|
|
189
|
-
const { switchToOfficialLogin } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
189
|
+
const { switchToOfficialLogin } = await import('./simple-config.mjs').then(function (n) { return n.b2; });
|
|
190
190
|
switchToOfficialLogin();
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
193
|
+
const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./simple-config.mjs').then(function (n) { return n.b0; });
|
|
194
194
|
const settings = readJsonConfig2(SETTINGS_FILE) || {};
|
|
195
195
|
if (!settings.env)
|
|
196
196
|
settings.env = {};
|
|
@@ -202,7 +202,7 @@ class ClaudeCodeConfigManager {
|
|
|
202
202
|
settings.env.ANTHROPIC_AUTH_TOKEN = profile.apiKey;
|
|
203
203
|
delete settings.env.ANTHROPIC_API_KEY;
|
|
204
204
|
} else if (profile.authType === "ccr_proxy") {
|
|
205
|
-
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
205
|
+
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.b3; });
|
|
206
206
|
const ccrConfig = readCcrConfig();
|
|
207
207
|
if (!ccrConfig) {
|
|
208
208
|
throw new Error(i18n.t("ccr:ccrNotConfigured") || "CCR proxy configuration not found");
|
|
@@ -222,8 +222,9 @@ class ClaudeCodeConfigManager {
|
|
|
222
222
|
delete settings.env.ANTHROPIC_BASE_URL;
|
|
223
223
|
}
|
|
224
224
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
225
|
-
const { setPrimaryApiKey } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
225
|
+
const { setPrimaryApiKey, addCompletedOnboarding } = await import('./simple-config.mjs').then(function (n) { return n.b1; });
|
|
226
226
|
setPrimaryApiKey();
|
|
227
|
+
addCompletedOnboarding();
|
|
227
228
|
if (shouldRestartCcr) {
|
|
228
229
|
const { runCcrRestart } = await import('./commands.mjs');
|
|
229
230
|
await runCcrRestart();
|
|
@@ -574,7 +575,7 @@ class ClaudeCodeConfigManager {
|
|
|
574
575
|
*/
|
|
575
576
|
static async syncCcrProfile() {
|
|
576
577
|
try {
|
|
577
|
-
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
578
|
+
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.b3; });
|
|
578
579
|
const ccrConfig = readCcrConfig();
|
|
579
580
|
if (!ccrConfig) {
|
|
580
581
|
await this.ensureCcrProfileExists(ccrConfig);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ansis from 'ansis';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
|
-
import {
|
|
3
|
+
import { a4 as ensureI18nInitialized, a5 as i18n, a6 as addNumbersToChoices, a7 as validateApiKey } from './simple-config.mjs';
|
|
4
4
|
import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ansis from 'ansis';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
|
-
import {
|
|
3
|
+
import { a4 as ensureI18nInitialized, af as detectConfigManagementMode, a5 as i18n, a6 as addNumbersToChoices } from './simple-config.mjs';
|
|
4
4
|
import { deleteProviders, editExistingProvider, addProviderToExisting } from './codex-provider-manager.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ag as readCodexConfig, ah as backupCodexComplete, ai as writeCodexConfig, aj as writeAuthFile } from './simple-config.mjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'ansis';
|
|
@@ -2,7 +2,7 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { pathExists } from 'fs-extra';
|
|
3
3
|
import { join } from 'pathe';
|
|
4
4
|
import { exec } from 'tinyexec';
|
|
5
|
-
import {
|
|
5
|
+
import { a5 as i18n } from './simple-config.mjs';
|
|
6
6
|
import { m as moveToTrash } from '../shared/zcf.DGjQxTq_.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:process';
|
package/dist/chunks/commands.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { exec } from 'node:child_process';
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import {
|
|
4
|
+
import { a4 as ensureI18nInitialized, a5 as i18n } from './simple-config.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
7
7
|
import 'inquirer';
|
|
@@ -16,7 +16,7 @@ import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
|
|
|
16
16
|
import i18next from 'i18next';
|
|
17
17
|
import Backend from 'i18next-fs-backend';
|
|
18
18
|
|
|
19
|
-
const version = "3.2.
|
|
19
|
+
const version = "3.2.2";
|
|
20
20
|
const homepage = "https://github.com/UfoMiao/zcf";
|
|
21
21
|
|
|
22
22
|
const i18n = i18next.createInstance();
|
|
@@ -200,6 +200,16 @@ const MCP_SERVICE_CONFIGS = [
|
|
|
200
200
|
EXA_API_KEY: "YOUR_EXA_API_KEY"
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "serena",
|
|
206
|
+
requiresApiKey: false,
|
|
207
|
+
config: {
|
|
208
|
+
type: "stdio",
|
|
209
|
+
command: "uvx",
|
|
210
|
+
args: ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "ide-assistant", "--enable-web-dashboard", "false"],
|
|
211
|
+
env: {}
|
|
212
|
+
}
|
|
203
213
|
}
|
|
204
214
|
];
|
|
205
215
|
async function getMcpServices() {
|
|
@@ -235,6 +245,11 @@ async function getMcpServices() {
|
|
|
235
245
|
name: i18n.t("mcp:services.exa.name"),
|
|
236
246
|
description: i18n.t("mcp:services.exa.description"),
|
|
237
247
|
apiKeyPrompt: i18n.t("mcp:services.exa.apiKeyPrompt")
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: "serena",
|
|
251
|
+
name: i18n.t("mcp:services.serena.name"),
|
|
252
|
+
description: i18n.t("mcp:services.serena.description")
|
|
238
253
|
}
|
|
239
254
|
];
|
|
240
255
|
return MCP_SERVICE_CONFIGS.map((config) => {
|
|
@@ -385,6 +400,8 @@ const CODE_TOOL_ALIASES = {
|
|
|
385
400
|
function isCodeToolType(value) {
|
|
386
401
|
return CODE_TOOL_TYPES.includes(value);
|
|
387
402
|
}
|
|
403
|
+
const API_DEFAULT_URL = "https://api.anthropic.com";
|
|
404
|
+
const API_ENV_KEY = "ANTHROPIC_API_KEY";
|
|
388
405
|
function resolveCodeToolType(value) {
|
|
389
406
|
if (isCodeToolType(value)) {
|
|
390
407
|
return value;
|
|
@@ -420,6 +437,8 @@ function getAiOutputLanguageLabel(lang) {
|
|
|
420
437
|
const constants = {
|
|
421
438
|
__proto__: null,
|
|
422
439
|
AI_OUTPUT_LANGUAGES: AI_OUTPUT_LANGUAGES,
|
|
440
|
+
API_DEFAULT_URL: API_DEFAULT_URL,
|
|
441
|
+
API_ENV_KEY: API_ENV_KEY,
|
|
423
442
|
CLAUDE_DIR: CLAUDE_DIR,
|
|
424
443
|
CLAUDE_MD_FILE: CLAUDE_MD_FILE,
|
|
425
444
|
CLAUDE_VSC_CONFIG_FILE: CLAUDE_VSC_CONFIG_FILE,
|
|
@@ -484,6 +503,7 @@ function displayBannerWithInfo(subtitle) {
|
|
|
484
503
|
`));
|
|
485
504
|
}
|
|
486
505
|
|
|
506
|
+
const WINDOWS_WRAPPED_COMMANDS = ["npx", "uvx", "uv"];
|
|
487
507
|
function getPlatform() {
|
|
488
508
|
const p = platform();
|
|
489
509
|
if (p === "win32")
|
|
@@ -552,11 +572,11 @@ function getWSLInfo() {
|
|
|
552
572
|
version
|
|
553
573
|
};
|
|
554
574
|
}
|
|
555
|
-
function getMcpCommand() {
|
|
556
|
-
if (isWindows()) {
|
|
557
|
-
return ["cmd", "/c",
|
|
575
|
+
function getMcpCommand(command = "npx") {
|
|
576
|
+
if (isWindows() && WINDOWS_WRAPPED_COMMANDS.includes(command)) {
|
|
577
|
+
return ["cmd", "/c", command];
|
|
558
578
|
}
|
|
559
|
-
return [
|
|
579
|
+
return [command];
|
|
560
580
|
}
|
|
561
581
|
function getSystemRoot() {
|
|
562
582
|
if (!isWindows())
|
|
@@ -931,10 +951,12 @@ function mergeMcpServers(existing, newServers) {
|
|
|
931
951
|
return config;
|
|
932
952
|
}
|
|
933
953
|
function applyPlatformCommand(config) {
|
|
934
|
-
if (config.command
|
|
935
|
-
const mcpCmd = getMcpCommand();
|
|
936
|
-
|
|
937
|
-
|
|
954
|
+
if (isWindows() && config.command) {
|
|
955
|
+
const mcpCmd = getMcpCommand(config.command);
|
|
956
|
+
if (mcpCmd[0] === "cmd") {
|
|
957
|
+
config.command = mcpCmd[0];
|
|
958
|
+
config.args = [...mcpCmd.slice(1), ...config.args || []];
|
|
959
|
+
}
|
|
938
960
|
}
|
|
939
961
|
}
|
|
940
962
|
function buildMcpServerConfig(baseConfig, apiKey, placeholder = "YOUR_EXA_API_KEY", envVarName) {
|
|
@@ -2765,10 +2787,12 @@ async function selectMcpServices() {
|
|
|
2765
2787
|
}
|
|
2766
2788
|
|
|
2767
2789
|
function applyCodexPlatformCommand(config) {
|
|
2768
|
-
if (config.command
|
|
2769
|
-
const mcpCmd = getMcpCommand();
|
|
2770
|
-
|
|
2771
|
-
|
|
2790
|
+
if (isWindows() && config.command) {
|
|
2791
|
+
const mcpCmd = getMcpCommand(config.command);
|
|
2792
|
+
if (mcpCmd[0] === "cmd") {
|
|
2793
|
+
config.command = mcpCmd[0];
|
|
2794
|
+
config.args = [...mcpCmd.slice(1), ...config.args || []];
|
|
2795
|
+
}
|
|
2772
2796
|
}
|
|
2773
2797
|
}
|
|
2774
2798
|
|
|
@@ -2822,6 +2846,14 @@ async function configureCodexMcp(options) {
|
|
|
2822
2846
|
const serviceMeta = servicesMeta.find((service) => service.id === id);
|
|
2823
2847
|
let command = configInfo.config.command || id;
|
|
2824
2848
|
let args = (configInfo.config.args || []).map((arg) => String(arg));
|
|
2849
|
+
if (id === "serena") {
|
|
2850
|
+
const idx = args.indexOf("--context");
|
|
2851
|
+
if (idx >= 0 && idx + 1 < args.length) {
|
|
2852
|
+
args[idx + 1] = "codex";
|
|
2853
|
+
} else {
|
|
2854
|
+
args.push("--context", "codex");
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2825
2857
|
const serviceConfig = { id: id.toLowerCase(), command, args };
|
|
2826
2858
|
applyCodexPlatformCommand(serviceConfig);
|
|
2827
2859
|
command = serviceConfig.command;
|
|
@@ -3552,7 +3584,7 @@ function createApiConfigChoices(providers, currentProvider, isCommented) {
|
|
|
3552
3584
|
return choices;
|
|
3553
3585
|
}
|
|
3554
3586
|
async function applyCustomApiConfig(customApiConfig) {
|
|
3555
|
-
const { type, token, baseUrl } = customApiConfig;
|
|
3587
|
+
const { type, token, baseUrl, model } = customApiConfig;
|
|
3556
3588
|
const backupPath = backupCodexComplete();
|
|
3557
3589
|
if (backupPath) {
|
|
3558
3590
|
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
@@ -3573,7 +3605,8 @@ async function applyCustomApiConfig(customApiConfig) {
|
|
|
3573
3605
|
authEntries[providerId] = token;
|
|
3574
3606
|
}
|
|
3575
3607
|
const configData = {
|
|
3576
|
-
model: "claude-3-5-sonnet-20241022",
|
|
3608
|
+
model: model || "claude-3-5-sonnet-20241022",
|
|
3609
|
+
// Use provided model or default
|
|
3577
3610
|
modelProvider: providerId,
|
|
3578
3611
|
modelProviderCommented: false,
|
|
3579
3612
|
providers,
|
|
@@ -5063,7 +5096,17 @@ function validateSkipPromptOptions(options) {
|
|
|
5063
5096
|
);
|
|
5064
5097
|
}
|
|
5065
5098
|
if (options.apiConfigs && options.apiConfigsFile) {
|
|
5066
|
-
throw new Error("
|
|
5099
|
+
throw new Error(i18n.t("multi-config:conflictingParams"));
|
|
5100
|
+
}
|
|
5101
|
+
if (options.apiModel && typeof options.apiModel !== "string") {
|
|
5102
|
+
throw new Error(
|
|
5103
|
+
i18n.t("errors:invalidApiModel", { value: options.apiModel })
|
|
5104
|
+
);
|
|
5105
|
+
}
|
|
5106
|
+
if (options.apiFastModel && typeof options.apiFastModel !== "string") {
|
|
5107
|
+
throw new Error(
|
|
5108
|
+
i18n.t("errors:invalidApiFastModel", { value: options.apiFastModel })
|
|
5109
|
+
);
|
|
5067
5110
|
}
|
|
5068
5111
|
if (options.apiType === "api_key" && !options.apiKey) {
|
|
5069
5112
|
throw new Error(i18n.t("errors:apiKeyRequiredForApiKey"));
|
|
@@ -5257,7 +5300,9 @@ async function init(options = {}) {
|
|
|
5257
5300
|
const customApiConfig = options.apiType === "api_key" && options.apiKey ? {
|
|
5258
5301
|
type: "api_key",
|
|
5259
5302
|
token: options.apiKey,
|
|
5260
|
-
baseUrl: options.apiUrl
|
|
5303
|
+
baseUrl: options.apiUrl,
|
|
5304
|
+
model: options.apiModel
|
|
5305
|
+
// Add model parameter for Codex
|
|
5261
5306
|
} : void 0;
|
|
5262
5307
|
let selectedWorkflows;
|
|
5263
5308
|
if (Array.isArray(options.workflows)) {
|
|
@@ -5376,13 +5421,13 @@ async function init(options = {}) {
|
|
|
5376
5421
|
apiConfig = {
|
|
5377
5422
|
authType: "auth_token",
|
|
5378
5423
|
key: options.apiKey,
|
|
5379
|
-
url: options.apiUrl ||
|
|
5424
|
+
url: options.apiUrl || API_DEFAULT_URL
|
|
5380
5425
|
};
|
|
5381
5426
|
} else if (options.apiType === "api_key" && options.apiKey) {
|
|
5382
5427
|
apiConfig = {
|
|
5383
5428
|
authType: "api_key",
|
|
5384
5429
|
key: options.apiKey,
|
|
5385
|
-
url: options.apiUrl ||
|
|
5430
|
+
url: options.apiUrl || API_DEFAULT_URL
|
|
5386
5431
|
};
|
|
5387
5432
|
} else if (options.apiType === "ccr_proxy") {
|
|
5388
5433
|
const ccrStatus = await isCcrInstalled();
|
|
@@ -5494,6 +5539,22 @@ async function init(options = {}) {
|
|
|
5494
5539
|
console.log(ansis.gray(` Key: ${formatApiKeyDisplay(configuredApi.key)}`));
|
|
5495
5540
|
}
|
|
5496
5541
|
}
|
|
5542
|
+
if ((options.apiModel || options.apiFastModel) && action !== "docs-only" && codeToolType === "claude-code") {
|
|
5543
|
+
if (options.skipPrompt) {
|
|
5544
|
+
const { updateCustomModel } = await Promise.resolve().then(function () { return config$1; });
|
|
5545
|
+
updateCustomModel(
|
|
5546
|
+
options.apiModel || void 0,
|
|
5547
|
+
options.apiFastModel || void 0
|
|
5548
|
+
);
|
|
5549
|
+
console.log(ansis.green(`\u2714 ${i18n.t("api:modelConfigSuccess")}`));
|
|
5550
|
+
if (options.apiModel) {
|
|
5551
|
+
console.log(ansis.gray(` ${i18n.t("api:primaryModel")}: ${options.apiModel}`));
|
|
5552
|
+
}
|
|
5553
|
+
if (options.apiFastModel) {
|
|
5554
|
+
console.log(ansis.gray(` ${i18n.t("api:fastModel")}: ${options.apiFastModel}`));
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5497
5558
|
if (action !== "docs-only") {
|
|
5498
5559
|
let shouldConfigureMcp = false;
|
|
5499
5560
|
if (options.skipPrompt) {
|
|
@@ -5536,6 +5597,16 @@ async function init(options = {}) {
|
|
|
5536
5597
|
if (!service)
|
|
5537
5598
|
continue;
|
|
5538
5599
|
let config = service.config;
|
|
5600
|
+
if (service.id === "serena" && Array.isArray(config.args)) {
|
|
5601
|
+
const adjusted = { ...config, args: [...config.args || []] };
|
|
5602
|
+
const idx = adjusted.args.indexOf("--context");
|
|
5603
|
+
if (idx >= 0 && idx + 1 < adjusted.args.length) {
|
|
5604
|
+
adjusted.args[idx + 1] = codeToolType === "codex" ? "codex" : "ide-assistant";
|
|
5605
|
+
} else {
|
|
5606
|
+
adjusted.args.push("--context", codeToolType === "codex" ? "codex" : "ide-assistant");
|
|
5607
|
+
}
|
|
5608
|
+
config = adjusted;
|
|
5609
|
+
}
|
|
5539
5610
|
if (service.requiresApiKey) {
|
|
5540
5611
|
if (options.skipPrompt) {
|
|
5541
5612
|
console.log(ansis.yellow(`${i18n.t("common:skip")}: ${service.name} (requires API key)`));
|
|
@@ -5621,7 +5692,7 @@ async function handleMultiConfigurations(options, codeToolType) {
|
|
|
5621
5692
|
try {
|
|
5622
5693
|
configs = JSON.parse(options.apiConfigs);
|
|
5623
5694
|
} catch (error) {
|
|
5624
|
-
throw new Error(
|
|
5695
|
+
throw new Error(i18n.t("multi-config:invalidJson", { error: error instanceof Error ? error.message : String(error) }));
|
|
5625
5696
|
}
|
|
5626
5697
|
}
|
|
5627
5698
|
if (options.apiConfigsFile) {
|
|
@@ -5630,7 +5701,7 @@ async function handleMultiConfigurations(options, codeToolType) {
|
|
|
5630
5701
|
const fileContent = readFile(options.apiConfigsFile);
|
|
5631
5702
|
configs = JSON.parse(fileContent);
|
|
5632
5703
|
} catch (error) {
|
|
5633
|
-
throw new Error(
|
|
5704
|
+
throw new Error(i18n.t("multi-config:fileReadFailed", { error: error instanceof Error ? error.message : String(error) }));
|
|
5634
5705
|
}
|
|
5635
5706
|
}
|
|
5636
5707
|
validateApiConfigs(configs);
|
|
@@ -5647,22 +5718,22 @@ async function handleMultiConfigurations(options, codeToolType) {
|
|
|
5647
5718
|
}
|
|
5648
5719
|
function validateApiConfigs(configs) {
|
|
5649
5720
|
if (!Array.isArray(configs)) {
|
|
5650
|
-
throw new TypeError("
|
|
5721
|
+
throw new TypeError(i18n.t("multi-config:mustBeArray"));
|
|
5651
5722
|
}
|
|
5652
5723
|
const names = /* @__PURE__ */ new Set();
|
|
5653
5724
|
for (const config of configs) {
|
|
5654
5725
|
if (!config.name || typeof config.name !== "string" || config.name.trim() === "") {
|
|
5655
|
-
throw new Error("
|
|
5726
|
+
throw new Error(i18n.t("multi-config:mustHaveValidName"));
|
|
5656
5727
|
}
|
|
5657
5728
|
if (!["api_key", "auth_token", "ccr_proxy"].includes(config.type)) {
|
|
5658
|
-
throw new Error(
|
|
5729
|
+
throw new Error(i18n.t("multi-config:invalidAuthType", { type: config.type }));
|
|
5659
5730
|
}
|
|
5660
5731
|
if (names.has(config.name)) {
|
|
5661
|
-
throw new Error(
|
|
5732
|
+
throw new Error(i18n.t("multi-config:duplicateName", { name: config.name }));
|
|
5662
5733
|
}
|
|
5663
5734
|
names.add(config.name);
|
|
5664
5735
|
if (config.type !== "ccr_proxy" && !config.key) {
|
|
5665
|
-
throw new Error(
|
|
5736
|
+
throw new Error(i18n.t("multi-config:configApiKeyRequired", { name: config.name }));
|
|
5666
5737
|
}
|
|
5667
5738
|
}
|
|
5668
5739
|
}
|
|
@@ -5671,12 +5742,12 @@ async function handleClaudeCodeConfigs(configs) {
|
|
|
5671
5742
|
const addedProfiles = [];
|
|
5672
5743
|
for (const config of configs) {
|
|
5673
5744
|
if (config.type === "ccr_proxy") {
|
|
5674
|
-
throw new Error(
|
|
5745
|
+
throw new Error(i18n.t("multi-config:ccrProxyReserved", { name: config.name }));
|
|
5675
5746
|
}
|
|
5676
5747
|
const profile = await convertToClaudeCodeProfile(config);
|
|
5677
5748
|
const result = await ClaudeCodeConfigManager.addProfile(profile);
|
|
5678
5749
|
if (!result.success) {
|
|
5679
|
-
throw new Error(
|
|
5750
|
+
throw new Error(i18n.t("multi-config:configProfileAddFailed", { name: config.name, error: result.error }));
|
|
5680
5751
|
}
|
|
5681
5752
|
const storedProfile = result.addedProfile || ClaudeCodeConfigManager.getProfileByName(config.name) || profile;
|
|
5682
5753
|
addedProfiles.push(storedProfile);
|
|
@@ -5704,11 +5775,14 @@ async function handleCodexConfigs(configs) {
|
|
|
5704
5775
|
const provider = convertToCodexProvider(config);
|
|
5705
5776
|
const result = await addProviderToExisting(provider, config.key || "");
|
|
5706
5777
|
if (!result.success) {
|
|
5707
|
-
throw new Error(
|
|
5778
|
+
throw new Error(i18n.t("multi-config:providerAddFailed", { name: config.name, error: result.error }));
|
|
5708
5779
|
}
|
|
5709
5780
|
console.log(ansis.green(`\u2714 ${i18n.t("multi-config:providerAdded", { name: config.name })}`));
|
|
5710
5781
|
} catch (error) {
|
|
5711
|
-
console.error(ansis.red(
|
|
5782
|
+
console.error(ansis.red(i18n.t("multi-config:providerAddFailed", {
|
|
5783
|
+
name: config.name,
|
|
5784
|
+
error: error instanceof Error ? error.message : String(error)
|
|
5785
|
+
})));
|
|
5712
5786
|
throw error;
|
|
5713
5787
|
}
|
|
5714
5788
|
}
|
|
@@ -5734,9 +5808,9 @@ function convertToCodexProvider(config) {
|
|
|
5734
5808
|
return {
|
|
5735
5809
|
id: config.name.toLowerCase().replace(/[^a-z0-9]/g, "-"),
|
|
5736
5810
|
name: config.name,
|
|
5737
|
-
baseUrl: config.url ||
|
|
5811
|
+
baseUrl: config.url || API_DEFAULT_URL,
|
|
5738
5812
|
wireApi: "chat",
|
|
5739
|
-
envKey:
|
|
5813
|
+
envKey: API_ENV_KEY,
|
|
5740
5814
|
requiresOpenaiAuth: false
|
|
5741
5815
|
};
|
|
5742
5816
|
}
|
|
@@ -5819,4 +5893,4 @@ async function openSettingsJson() {
|
|
|
5819
5893
|
}
|
|
5820
5894
|
}
|
|
5821
5895
|
|
|
5822
|
-
export {
|
|
5896
|
+
export { isClaudeCodeInstalled as $, API_DEFAULT_URL as A, mergeMcpServers as B, CLAUDE_DIR as C, DEFAULT_CODE_TOOL_TYPE as D, buildMcpServerConfig as E, fixWindowsMcpConfig as F, addCompletedOnboarding as G, ensureApiKeyApproved as H, removeApiKeyFromRejected as I, manageApiKeyApproval as J, setPrimaryApiKey as K, LEGACY_ZCF_CONFIG_FILES as L, ensureClaudeDir as M, backupExistingConfig as N, copyConfigFiles as O, configureApi as P, mergeConfigs as Q, updateCustomModel as R, SETTINGS_FILE as S, updateDefaultModel as T, mergeSettingsFile as U, getExistingModelConfig as V, getExistingApiConfig as W, applyAiLanguageDirective as X, switchToOfficialLogin$1 as Y, ZCF_CONFIG_DIR as Z, promptApiConfigurationAction as _, commandExists as a, fsOperations as a$, installClaudeCode as a0, isLocalClaudeCodeInstalled as a1, getInstallationStatus as a2, removeLocalClaudeCode as a3, ensureI18nInitialized as a4, i18n as a5, addNumbersToChoices as a6, validateApiKey as a7, ensureDir as a8, readDefaultTomlConfig as a9, COMETIX_COMMAND_NAME as aA, COMETIX_COMMANDS as aB, installCometixLine as aC, checkAndUpdateTools as aD, runCodexUpdate as aE, resolveCodeType as aF, writeJsonConfig as aG, displayBanner as aH, version as aI, resolveAiOutputLanguage as aJ, updatePromptOnly as aK, selectAndInstallWorkflows as aL, checkClaudeCodeVersionAndPrompt as aM, displayBannerWithInfo as aN, runCodexUninstall as aO, configureCodexMcp as aP, configureCodexApi as aQ, runCodexWorkflowImportWithLanguageSelection as aR, runCodexFullInit as aS, switchCodexProvider as aT, listCodexProviders as aU, switchToOfficialLogin as aV, switchToProvider as aW, readZcfConfigAsync as aX, initI18n as aY, selectScriptLanguage as aZ, index as a_, createDefaultTomlConfig as aa, exists as ab, readJsonConfig as ac, writeTomlConfig as ad, copyFile as ae, detectConfigManagementMode as af, readCodexConfig as ag, backupCodexComplete as ah, writeCodexConfig as ai, writeAuthFile as aj, readCcrConfig as ak, isCcrInstalled as al, installCcr as am, configureCcrFeature as an, handleExitPromptError as ao, handleGeneralError as ap, updateZcfConfig as aq, changeLanguage as ar, readZcfConfig as as, configureOutputStyle as at, isWindows as au, selectMcpServices as av, getMcpServices as aw, setupCcrConfiguration as ax, modifyApiConfigPartially as ay, formatApiKeyDisplay as az, importRecommendedEnv as b, jsonConfig as b0, claudeConfig as b1, config$1 as b2, config as b3, prompts as b4, codex as b5, cleanupPermissions as c, importRecommendedPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, CLAUDE_VSC_CONFIG_FILE as h, init as i, ZCF_CONFIG_FILE as j, CODE_TOOL_TYPES as k, CODE_TOOL_BANNERS as l, mergeAndCleanPermissions as m, CODE_TOOL_ALIASES as n, openSettingsJson as o, isCodeToolType as p, API_ENV_KEY as q, resolveCodeToolType as r, SUPPORTED_LANGS as s, LANG_LABELS as t, AI_OUTPUT_LANGUAGES as u, getAiOutputLanguageLabel as v, getMcpConfigPath as w, readMcpConfig as x, writeMcpConfig 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 {
|
|
4
|
+
import { a4 as ensureI18nInitialized, a5 as i18n, ak as readCcrConfig, al as isCcrInstalled, am as installCcr, an as configureCcrFeature, ao as handleExitPromptError, ap as handleGeneralError, s as SUPPORTED_LANGS, a6 as addNumbersToChoices, t as LANG_LABELS, aq as updateZcfConfig, ar as changeLanguage, as as readZcfConfig, o as openSettingsJson, d as importRecommendedPermissions, b as importRecommendedEnv, X as applyAiLanguageDirective, at as configureOutputStyle, V as getExistingModelConfig, R as updateCustomModel, T as updateDefaultModel, au as isWindows, x as readMcpConfig, F as fixWindowsMcpConfig, y as writeMcpConfig, av as selectMcpServices, z as backupMcpConfig, aw as getMcpServices, E as buildMcpServerConfig, B as mergeMcpServers, ax as setupCcrConfiguration, W as getExistingApiConfig, _ as promptApiConfigurationAction, ay as modifyApiConfigPartially, a7 as validateApiKey, P as configureApi, az as formatApiKeyDisplay, Y as switchToOfficialLogin, aA as COMETIX_COMMAND_NAME, aB as COMETIX_COMMANDS, aC as installCometixLine, aD as checkAndUpdateTools, aE as runCodexUpdate, aF as resolveCodeType$1, ac as readJsonConfig, aG as writeJsonConfig, j as ZCF_CONFIG_FILE, aH as displayBanner, aI as version, aJ as resolveAiOutputLanguage, aK as updatePromptOnly, aL as selectAndInstallWorkflows, aM as checkClaudeCodeVersionAndPrompt, r as resolveCodeToolType$1, D as DEFAULT_CODE_TOOL_TYPE, p as isCodeToolType, aN as displayBannerWithInfo, l as CODE_TOOL_BANNERS, aO as runCodexUninstall, aP as configureCodexMcp, aQ as configureCodexApi, aR as runCodexWorkflowImportWithLanguageSelection, aS as runCodexFullInit, i as init, aT as switchCodexProvider, aU as listCodexProviders, ag as readCodexConfig, aV as switchToOfficialLogin$1, aW as switchToProvider, aX as readZcfConfigAsync, aY as initI18n, aZ as selectScriptLanguage } from './chunks/simple-config.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import inquirer from 'inquirer';
|
|
@@ -465,7 +465,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
|
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
468
|
+
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b4; });
|
|
469
469
|
const aiOutputLang = await selectAiOutputLanguage();
|
|
470
470
|
applyAiLanguageDirective(aiOutputLang);
|
|
471
471
|
updateZcfConfig({ aiOutputLang });
|
|
@@ -498,7 +498,7 @@ async function changeScriptLanguageFeature(currentLang) {
|
|
|
498
498
|
}
|
|
499
499
|
async function configureCodexDefaultModelFeature() {
|
|
500
500
|
ensureI18nInitialized();
|
|
501
|
-
const { readCodexConfig } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
501
|
+
const { readCodexConfig } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
502
502
|
const existingConfig = readCodexConfig();
|
|
503
503
|
const currentModel = existingConfig?.model;
|
|
504
504
|
if (currentModel) {
|
|
@@ -603,7 +603,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
|
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
606
|
+
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b4; });
|
|
607
607
|
const aiOutputLang = await selectAiOutputLanguage();
|
|
608
608
|
await updateCodexLanguageDirective(aiOutputLang);
|
|
609
609
|
updateZcfConfig({ aiOutputLang });
|
|
@@ -611,14 +611,14 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
|
|
|
611
611
|
} else if (option === "systemPrompt") {
|
|
612
612
|
const zcfConfig = readZcfConfig();
|
|
613
613
|
const currentLang = zcfConfig?.aiOutputLang || "English";
|
|
614
|
-
const { runCodexSystemPromptSelection } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
614
|
+
const { runCodexSystemPromptSelection } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
615
615
|
await runCodexSystemPromptSelection();
|
|
616
616
|
await ensureLanguageDirectiveInAgents(currentLang);
|
|
617
617
|
console.log(ansis.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
async function updateCodexModelProvider(modelProvider) {
|
|
621
|
-
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
621
|
+
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
622
622
|
const backupPath = backupCodexConfig();
|
|
623
623
|
if (backupPath) {
|
|
624
624
|
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
@@ -639,7 +639,7 @@ async function updateCodexModelProvider(modelProvider) {
|
|
|
639
639
|
writeCodexConfig(updatedConfig);
|
|
640
640
|
}
|
|
641
641
|
async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
642
|
-
const { readFile, writeFile, exists } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
642
|
+
const { readFile, writeFile, exists } = await import('./chunks/simple-config.mjs').then(function (n) { return n.a$; });
|
|
643
643
|
const { homedir } = await import('node:os');
|
|
644
644
|
const { join } = await import('pathe');
|
|
645
645
|
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
@@ -657,7 +657,7 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
|
657
657
|
const langLabel = languageLabels[aiOutputLang] || aiOutputLang;
|
|
658
658
|
const hasLanguageDirective = /\*\*Most Important:\s*Always respond in [^*]+\*\*/i.test(content);
|
|
659
659
|
if (!hasLanguageDirective) {
|
|
660
|
-
const { backupCodexAgents, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
660
|
+
const { backupCodexAgents, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
661
661
|
const backupPath = backupCodexAgents();
|
|
662
662
|
if (backupPath) {
|
|
663
663
|
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
@@ -674,8 +674,8 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
async function updateCodexLanguageDirective(aiOutputLang) {
|
|
677
|
-
const { readFile, writeFile, exists } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
678
|
-
const { backupCodexAgents, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
677
|
+
const { readFile, writeFile, exists } = await import('./chunks/simple-config.mjs').then(function (n) { return n.a$; });
|
|
678
|
+
const { backupCodexAgents, getBackupMessage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b5; });
|
|
679
679
|
const { homedir } = await import('node:os');
|
|
680
680
|
const { join } = await import('pathe');
|
|
681
681
|
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
@@ -1784,7 +1784,7 @@ async function update(options = {}) {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
return;
|
|
1786
1786
|
}
|
|
1787
|
-
const { resolveTemplateLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
1787
|
+
const { resolveTemplateLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.b4; });
|
|
1788
1788
|
const configLang = await resolveTemplateLanguage(
|
|
1789
1789
|
options.configLang,
|
|
1790
1790
|
// Command line option
|
|
@@ -2482,6 +2482,8 @@ function customizeHelp(sections) {
|
|
|
2482
2482
|
` ${ansis.green("--api-type, -t")} <type> ${i18n.t("cli:help.optionDescriptions.apiType")} (auth_token, api_key, ccr_proxy, skip)`,
|
|
2483
2483
|
` ${ansis.green("--api-key, -k")} <key> ${i18n.t("cli:help.optionDescriptions.apiKey")}`,
|
|
2484
2484
|
` ${ansis.green("--api-url, -u")} <url> ${i18n.t("cli:help.optionDescriptions.customApiUrl")}`,
|
|
2485
|
+
` ${ansis.green("--api-model, -M")} <model> ${i18n.t("cli:help.optionDescriptions.apiModel")} (e.g., claude-sonnet-4-5)`,
|
|
2486
|
+
` ${ansis.green("--api-fast-model, -F")} <model> ${i18n.t("cli:help.optionDescriptions.apiFastModel")} (e.g., claude-haiku-4-5)`,
|
|
2485
2487
|
` ${ansis.green("--ai-output-lang, -a")} <lang> ${i18n.t("cli:help.optionDescriptions.aiOutputLanguage")}`,
|
|
2486
2488
|
` ${ansis.green("--all-lang, -g")} <lang> ${i18n.t("cli:help.optionDescriptions.setAllLanguageParams")}`,
|
|
2487
2489
|
` ${ansis.green("--config-action, -r")} <action> ${i18n.t("cli:help.optionDescriptions.configHandling")} (${i18n.t("cli:help.defaults.prefix")} backup)`,
|
|
@@ -2547,7 +2549,7 @@ async function setupCommands(cli) {
|
|
|
2547
2549
|
cli.command("", "Show interactive menu (default)").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--force, -f", "Force overwrite existing configuration").option("--code-type, -T <codeType>", "Select code tool type (claude-code, codex, cc, cx)").action(await withLanguageResolution(async () => {
|
|
2548
2550
|
await showMainMenu();
|
|
2549
2551
|
}));
|
|
2550
|
-
cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--ai-output-lang, -a <lang>", "AI output language").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--config-action, -r <action>", `Config handling (new/backup/merge/docs-only/skip), ${i18n.t("cli:help.defaults.prefix")} backup`).option("--api-type, -t <type>", "API type (auth_token/api_key/ccr_proxy/skip)").option("--api-key, -k <key>", "API key (used for both API key and auth token types)").option("--api-url, -u <url>", "Custom API URL").option("--mcp-services, -m <services>", `Comma-separated MCP services to install (context7,mcp-deepwiki,Playwright,exa), "skip" to skip all, "all" for all non-key services, ${i18n.t("cli:help.defaults.prefix")} all`).option("--workflows, -w <workflows>", `Comma-separated workflows to install (sixStepsWorkflow,featPlanUx,gitWorkflow,bmadWorkflow), "skip" to skip all, "all" for all workflows, ${i18n.t("cli:help.defaults.prefix")} all`).option("--output-styles, -o <styles>", `Comma-separated output styles (engineer-professional,nekomata-engineer,laowang-engineer,default,explanatory,learning), "skip" to skip all, "all" for all custom styles, ${i18n.t("cli:help.defaults.prefix")} all`).option("--default-output-style, -d <style>", `Default output style, ${i18n.t("cli:help.defaults.prefix")} engineer-professional`).option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--code-type, -T <codeType>", "Select code tool type (claude-code, codex, cc, cx)").option("--install-cometix-line, -x <value>", `Install CCometixLine statusline tool (true/false), ${i18n.t("cli:help.defaults.prefix")} true`).option("--api-configs <configs>", "API configurations as JSON string for multiple profiles").option("--api-configs-file <file>", "Path to JSON file containing API configurations").action(await withLanguageResolution(async (options) => {
|
|
2552
|
+
cli.command("init", "Initialize Claude Code configuration").alias("i").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").option("--ai-output-lang, -a <lang>", "AI output language").option("--force, -f", "Force overwrite existing configuration").option("--skip-prompt, -s", "Skip all interactive prompts (non-interactive mode)").option("--config-action, -r <action>", `Config handling (new/backup/merge/docs-only/skip), ${i18n.t("cli:help.defaults.prefix")} backup`).option("--api-type, -t <type>", "API type (auth_token/api_key/ccr_proxy/skip)").option("--api-key, -k <key>", "API key (used for both API key and auth token types)").option("--api-url, -u <url>", "Custom API URL").option("--api-model, -M <model>", "Primary API model (e.g., claude-sonnet-4-5)").option("--api-fast-model, -F <model>", "Fast API model (e.g., claude-haiku-4-5)").option("--mcp-services, -m <services>", `Comma-separated MCP services to install (context7,mcp-deepwiki,Playwright,exa), "skip" to skip all, "all" for all non-key services, ${i18n.t("cli:help.defaults.prefix")} all`).option("--workflows, -w <workflows>", `Comma-separated workflows to install (sixStepsWorkflow,featPlanUx,gitWorkflow,bmadWorkflow), "skip" to skip all, "all" for all workflows, ${i18n.t("cli:help.defaults.prefix")} all`).option("--output-styles, -o <styles>", `Comma-separated output styles (engineer-professional,nekomata-engineer,laowang-engineer,default,explanatory,learning), "skip" to skip all, "all" for all custom styles, ${i18n.t("cli:help.defaults.prefix")} all`).option("--default-output-style, -d <style>", `Default output style, ${i18n.t("cli:help.defaults.prefix")} engineer-professional`).option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--code-type, -T <codeType>", "Select code tool type (claude-code, codex, cc, cx)").option("--install-cometix-line, -x <value>", `Install CCometixLine statusline tool (true/false), ${i18n.t("cli:help.defaults.prefix")} true`).option("--api-configs <configs>", "API configurations as JSON string for multiple profiles").option("--api-configs-file <file>", "Path to JSON file containing API configurations").action(await withLanguageResolution(async (options) => {
|
|
2551
2553
|
await init(options);
|
|
2552
2554
|
}));
|
|
2553
2555
|
cli.command("update", "Update Claude Code prompts only").alias("u").option("--lang, -l <lang>", "ZCF display language (zh-CN, en)").option("--all-lang, -g <lang>", "Set all language parameters to this value").option("--config-lang, -c <lang>", "Configuration language (zh-CN, en)").action(await withLanguageResolution(async (options) => {
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
"apiConfigKey": "Key",
|
|
4
4
|
"apiConfigSuccess": "API configured",
|
|
5
5
|
"apiConfigUrl": "URL",
|
|
6
|
+
"modelConfigSuccess": "API models configured",
|
|
7
|
+
"primaryModel": "Primary model",
|
|
8
|
+
"fastModel": "Fast model",
|
|
6
9
|
"apiKeyDesc": "For API keys from Anthropic Console",
|
|
7
10
|
"apiKeyValidation.example": "Example format: sk-abcdef123456_789xyz",
|
|
8
11
|
"authTokenDesc": "For tokens obtained via OAuth or browser login",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"help.optionDescriptions.apiType": "API type",
|
|
24
24
|
"help.optionDescriptions.apiKey": "API key (for both types)",
|
|
25
25
|
"help.optionDescriptions.customApiUrl": "Custom API URL",
|
|
26
|
+
"help.optionDescriptions.apiModel": "Primary API model",
|
|
27
|
+
"help.optionDescriptions.apiFastModel": "Fast API model",
|
|
26
28
|
"help.optionDescriptions.aiOutputLanguage": "AI output language",
|
|
27
29
|
"help.optionDescriptions.setAllLanguageParams": "Set all language params",
|
|
28
30
|
"help.optionDescriptions.configHandling": "Config handling",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"invalidDefaultOutputStyle": "Invalid default output style: {style}. Available styles: {validStyles}",
|
|
12
12
|
"invalidWorkflow": "Invalid workflow: {workflow}. Available workflows: {validWorkflows}",
|
|
13
13
|
"invalidModel": "Invalid model: {model}. Expected 'opus', 'sonnet', or 'sonnet[1m]'",
|
|
14
|
+
"invalidApiModel": "Invalid API model parameter: {value}",
|
|
15
|
+
"invalidApiFastModel": "Invalid fast model parameter: {value}",
|
|
14
16
|
"invalidEnvConfig": "Invalid env configuration: expected object",
|
|
15
17
|
"invalidBaseUrl": "Invalid ANTHROPIC_BASE_URL: expected string",
|
|
16
18
|
"invalidApiKeyConfig": "Invalid ANTHROPIC_API_KEY: expected string",
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"services.mcp-deepwiki.name": "DeepWiki",
|
|
17
17
|
"services.spec-workflow.description": "Structured feature development workflow, systematic approach from requirements to implementation",
|
|
18
18
|
"services.spec-workflow.name": "Spec Workflow",
|
|
19
|
+
"services.serena.name": "Serena Assistant",
|
|
20
|
+
"services.serena.description": "Semantic code retrieval and editing akin to an IDE; extracts symbol-level entities and leverages relations to greatly improve token efficiency with coding agents",
|
|
19
21
|
"apiKeyApprovalFailed": "Failed to manage API key approval status",
|
|
20
22
|
"apiKeyPrompt": "Enter API Key",
|
|
21
23
|
"primaryApiKeySetFailed": "Failed to set primaryApiKey"
|
|
@@ -57,5 +57,16 @@
|
|
|
57
57
|
"newDefaultProfile": "ℹ️ New default profile: {{profile}}",
|
|
58
58
|
"settingsApplied": "✔ Settings applied",
|
|
59
59
|
"failedToApplySettings": "Failed to apply settings",
|
|
60
|
-
"profileNameNotFound": "Profile \"{{name}}\" not found"
|
|
60
|
+
"profileNameNotFound": "Profile \"{{name}}\" not found",
|
|
61
|
+
"conflictingParams": "Cannot specify both --api-configs and --api-configs-file at the same time",
|
|
62
|
+
"mustBeArray": "API configs must be an array",
|
|
63
|
+
"mustHaveValidName": "Each config must have a valid name",
|
|
64
|
+
"invalidAuthType": "Invalid auth type: {{type}}",
|
|
65
|
+
"duplicateName": "Duplicate config name: {{name}}",
|
|
66
|
+
"configApiKeyRequired": "Config \"{{name}}\" requires API key",
|
|
67
|
+
"ccrProxyReserved": "CCR proxy type is reserved and cannot be added manually (config: \"{{name}}\")",
|
|
68
|
+
"configProfileAddFailed": "Failed to add profile \"{{name}}\": {{error}}",
|
|
69
|
+
"providerAddFailed": "Failed to add provider \"{{name}}\": {{error}}",
|
|
70
|
+
"invalidJson": "Invalid API configs JSON: {{error}}",
|
|
71
|
+
"fileReadFailed": "Failed to read API configs file: {{error}}"
|
|
61
72
|
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
"apiConfigKey": "Key",
|
|
4
4
|
"apiConfigSuccess": "API 配置完成",
|
|
5
5
|
"apiConfigUrl": "URL",
|
|
6
|
+
"modelConfigSuccess": "API 模型配置完成",
|
|
7
|
+
"primaryModel": "主模型",
|
|
8
|
+
"fastModel": "快速模型",
|
|
6
9
|
"apiKeyDesc": "适用于从 Anthropic Console 获取的 API 密钥",
|
|
7
10
|
"apiKeyValidation.example": "示例格式: sk-abcdef123456_789xyz",
|
|
8
11
|
"authTokenDesc": "适用于通过 OAuth 或浏览器登录获取的令牌",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"help.optionDescriptions.apiType": "API类型",
|
|
24
24
|
"help.optionDescriptions.apiKey": "API密钥(适用于所有类型)",
|
|
25
25
|
"help.optionDescriptions.customApiUrl": "自定义API地址",
|
|
26
|
+
"help.optionDescriptions.apiModel": "主API模型",
|
|
27
|
+
"help.optionDescriptions.apiFastModel": "快速API模型",
|
|
26
28
|
"help.optionDescriptions.aiOutputLanguage": "AI输出语言",
|
|
27
29
|
"help.optionDescriptions.setAllLanguageParams": "统一设置所有语言参数",
|
|
28
30
|
"help.optionDescriptions.configHandling": "配置处理",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"invalidDefaultOutputStyle": "无效的默认输出样式:{style}。可用的样式:{validStyles}",
|
|
12
12
|
"invalidWorkflow": "无效的工作流:{workflow}。可用的工作流:{validWorkflows}",
|
|
13
13
|
"invalidModel": "无效的模型:{model}。期望的值:'opus', 'sonnet', 或 'sonnet[1m]'",
|
|
14
|
+
"invalidApiModel": "无效的 API 模型参数:{value}",
|
|
15
|
+
"invalidApiFastModel": "无效的快速模型参数:{value}",
|
|
14
16
|
"invalidEnvConfig": "无效的环境配置:期望对象类型",
|
|
15
17
|
"invalidBaseUrl": "无效的 ANTHROPIC_BASE_URL:期望字符串类型",
|
|
16
18
|
"invalidApiKeyConfig": "无效的 ANTHROPIC_API_KEY:期望字符串类型",
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"services.mcp-deepwiki.name": "DeepWiki",
|
|
17
17
|
"services.spec-workflow.description": "规范化特性开发工作流程,从需求到实现的系统化方法",
|
|
18
18
|
"services.spec-workflow.name": "Spec 工作流",
|
|
19
|
+
"services.serena.name": "Serena 助手",
|
|
20
|
+
"services.serena.description": "提供类似 IDE 的语义代码检索与编辑,支持符号级实体提取与关系结构利用;与现有编码代理配合可显著提升标记效率",
|
|
19
21
|
"apiKeyApprovalFailed": "API密钥批准状态管理失败",
|
|
20
22
|
"apiKeyPrompt": "请输入 API Key",
|
|
21
23
|
"primaryApiKeySetFailed": "设置 primaryApiKey 失败"
|
|
@@ -57,5 +57,16 @@
|
|
|
57
57
|
"newDefaultProfile": "ℹ️ 新的默认配置:{{profile}}",
|
|
58
58
|
"settingsApplied": "✔ 设置已生效",
|
|
59
59
|
"failedToApplySettings": "应用设置失败",
|
|
60
|
-
"profileNameNotFound": "未找到名为「{{name}}」的配置"
|
|
60
|
+
"profileNameNotFound": "未找到名为「{{name}}」的配置",
|
|
61
|
+
"conflictingParams": "不能同时指定 --api-configs 和 --api-configs-file",
|
|
62
|
+
"mustBeArray": "API配置必须是数组格式",
|
|
63
|
+
"mustHaveValidName": "每个配置必须具有有效的名称",
|
|
64
|
+
"invalidAuthType": "无效的认证类型:{{type}}",
|
|
65
|
+
"duplicateName": "重复的配置名称:{{name}}",
|
|
66
|
+
"configApiKeyRequired": "配置 \"{{name}}\" 需要API密钥",
|
|
67
|
+
"ccrProxyReserved": "CCR代理类型为保留类型,不能手动添加(配置:\"{{name}}\")",
|
|
68
|
+
"configProfileAddFailed": "添加配置文件 \"{{name}}\" 失败:{{error}}",
|
|
69
|
+
"providerAddFailed": "添加提供商 \"{{name}}\" 失败:{{error}}",
|
|
70
|
+
"invalidJson": "无效的API配置JSON:{{error}}",
|
|
71
|
+
"fileReadFailed": "读取API配置文件失败:{{error}}"
|
|
61
72
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -12,6 +12,8 @@ declare const DEFAULT_CODE_TOOL_TYPE: CodeToolType;
|
|
|
12
12
|
declare const CODE_TOOL_BANNERS: Record<CodeToolType, string>;
|
|
13
13
|
declare const CODE_TOOL_ALIASES: Record<string, CodeToolType>;
|
|
14
14
|
declare function isCodeToolType(value: any): value is CodeToolType;
|
|
15
|
+
declare const API_DEFAULT_URL = "https://api.anthropic.com";
|
|
16
|
+
declare const API_ENV_KEY = "ANTHROPIC_API_KEY";
|
|
15
17
|
declare function resolveCodeToolType(value: unknown): CodeToolType;
|
|
16
18
|
declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
|
|
17
19
|
type SupportedLang = (typeof SUPPORTED_LANGS)[number];
|
|
@@ -44,6 +46,8 @@ interface InitOptions {
|
|
|
44
46
|
apiType?: 'auth_token' | 'api_key' | 'ccr_proxy' | 'skip';
|
|
45
47
|
apiKey?: string;
|
|
46
48
|
apiUrl?: string;
|
|
49
|
+
apiModel?: string;
|
|
50
|
+
apiFastModel?: string;
|
|
47
51
|
mcpServices?: string[] | string | boolean;
|
|
48
52
|
workflows?: string[] | string | boolean;
|
|
49
53
|
outputStyles?: string[] | string | boolean;
|
|
@@ -218,5 +222,5 @@ declare function importRecommendedEnv(): Promise<void>;
|
|
|
218
222
|
declare function importRecommendedPermissions(): Promise<void>;
|
|
219
223
|
declare function openSettingsJson(): Promise<void>;
|
|
220
224
|
|
|
221
|
-
export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, resolveCodeToolType, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
|
|
225
|
+
export { AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, API_ENV_KEY, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, resolveCodeToolType, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
|
|
222
226
|
export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, CodeToolType, InstallationStatus, McpServerConfig, McpService, SupportedLang };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ declare const DEFAULT_CODE_TOOL_TYPE: CodeToolType;
|
|
|
12
12
|
declare const CODE_TOOL_BANNERS: Record<CodeToolType, string>;
|
|
13
13
|
declare const CODE_TOOL_ALIASES: Record<string, CodeToolType>;
|
|
14
14
|
declare function isCodeToolType(value: any): value is CodeToolType;
|
|
15
|
+
declare const API_DEFAULT_URL = "https://api.anthropic.com";
|
|
16
|
+
declare const API_ENV_KEY = "ANTHROPIC_API_KEY";
|
|
15
17
|
declare function resolveCodeToolType(value: unknown): CodeToolType;
|
|
16
18
|
declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
|
|
17
19
|
type SupportedLang = (typeof SUPPORTED_LANGS)[number];
|
|
@@ -44,6 +46,8 @@ interface InitOptions {
|
|
|
44
46
|
apiType?: 'auth_token' | 'api_key' | 'ccr_proxy' | 'skip';
|
|
45
47
|
apiKey?: string;
|
|
46
48
|
apiUrl?: string;
|
|
49
|
+
apiModel?: string;
|
|
50
|
+
apiFastModel?: string;
|
|
47
51
|
mcpServices?: string[] | string | boolean;
|
|
48
52
|
workflows?: string[] | string | boolean;
|
|
49
53
|
outputStyles?: string[] | string | boolean;
|
|
@@ -218,5 +222,5 @@ declare function importRecommendedEnv(): Promise<void>;
|
|
|
218
222
|
declare function importRecommendedPermissions(): Promise<void>;
|
|
219
223
|
declare function openSettingsJson(): Promise<void>;
|
|
220
224
|
|
|
221
|
-
export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, resolveCodeToolType, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
|
|
225
|
+
export { AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, API_ENV_KEY, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, resolveCodeToolType, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
|
|
222
226
|
export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, CodeToolType, InstallationStatus, McpServerConfig, McpService, SupportedLang };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { u as AI_OUTPUT_LANGUAGES, A as API_DEFAULT_URL, q as API_ENV_KEY, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, h as CLAUDE_VSC_CONFIG_FILE, n as CODE_TOOL_ALIASES, l as CODE_TOOL_BANNERS, k as CODE_TOOL_TYPES, f as ClAUDE_CONFIG_FILE, D as DEFAULT_CODE_TOOL_TYPE, t as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILES, S as SETTINGS_FILE, s as SUPPORTED_LANGS, Z as ZCF_CONFIG_DIR, j as ZCF_CONFIG_FILE, G as addCompletedOnboarding, X as applyAiLanguageDirective, N as backupExistingConfig, z as backupMcpConfig, E as buildMcpServerConfig, c as cleanupPermissions, a as commandExists, P as configureApi, O as copyConfigFiles, H as ensureApiKeyApproved, M as ensureClaudeDir, F as fixWindowsMcpConfig, v as getAiOutputLanguageLabel, W as getExistingApiConfig, V as getExistingModelConfig, a2 as getInstallationStatus, w as getMcpConfigPath, g as getPlatform, b as importRecommendedEnv, d as importRecommendedPermissions, i as init, a0 as installClaudeCode, $ as isClaudeCodeInstalled, p as isCodeToolType, a1 as isLocalClaudeCodeInstalled, J as manageApiKeyApproval, m as mergeAndCleanPermissions, Q as mergeConfigs, B as mergeMcpServers, U as mergeSettingsFile, o as openSettingsJson, _ as promptApiConfigurationAction, x as readMcpConfig, I as removeApiKeyFromRejected, a3 as removeLocalClaudeCode, r as resolveCodeToolType, K as setPrimaryApiKey, Y as switchToOfficialLogin, R as updateCustomModel, T as updateDefaultModel, y as writeMcpConfig } from './chunks/simple-config.mjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'ansis';
|
package/package.json
CHANGED