aios-core 2.1.1 → 2.1.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.
@@ -11,57 +11,119 @@
11
11
  * Generate .env file content
12
12
  *
13
13
  * @param {Object} apiKeys - API keys provided by user
14
+ * @param {string} [apiKeys.deepseek] - DeepSeek API key (optional)
14
15
  * @param {string} [apiKeys.openai] - OpenAI API key (optional)
15
16
  * @param {string} [apiKeys.anthropic] - Anthropic API key (optional)
17
+ * @param {string} [apiKeys.openrouter] - OpenRouter API key (optional)
16
18
  * @param {string} [apiKeys.clickup] - ClickUp API key (optional)
17
19
  * @param {string} [apiKeys.github] - GitHub token (optional)
18
20
  * @param {string} [apiKeys.exa] - Exa API key (optional)
21
+ * @param {string} [apiKeys.supabaseUrl] - Supabase URL (optional)
22
+ * @param {string} [apiKeys.supabaseAnonKey] - Supabase anon key (optional)
19
23
  * @returns {string} .env file content
20
24
  */
21
25
  function generateEnvContent(apiKeys = {}) {
22
- const content = `# AIOS Environment Configuration
26
+ const content = `# ============================================
27
+ # AIOS-FULLSTACK Environment Configuration
28
+ # ============================================
23
29
  # Generated by AIOS Installer
24
30
  # DO NOT commit this file - it contains sensitive credentials
31
+ # ============================================
25
32
 
26
- # ============================================================================
27
- # AIOS Core Configuration
28
- # ============================================================================
29
- NODE_ENV=development
30
- AIOS_VERSION=2.1.0
33
+ # --------------------------------------------
34
+ # LLM Providers
35
+ # --------------------------------------------
36
+
37
+ # DeepSeek API (for claude-free command)
38
+ # Get your key at: https://platform.deepseek.com/api_keys
39
+ # Cost: ~$0.14/M tokens with tool calling support
40
+ DEEPSEEK_API_KEY=${apiKeys.deepseek || ''}
41
+
42
+ # OpenRouter API (for multi-model routing)
43
+ # Get your key at: https://openrouter.ai/keys
44
+ OPENROUTER_API_KEY=${apiKeys.openrouter || ''}
45
+
46
+ # Anthropic API (direct, if not using Claude Max subscription)
47
+ # Get your key at: https://console.anthropic.com/
48
+ ANTHROPIC_API_KEY=${apiKeys.anthropic || ''}
31
49
 
32
- # ============================================================================
33
- # AI Providers (at least one recommended)
34
- # ============================================================================
35
50
  # OpenAI API Key - Get yours at: https://platform.openai.com/api-keys
36
51
  OPENAI_API_KEY=${apiKeys.openai || ''}
37
52
 
38
- # Anthropic API Key - Get yours at: https://console.anthropic.com/
39
- ANTHROPIC_API_KEY=${apiKeys.anthropic || ''}
53
+ # --------------------------------------------
54
+ # Search & Research Tools
55
+ # --------------------------------------------
40
56
 
41
- # ============================================================================
42
- # Optional Services
43
- # ============================================================================
44
- # ClickUp API Key - For task management integration
45
- # Get yours at: https://app.clickup.com/settings/apps
46
- CLICKUP_API_KEY=${apiKeys.clickup || ''}
57
+ # Exa Search API (web search for agents)
58
+ # Get your key at: https://exa.ai/
59
+ EXA_API_KEY=${apiKeys.exa || ''}
60
+
61
+ # Context7 (library documentation lookup)
62
+ # Usually free, no key required for basic usage
63
+ CONTEXT7_API_KEY=
64
+
65
+ # --------------------------------------------
66
+ # Database & Backend
67
+ # --------------------------------------------
68
+
69
+ # Supabase (database, auth, storage)
70
+ # Get from your Supabase project settings
71
+ SUPABASE_URL=${apiKeys.supabaseUrl || ''}
72
+ SUPABASE_ANON_KEY=${apiKeys.supabaseAnonKey || ''}
73
+ SUPABASE_SERVICE_ROLE_KEY=
74
+
75
+ # --------------------------------------------
76
+ # Version Control & CI/CD
77
+ # --------------------------------------------
47
78
 
48
- # GitHub Personal Access Token - For GitHub integration
79
+ # GitHub Token (for GitHub CLI and API access)
49
80
  # Create at: https://github.com/settings/tokens
50
81
  GITHUB_TOKEN=${apiKeys.github || ''}
51
82
 
52
- # Exa API Key - For web search capabilities
53
- # Get yours at: https://exa.ai/
54
- EXA_API_KEY=${apiKeys.exa || ''}
83
+ # --------------------------------------------
84
+ # Project Management
85
+ # --------------------------------------------
86
+
87
+ # ClickUp API (if using ClickUp integration)
88
+ # Get from: ClickUp Settings > Apps > API Token
89
+ CLICKUP_API_KEY=${apiKeys.clickup || ''}
90
+
91
+ # --------------------------------------------
92
+ # Automation & Workflows
93
+ # --------------------------------------------
94
+
95
+ # N8N (workflow automation)
96
+ # From your N8N instance settings
97
+ N8N_API_KEY=
98
+ N8N_WEBHOOK_URL=
99
+
100
+ # --------------------------------------------
101
+ # Monitoring & Analytics
102
+ # --------------------------------------------
55
103
 
56
- # ============================================================================
57
- # Database Configuration (if applicable)
58
- # ============================================================================
59
- # DATABASE_URL=postgresql://user:password@localhost:5432/dbname
104
+ # Sentry (error tracking)
105
+ SENTRY_DSN=
106
+
107
+ # --------------------------------------------
108
+ # Cloud Providers
109
+ # --------------------------------------------
110
+
111
+ # Railway (deployment)
112
+ RAILWAY_TOKEN=
113
+
114
+ # Vercel (deployment)
115
+ VERCEL_TOKEN=
116
+
117
+ # --------------------------------------------
118
+ # AIOS Core Configuration
119
+ # --------------------------------------------
120
+ NODE_ENV=development
121
+ AIOS_VERSION=2.1.2
60
122
 
61
- # ============================================================================
123
+ # --------------------------------------------
62
124
  # Custom Configuration
63
- # ============================================================================
64
- # Add your custom environment variables below
125
+ # --------------------------------------------
126
+ # Add your custom API keys below
65
127
  `;
66
128
 
67
129
  return content;
@@ -73,49 +135,107 @@ EXA_API_KEY=${apiKeys.exa || ''}
73
135
  * @returns {string} .env.example file content
74
136
  */
75
137
  function generateEnvExample() {
76
- const content = `# AIOS Environment Configuration Template
138
+ const content = `# ============================================
139
+ # AIOS-FULLSTACK Environment Configuration
140
+ # ============================================
77
141
  # Copy this file to .env and fill in your actual values
78
142
  # DO NOT commit .env with real credentials
143
+ # ============================================
79
144
 
80
- # ============================================================================
81
- # AIOS Core Configuration
82
- # ============================================================================
83
- NODE_ENV=development
84
- AIOS_VERSION=2.1.0
145
+ # --------------------------------------------
146
+ # LLM Providers
147
+ # --------------------------------------------
148
+
149
+ # DeepSeek API (for claude-free command)
150
+ # Get your key at: https://platform.deepseek.com/api_keys
151
+ # Cost: ~$0.14/M tokens with tool calling support
152
+ DEEPSEEK_API_KEY=
153
+
154
+ # OpenRouter API (for multi-model routing)
155
+ # Get your key at: https://openrouter.ai/keys
156
+ OPENROUTER_API_KEY=
157
+
158
+ # Anthropic API (direct, if not using Claude Max subscription)
159
+ # Get your key at: https://console.anthropic.com/
160
+ ANTHROPIC_API_KEY=
85
161
 
86
- # ============================================================================
87
- # AI Providers (at least one recommended)
88
- # ============================================================================
89
162
  # OpenAI API Key - Get yours at: https://platform.openai.com/api-keys
90
163
  OPENAI_API_KEY=
91
164
 
92
- # Anthropic API Key - Get yours at: https://console.anthropic.com/
93
- ANTHROPIC_API_KEY=
165
+ # --------------------------------------------
166
+ # Search & Research Tools
167
+ # --------------------------------------------
94
168
 
95
- # ============================================================================
96
- # Optional Services
97
- # ============================================================================
98
- # ClickUp API Key - For task management integration
99
- # Get yours at: https://app.clickup.com/settings/apps
100
- CLICKUP_API_KEY=
169
+ # Exa Search API (web search for agents)
170
+ # Get your key at: https://exa.ai/
171
+ EXA_API_KEY=
172
+
173
+ # Context7 (library documentation lookup)
174
+ # Usually free, no key required for basic usage
175
+ CONTEXT7_API_KEY=
176
+
177
+ # --------------------------------------------
178
+ # Database & Backend
179
+ # --------------------------------------------
180
+
181
+ # Supabase (database, auth, storage)
182
+ # Get from your Supabase project settings
183
+ SUPABASE_URL=
184
+ SUPABASE_ANON_KEY=
185
+ SUPABASE_SERVICE_ROLE_KEY=
186
+
187
+ # --------------------------------------------
188
+ # Version Control & CI/CD
189
+ # --------------------------------------------
101
190
 
102
- # GitHub Personal Access Token - For GitHub integration
191
+ # GitHub Token (for GitHub CLI and API access)
103
192
  # Create at: https://github.com/settings/tokens
104
193
  GITHUB_TOKEN=
105
194
 
106
- # Exa API Key - For web search capabilities
107
- # Get yours at: https://exa.ai/
108
- EXA_API_KEY=
195
+ # --------------------------------------------
196
+ # Project Management
197
+ # --------------------------------------------
198
+
199
+ # ClickUp API (if using ClickUp integration)
200
+ # Get from: ClickUp Settings > Apps > API Token
201
+ CLICKUP_API_KEY=
202
+
203
+ # --------------------------------------------
204
+ # Automation & Workflows
205
+ # --------------------------------------------
206
+
207
+ # N8N (workflow automation)
208
+ # From your N8N instance settings
209
+ N8N_API_KEY=
210
+ N8N_WEBHOOK_URL=
211
+
212
+ # --------------------------------------------
213
+ # Monitoring & Analytics
214
+ # --------------------------------------------
109
215
 
110
- # ============================================================================
111
- # Database Configuration (if applicable)
112
- # ============================================================================
113
- # DATABASE_URL=postgresql://user:password@localhost:5432/dbname
216
+ # Sentry (error tracking)
217
+ SENTRY_DSN=
218
+
219
+ # --------------------------------------------
220
+ # Cloud Providers
221
+ # --------------------------------------------
222
+
223
+ # Railway (deployment)
224
+ RAILWAY_TOKEN=
225
+
226
+ # Vercel (deployment)
227
+ VERCEL_TOKEN=
228
+
229
+ # --------------------------------------------
230
+ # AIOS Core Configuration
231
+ # --------------------------------------------
232
+ NODE_ENV=development
233
+ AIOS_VERSION=2.1.2
114
234
 
115
- # ============================================================================
235
+ # --------------------------------------------
116
236
  # Custom Configuration
117
- # ============================================================================
118
- # Add your custom environment variables below
237
+ # --------------------------------------------
238
+ # Add your custom API keys below
119
239
  `;
120
240
 
121
241
  return content;
@@ -235,6 +235,41 @@ async function copyAgentFiles(projectRoot, agentFolder, ideConfig = null) {
235
235
  return copiedFiles;
236
236
  }
237
237
 
238
+ /**
239
+ * Copy .claude/rules folder for Claude Code IDE
240
+ * @param {string} projectRoot - Project root directory
241
+ * @returns {Promise<string[]>} List of copied files
242
+ */
243
+ async function copyClaudeRulesFolder(projectRoot) {
244
+ const sourceDir = path.join(__dirname, '..', '..', '.claude', 'rules');
245
+ const targetDir = path.join(projectRoot, '.claude', 'rules');
246
+ const copiedFiles = [];
247
+
248
+ // Check if source exists
249
+ if (!await fs.pathExists(sourceDir)) {
250
+ return copiedFiles;
251
+ }
252
+
253
+ // Ensure target directory exists
254
+ await fs.ensureDir(targetDir);
255
+
256
+ // Get all files in rules folder
257
+ const files = await fs.readdir(sourceDir);
258
+
259
+ for (const file of files) {
260
+ const sourcePath = path.join(sourceDir, file);
261
+ const targetPath = path.join(targetDir, file);
262
+
263
+ const stat = await fs.stat(sourcePath);
264
+ if (stat.isFile()) {
265
+ await fs.copy(sourcePath, targetPath);
266
+ copiedFiles.push(targetPath);
267
+ }
268
+ }
269
+
270
+ return copiedFiles;
271
+ }
272
+
238
273
  /**
239
274
  * Generate AntiGravity workflow activation file content
240
275
  * @param {string} agentName - Name of the agent (e.g., 'dev', 'architect')
@@ -415,6 +450,19 @@ async function generateIDEConfigs(selectedIDEs, wizardState, options = {}) {
415
450
  }
416
451
  }
417
452
 
453
+ // For Claude Code, also copy .claude/rules folder
454
+ if (ideKey === 'claude-code') {
455
+ spinner.start('Copying Claude Code rules...');
456
+ const rulesFiles = await copyClaudeRulesFolder(projectRoot);
457
+ createdFiles.push(...rulesFiles);
458
+ if (rulesFiles.length > 0) {
459
+ createdFolders.push(path.join(projectRoot, '.claude', 'rules'));
460
+ spinner.succeed(`Copied ${rulesFiles.length} rule file(s) to .claude/rules`);
461
+ } else {
462
+ spinner.info('No rule files to copy');
463
+ }
464
+ }
465
+
418
466
  } catch (error) {
419
467
  spinner.fail(`Failed to configure ${ide.name}`);
420
468
  errors.push({ ide: ide.name, error: error.message });
@@ -30,7 +30,7 @@ const {
30
30
  const {
31
31
  installLLMRouting,
32
32
  isLLMRoutingInstalled,
33
- getInstallationSummary
33
+ getInstallationSummary,
34
34
  } = require('../../.aios-core/infrastructure/scripts/llm-routing/install-llm-routing');
35
35
 
36
36
  /**
@@ -484,7 +484,7 @@ async function runWizard() {
484
484
  const llmResult = installLLMRouting({
485
485
  projectRoot: process.cwd(),
486
486
  onProgress: (msg) => console.log(` ${msg}`),
487
- onError: (msg) => console.error(` ${msg}`)
487
+ onError: (msg) => console.error(` ${msg}`),
488
488
  });
489
489
 
490
490
  if (llmResult.success) {