@iservu-inc/adf-cli 0.4.32 → 0.4.34

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/CHANGELOG.md CHANGED
@@ -5,6 +5,104 @@ All notable changes to `@iservu-inc/adf-cli` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.4.34] - 2025-10-04
9
+
10
+ ### ✨ Feature: Multi-Tool Deployment Selection
11
+
12
+ **Changed: Tool Selection from Single to Multi-Select**
13
+ - **Problem:** Could only deploy to one IDE at a time
14
+ - **Solution:** Changed to checkbox multi-select prompt
15
+
16
+ **New Behavior:**
17
+ ```
18
+ ? Select tools (space to select, enter to confirm): (Press <space> to select, <a> to toggle all, <i> to invert selection)
19
+ ❯◯ Windsurf
20
+ ◯ Cursor
21
+ ◯ VSCode/Copilot
22
+ ◯ Claude Code
23
+ ◯ Gemini CLI
24
+ ```
25
+
26
+ **Features:**
27
+ - ✅ Use **spacebar** to select/deselect tools
28
+ - ✅ Use **arrow keys** to navigate
29
+ - ✅ Use **enter** to confirm selection
30
+ - ✅ Select multiple tools at once
31
+ - ✅ Visual checkmarks for selected items
32
+ - ✅ Validation: Must select at least one tool
33
+ - ✅ Deploys to all selected tools sequentially
34
+
35
+ **Implementation:**
36
+ - Changed from `type: 'list'` to `type: 'checkbox'`
37
+ - Changed from single `tool` to array `tools`
38
+ - Loop through each selected tool and deploy
39
+ - Better choice names (e.g., "VSCode/Copilot" instead of "vscode")
40
+ - Validation to prevent empty selection
41
+
42
+ **Code Changes:**
43
+ - init.js:145-171 - Multi-select checkbox implementation
44
+
45
+ **User Experience:**
46
+ ```
47
+ # Example: User selects Windsurf and Cursor
48
+ ✓ Deploying to Windsurf...
49
+ ✓ Complete
50
+
51
+ ✓ Deploying to Cursor...
52
+ ✓ Complete
53
+ ```
54
+
55
+ ---
56
+
57
+ ## [0.4.33] - 2025-10-04
58
+
59
+ ### ✨ Feature: Show Active Provider and Model
60
+
61
+ **Added: Active Configuration Display**
62
+ - **Problem:** All configured providers showed ✓ checkmark, impossible to know which is currently active
63
+ - **Solution:** Track and display currently active provider and model
64
+
65
+ **New Display:**
66
+ ```
67
+ ★ Currently Active: OpenAI GPT - o3
68
+
69
+ ? Select AI provider:
70
+ > Anthropic Claude
71
+ OpenAI GPT ✓ Configured ★ Active
72
+ Google Gemini ✓ Configured
73
+ OpenRouter (Multi-Model) ✓ Configured
74
+ ```
75
+
76
+ **Implementation:**
77
+ - New env variables: `ADF_CURRENT_PROVIDER`, `ADF_CURRENT_MODEL`
78
+ - Saved automatically after successful AI configuration
79
+ - Displayed at top of configuration screen
80
+ - ★ Active indicator in provider list
81
+ - Organized .env file with sections
82
+
83
+ **Code Changes:**
84
+ - ai-config.js:262-280 - Load and display current config
85
+ - ai-config.js:285-303 - Add ★ Active indicator to choices
86
+ - ai-config.js:476-478 - Save current selection
87
+ - ai-config.js:141-180 - Enhanced .env file formatting
88
+
89
+ **Enhanced .env File:**
90
+ ```env
91
+ # AI Provider Configuration for adf-cli
92
+ # DO NOT commit this file to version control
93
+
94
+ # Currently Active Provider and Model
95
+ # (Set automatically when you configure AI provider)
96
+ ADF_CURRENT_PROVIDER="openai"
97
+ ADF_CURRENT_MODEL="o3"
98
+
99
+ # API Keys for Each Provider
100
+ OPENAI_API_KEY="sk-..."
101
+ GOOGLE_API_KEY="..."
102
+ ```
103
+
104
+ ---
105
+
8
106
  ## [0.4.32] - 2025-10-04
9
107
 
10
108
  ### ✨ Improved: Smarter .adf Directory Detection
@@ -143,13 +143,32 @@ async function saveToEnvFile(envPath, key, value) {
143
143
  env[key] = value;
144
144
 
145
145
  const lines = [
146
- '# AI Provider API Keys for adf-cli',
146
+ '# AI Provider Configuration for adf-cli',
147
147
  '# DO NOT commit this file to version control',
148
- ''
148
+ '',
149
+ '# Currently Active Provider and Model',
150
+ '# (Set automatically when you configure AI provider)'
149
151
  ];
150
152
 
153
+ // Add current provider/model first
154
+ const currentKeys = ['ADF_CURRENT_PROVIDER', 'ADF_CURRENT_MODEL'];
155
+ currentKeys.forEach(k => {
156
+ if (env[k]) {
157
+ lines.push(`${k}="${env[k]}"`);
158
+ }
159
+ });
160
+
161
+ // Add separator if we have current config
162
+ if (env['ADF_CURRENT_PROVIDER'] || env['ADF_CURRENT_MODEL']) {
163
+ lines.push('');
164
+ lines.push('# API Keys for Each Provider');
165
+ }
166
+
167
+ // Add all other keys (API keys)
151
168
  for (const [k, v] of Object.entries(env)) {
152
- lines.push(`${k}="${v}"`);
169
+ if (!currentKeys.includes(k)) {
170
+ lines.push(`${k}="${v}"`);
171
+ }
153
172
  }
154
173
 
155
174
  await fs.ensureDir(path.dirname(envPath));
@@ -259,6 +278,10 @@ async function configureAIProvider(projectPath = process.cwd()) {
259
278
  }
260
279
  }
