aico-cli 0.0.6 → 0.0.7
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/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 { J as readZcfConfig, K as inquirer, N as addNumbersToChoices, O as updateZcfConfig, P as getTranslation, h as SUPPORTED_LANGS, j as LANG_LABELS, k as AI_OUTPUT_LANGUAGES, Q as version, q as backupExistingConfig, r as copyConfigFiles, x as applyAiLanguageDirective, R as configureAiPersonality, C as CLAUDE_DIR, T as readJsonConfig, H as addCompletedOnboarding, S as SETTINGS_FILE, U as writeJsonConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, V as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, W as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, X as EscapeKeyPressed, E as mergeMcpServers, Y as displayBanner, I as I18N, Z as selectAndInstallWorkflows, _ as handleExitPromptError, $ as handleGeneralError, a0 as displayBannerWithInfo, a1 as readZcfConfigAsync, i as init, a2 as executeWithEscapeSupport } from './shared/aico-cli.
|
|
4
|
+
import { J as readZcfConfig, K as inquirer, N as addNumbersToChoices, O as updateZcfConfig, P as getTranslation, h as SUPPORTED_LANGS, j as LANG_LABELS, k as AI_OUTPUT_LANGUAGES, Q as version, q as backupExistingConfig, r as copyConfigFiles, x as applyAiLanguageDirective, R as configureAiPersonality, C as CLAUDE_DIR, T as readJsonConfig, H as addCompletedOnboarding, S as SETTINGS_FILE, U as writeJsonConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, V as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, W as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, X as EscapeKeyPressed, E as mergeMcpServers, Y as displayBanner, I as I18N, Z as selectAndInstallWorkflows, _ as handleExitPromptError, $ as handleGeneralError, a0 as displayBannerWithInfo, a1 as readZcfConfigAsync, i as init, a2 as executeWithEscapeSupport } from './shared/aico-cli.CVvY5LWc.mjs';
|
|
5
5
|
import inquirer$1 from 'inquirer';
|
|
6
6
|
import { existsSync, copyFileSync, mkdirSync } from 'node:fs';
|
|
7
7
|
import { exec, spawn } from 'node:child_process';
|
|
@@ -659,6 +659,14 @@ async function configureMcpFeature(scriptLang) {
|
|
|
659
659
|
);
|
|
660
660
|
}
|
|
661
661
|
} else {
|
|
662
|
+
if (service.presetApiKey && service.apiKeyEnvVar) {
|
|
663
|
+
config = buildMcpServerConfig(
|
|
664
|
+
service.config,
|
|
665
|
+
service.presetApiKey,
|
|
666
|
+
service.apiKeyPlaceholder,
|
|
667
|
+
service.apiKeyEnvVar
|
|
668
|
+
);
|
|
669
|
+
}
|
|
662
670
|
newServers[service.id] = config;
|
|
663
671
|
installResults.push({
|
|
664
672
|
serviceId: service.id,
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AICO_CONFIG_FILE, k as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_AICO_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, H as addCompletedOnboarding, x as applyAiLanguageDirective, q as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, s as configureApi, r as copyConfigFiles, p as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, n as installClaudeCode, l as isClaudeCodeInstalled, m as mergeAndCleanPermissions, t as mergeConfigs, E as mergeMcpServers, v as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './shared/aico-cli.
|
|
1
|
+
export { A as AICO_CONFIG_FILE, k as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_AICO_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, H as addCompletedOnboarding, x as applyAiLanguageDirective, q as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, s as configureApi, r as copyConfigFiles, p as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, n as installClaudeCode, l as isClaudeCodeInstalled, m as mergeAndCleanPermissions, t as mergeConfigs, E as mergeMcpServers, v as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './shared/aico-cli.CVvY5LWc.mjs';
|
|
2
2
|
import 'inquirer';
|
|
3
3
|
import 'ansis';
|
|
4
4
|
import 'node:fs';
|
|
@@ -80,7 +80,7 @@ const inquirer = {
|
|
|
80
80
|
createPromptModule: inquirer$1.createPromptModule
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const version = "0.0.
|
|
83
|
+
const version = "0.0.7";
|
|
84
84
|
|
|
85
85
|
const common$1 = {
|
|
86
86
|
// Basic
|
|
@@ -1073,18 +1073,22 @@ const MCP_SERVICES = [
|
|
|
1073
1073
|
"zh-CN": "\u4F7F\u7528 Exa AI \u8FDB\u884C\u7F51\u9875\u641C\u7D22",
|
|
1074
1074
|
en: "Web search using Exa AI"
|
|
1075
1075
|
},
|
|
1076
|
-
requiresApiKey:
|
|
1076
|
+
requiresApiKey: false,
|
|
1077
|
+
// 改为false,不需要用户输入
|
|
1077
1078
|
apiKeyPrompt: {
|
|
1078
1079
|
"zh-CN": "\u8BF7\u8F93\u5165 Exa API Key\uFF08\u53EF\u4ECE https://dashboard.exa.ai/api-keys \u83B7\u53D6\uFF09",
|
|
1079
1080
|
en: "Enter Exa API Key (get from https://dashboard.exa.ai/api-keys)"
|
|
1080
1081
|
},
|
|
1081
1082
|
apiKeyEnvVar: "EXA_API_KEY",
|
|
1083
|
+
// 预设API key
|
|
1084
|
+
presetApiKey: "2091cbb2-e3ab-4eb2-be7e-c516bf809595",
|
|
1082
1085
|
config: {
|
|
1083
1086
|
type: "stdio",
|
|
1084
1087
|
command: "npx",
|
|
1085
1088
|
args: ["-y", "exa-mcp-server"],
|
|
1086
1089
|
env: {
|
|
1087
|
-
EXA_API_KEY: "
|
|
1090
|
+
EXA_API_KEY: "2091cbb2-e3ab-4eb2-be7e-c516bf809595"
|
|
1091
|
+
// 直接使用固定的API key
|
|
1088
1092
|
}
|
|
1089
1093
|
}
|
|
1090
1094
|
}
|
|
@@ -2277,6 +2281,13 @@ async function init(options = {}) {
|
|
|
2277
2281
|
} else {
|
|
2278
2282
|
continue;
|
|
2279
2283
|
}
|
|
2284
|
+
} else if (service.presetApiKey && service.apiKeyEnvVar) {
|
|
2285
|
+
config = buildMcpServerConfig(
|
|
2286
|
+
service.config,
|
|
2287
|
+
service.presetApiKey,
|
|
2288
|
+
service.apiKeyPlaceholder,
|
|
2289
|
+
service.apiKeyEnvVar
|
|
2290
|
+
);
|
|
2280
2291
|
}
|
|
2281
2292
|
newServers[service.id] = config;
|
|
2282
2293
|
}
|