aico-cli 0.0.6 → 0.0.8

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.eNoQ0t1U.mjs';
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.DK7ND-40.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
@@ -32,6 +32,7 @@ interface McpService {
32
32
  };
33
33
  apiKeyPlaceholder?: string;
34
34
  apiKeyEnvVar?: string;
35
+ presetApiKey?: string;
35
36
  config: McpServerConfig;
36
37
  }
37
38
  interface McpServerConfig {
package/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ interface McpService {
32
32
  };
33
33
  apiKeyPlaceholder?: string;
34
34
  apiKeyEnvVar?: string;
35
+ presetApiKey?: string;
35
36
  config: McpServerConfig;
36
37
  }
37
38
  interface McpServerConfig {
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.eNoQ0t1U.mjs';
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.DK7ND-40.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.6";
83
+ const version = "0.0.8";
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: true,
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: "YOUR_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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aico-cli",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "packageManager": "pnpm@9.15.9",
5
5
  "description": "AI CLI",
6
6
  "repository": {
@@ -30,7 +30,7 @@ When receiving user input, first perform type determination and clearly inform t
30
30
 
31
31
  - Generate detailed markdown planning document
32
32
 
33
- - Store document in `./.claude/plan` directory, named in plan/xxx.md format
33
+ - Store document in `./.aico/plan` directory, named in plan/xxx.md format
34
34
 
35
35
  - Include: objective definition, feature breakdown, implementation steps, acceptance criteria
36
36
 
@@ -56,7 +56,7 @@ You are a professional AI programming assistant following a structured core work
56
56
 
57
57
  - Must have user approval before execution
58
58
  - Strictly follow the plan for coding implementation
59
- - Store plan summary (with context and plan) in project root directory `.claude/plan/task-name.md`
59
+ - Store plan summary (with context and plan) in project root directory `.aico/plan/task-name.md`
60
60
  - Request user feedback after key steps and completion
61
61
 
62
62
  ### 5. `[Mode: Optimize]` - Code Optimization
@@ -187,7 +187,7 @@ Questions to Ask:
187
187
  - Implement according to approved plan
188
188
  - Follow development best practices
189
189
  - Add usage methods before import statements (critical rule)
190
- - Store execution plan in project root directory `.claude/plan/task-name.md`
190
+ - Store execution plan in project root directory `.aico/plan/task-name.md`
191
191
  - Request feedback at key milestones
192
192
 
193
193
  ### 🚀 Phase 5: Code Optimization
@@ -212,7 +212,7 @@ Questions to Ask:
212
212
 
213
213
  ```
214
214
  project/ # Project root directory
215
- ├── .claude/
215
+ ├── .aico/
216
216
  │ └── plan/
217
217
  │ └── task-name.md # Execution plan and context (in project root)
218
218
  ├── src/
@@ -33,7 +33,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
33
33
  1. `[模式:研究]`:理解需求并评估完整性(0-10 分),低于 7 分时主动要求补充关键信息。
34
34
  2. `[模式:构思]`:提供至少两种可行方案及评估(例如:`方案 1:描述`)。
35
35
  3. `[模式:计划]`:将选定方案细化为详尽、有序、可执行的步骤清单(含原子操作:文件、函数/类、逻辑概要;预期结果;新库用 `Context7` 查询)。不写完整代码。完成后请求用户批准。
36
- 4. `[模式:执行]`:必须用户批准方可执行。严格按计划编码执行。计划简要(含上下文和计划)存入当前项目根目录的`.claude/plan/任务名.md`。关键步骤后及完成时请求用户反馈。
36
+ 4. `[模式:执行]`:必须用户批准方可执行。严格按计划编码执行。计划简要(含上下文和计划)存入当前项目根目录的`.aico/plan/任务名.md`。关键步骤后及完成时请求用户反馈。
37
37
  5. `[模式:优化]`:在 `[模式:执行]` 完成后,必须自动进行本模式 `[模式:优化]`,自动检查并分析本次任务已实现(仅本次对话产生的相关代码),在 `[模式:执行]` 下产生的相关代码。聚焦冗余、低效、垃圾代码,提出具体优化建议(含优化理由与预期收益),用户确认后执行相关优化功能。
38
38
  6. `[模式:评审]`:对照计划评估执行结果,报告问题与建议。完成后请求用户确认。
39
39
 
@@ -156,7 +156,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
156
156
  - 根据批准的计划实施
157
157
  - 遵循开发最佳实践
158
158
  - 在导入语句之前添加使用方法(关键规则)
159
- - 在项目根目录 `.claude/plan/任务名.md` 中存储执行计划
159
+ - 在项目根目录 `.aico/plan/任务名.md` 中存储执行计划
160
160
  - 在关键里程碑请求反馈
161
161
 
162
162
  ### 🚀 阶段 5:代码优化
@@ -181,7 +181,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
181
181
 
182
182
  ```
183
183
  project/ # 项目根目录
184
- ├── .claude/
184
+ ├── .aico/
185
185
  │ └── plan/
186
186
  │ └── 任务名.md # 执行计划和上下文(在项目根目录)
187
187
  ├── src/