261
280
 
281
+ // Get currently active provider and model
282
+ const currentProvider = process.env.ADF_CURRENT_PROVIDER || existingEnv.ADF_CURRENT_PROVIDER;
283
+ const currentModel = process.env.ADF_CURRENT_MODEL || existingEnv.ADF_CURRENT_MODEL;
284
+
262
285
  if (availableProviders.length > 0) {
263
286
  console.log(chalk.green('✓ Detected API keys for:'));
264
287
  availableProviders.forEach(p => {
@@ -267,25 +290,33 @@ async function configureAIProvider(projectPath = process.cwd()) {
267
290
  console.log('');
268
291
  }
269
292
 
293
+ // Show current active configuration if exists
294
+ if (currentProvider && currentModel) {
295
+ const currentProviderObj = AI_PROVIDERS[currentProvider.toUpperCase()];
296
+ if (currentProviderObj) {
297
+ console.log(chalk.cyan(`★ Currently Active: ${currentProviderObj.name} - ${currentModel}\n`));
298
+ }
299
+ }
300
+
270
301
  // Provider selection
271
302
  const providerChoices = [
272
303
  {
273
- name: `${AI_PROVIDERS.ANTHROPIC.name} ${availableProviders.find(p => p.id === 'anthropic') ? chalk.green('✓ Configured') : ''}`,
304
+ name: `${AI_PROVIDERS.ANTHROPIC.name} ${availableProviders.find(p => p.id === 'anthropic') ? chalk.green('✓ Configured') : ''} ${currentProvider === 'anthropic' ? chalk.cyan('★ Active') : ''}`,
274
305
  value: 'anthropic',
275
306
  short: 'Anthropic'
276
307
  },
277
308
  {
278
- name: `${AI_PROVIDERS.OPENAI.name} ${availableProviders.find(p => p.id === 'openai') ? chalk.green('✓ Configured') : ''}`,
309
+ name: `${AI_PROVIDERS.OPENAI.name} ${availableProviders.find(p => p.id === 'openai') ? chalk.green('✓ Configured') : ''} ${currentProvider === 'openai' ? chalk.cyan('★ Active') : ''}`,
279
310
  value: 'openai',
280
311
  short: 'OpenAI'
281
312
  },
282
313
  {
283
- name: `${AI_PROVIDERS.GOOGLE.name} ${availableProviders.find(p => p.id === 'google') ? chalk.green('✓ Configured') : ''}`,
314
+ name: `${AI_PROVIDERS.GOOGLE.name} ${availableProviders.find(p => p.id === 'google') ? chalk.green('✓ Configured') : ''} ${currentProvider === 'google' ? chalk.cyan('★ Active') : ''}`,
284
315
  value: 'google',
285
316
  short: 'Google'
286
317
  },
287
318
  {
288
- name: `${AI_PROVIDERS.OPENROUTER.name} ${availableProviders.find(p => p.id === 'openrouter') ? chalk.green('✓ Configured') : ''}`,
319
+ name: `${AI_PROVIDERS.OPENROUTER.name} ${availableProviders.find(p => p.id === 'openrouter') ? chalk.green('✓ Configured') : ''} ${currentProvider === 'openrouter' ? chalk.cyan('★ Active') : ''}`,
289
320
  value: 'openrouter',
290
321
  short: 'OpenRouter'
291
322
  }
@@ -461,6 +492,10 @@ async function configureAIProvider(projectPath = process.cwd()) {
461
492
 
462
493
  console.log(chalk.gray('\n' + '━'.repeat(60)) + '\n');
463
494
 
495
+ // Save current provider and model selection to .env for future reference
496
+ await saveToEnvFile(envPath, 'ADF_CURRENT_PROVIDER', selectedProvider.id);
497
+ await saveToEnvFile(envPath, 'ADF_CURRENT_MODEL', config.model);
498
+
464
499
  return config;
465
500
  }
466
501
 
@@ -142,17 +142,32 @@ async function init(options) {
142
142
  ]);
143
143
 
144
144
  if (deployNow) {
145
- const { tool } = await inquirer.prompt([
145
+ const { tools } = await inquirer.prompt([
146
146
  {
147
- type: 'list',
148
- name: 'tool',
149
- message: 'Select tool:',
150
- choices: ['windsurf', 'cursor', 'vscode', 'claude-code', 'gemini-cli']
147
+ type: 'checkbox',
148
+ name: 'tools',
149
+ message: 'Select tools (space to select, enter to confirm):',
150
+ choices: [
151
+ { name: 'Windsurf', value: 'windsurf' },
152
+ { name: 'Cursor', value: 'cursor' },
153
+ { name: 'VSCode/Copilot', value: 'vscode' },
154
+ { name: 'Claude Code', value: 'claude-code' },
155
+ { name: 'Gemini CLI', value: 'gemini-cli' }
156
+ ],
157
+ validate: (answer) => {
158
+ if (answer.length === 0) {
159
+ return 'You must choose at least one tool.';
160
+ }
161
+ return true;
162
+ }
151
163
  }
152
164
  ]);
153
165
 
154
- console.log('');
155
- await deployToTool(tool, { silent: false });
166
+ // Deploy to each selected tool
167
+ for (const tool of tools) {
168
+ console.log('');
169
+ await deployToTool(tool, { silent: false });
170
+ }
156
171
  }
157
172
  }
158
173
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iservu-inc/adf-cli",
3
- "version": "0.4.32",
3
+ "version": "0.4.34",
4
4
  "description": "CLI tool for AgentDevFramework - AI-assisted development framework with multi-provider AI support",
5
5
  "main": "index.js",
6
6
  "bin": {