@nclamvn/vibecode-cli 2.2.1 → 3.0.0

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/bin/vibecode.js CHANGED
@@ -36,6 +36,13 @@ import {
36
36
  // Phase M Commands
37
37
  templatesCommand,
38
38
  previewCommand,
39
+ imagesCommand,
40
+ deployCommand,
41
+ feedbackCommand,
42
+ voiceCommand,
43
+ // Phase M8 Commands
44
+ historyCommand,
45
+ favoriteCommand,
39
46
  VERSION
40
47
  } from '../src/index.js';
41
48
 
@@ -129,6 +136,7 @@ program
129
136
  .description('Manage Vibecode configuration')
130
137
  .option('--show', 'Show current configuration')
131
138
  .option('--provider <name>', 'Set default AI provider')
139
+ .option('--notifications <on|off>', 'Enable/disable desktop notifications')
132
140
  .action(configCommand);
133
141
 
134
142
  // ─────────────────────────────────────────────────────────────────────────────
@@ -147,6 +155,11 @@ program
147
155
  .option('-p, --preview', 'Start dev server and open browser after build')
148
156
  .option('--port <port>', 'Preview port number', '3000')
149
157
  .option('--qr', 'Show QR code for mobile preview')
158
+ .option('--with-images', 'Generate professional images for the project')
159
+ .option('--deploy', 'Auto-deploy after build (to Vercel)')
160
+ .option('--deploy-platform <platform>', 'Deploy platform: vercel, netlify', 'vercel')
161
+ .option('-f, --feedback', 'Enter interactive feedback mode after build')
162
+ .option('--notify', 'Desktop notifications on completion')
150
163
  .action((description, options) => {
151
164
  const desc = Array.isArray(description) ? description.join(' ') : description;
152
165
  goCommand(desc, options);
@@ -177,6 +190,79 @@ program
177
190
  .option('-d, --detach', 'Run in background')
178
191
  .action(previewCommand);
179
192
 
193
+ program
194
+ .command('images [query...]')
195
+ .alias('img')
196
+ .description('AI-powered image generation for projects')
197
+ .option('-s, --search <query>', 'Search for images')
198
+ .option('-g, --generate', 'Generate full image set')
199
+ .option('--hero', 'Generate hero image only')
200
+ .option('--products <count>', 'Generate product images')
201
+ .option('--replace', 'Replace placeholder images in project')
202
+ .option('-l, --list', 'List generated images')
203
+ .option('-t, --theme <theme>', 'Image theme: tech, business, creative, nature')
204
+ .option('-c, --count <n>', 'Number of images to fetch', '8')
205
+ .action((query, options) => {
206
+ const q = Array.isArray(query) ? query.join(' ') : query;
207
+ imagesCommand(q, options);
208
+ });
209
+
210
+ program
211
+ .command('deploy')
212
+ .description('Deploy project to cloud platforms (Vercel, Netlify, etc.)')
213
+ .option('--vercel', 'Deploy to Vercel (recommended)')
214
+ .option('--netlify', 'Deploy to Netlify')
215
+ .option('--github-pages', 'Deploy to GitHub Pages')
216
+ .option('--railway', 'Deploy to Railway')
217
+ .option('-p, --preview', 'Create preview deployment (not production)')
218
+ .option('-d, --domain <domain>', 'Custom domain for deployment')
219
+ .option('-s, --status', 'Show current deployment status')
220
+ .option('--history', 'Show deployment history')
221
+ .option('--notify', 'Desktop notification on completion')
222
+ .action(deployCommand);
223
+
224
+ program
225
+ .command('feedback')
226
+ .alias('fb')
227
+ .description('Interactive feedback mode for incremental changes')
228
+ .option('-p, --preview', 'Auto-start preview server')
229
+ .option('--port <port>', 'Preview port number', '3000')
230
+ .action(feedbackCommand);
231
+
232
+ program
233
+ .command('voice [subcommand]')
234
+ .description('Voice-controlled commands - hands-free coding')
235
+ .option('-a, --auto', 'Auto-execute recognized commands')
236
+ .option('-t, --timeout <seconds>', 'Recording timeout in seconds', '10')
237
+ .option('--whisper', 'Use OpenAI Whisper for transcription')
238
+ .option('--macos', 'Use macOS dictation')
239
+ .option('--text', 'Use text input only')
240
+ .action(voiceCommand);
241
+
242
+ program
243
+ .command('history')
244
+ .description('📜 View and manage command history')
245
+ .option('-l, --limit <n>', 'Number of items to show', '20')
246
+ .option('-s, --search <query>', 'Search history')
247
+ .option('-r, --run <n>', 'Re-run command by index')
248
+ .option('-c, --clear', 'Clear all history')
249
+ .option('--stats', 'Show history statistics')
250
+ .action(historyCommand);
251
+
252
+ program
253
+ .command('favorite [action] [args...]')
254
+ .alias('fav')
255
+ .description('⭐ Manage favorite prompts')
256
+ .option('-n, --name <name>', 'Favorite name')
257
+ .option('-t, --template <id>', 'Use template')
258
+ .option('--tags <tags>', 'Comma-separated tags')
259
+ .option('-y, --yes', 'Skip confirmation')
260
+ .option('--replace', 'Replace all on import')
261
+ .option('--preview', 'Add --preview flag to command')
262
+ .option('--deploy', 'Add --deploy flag to command')
263
+ .option('--notify', 'Add --notify flag to command')
264
+ .action(favoriteCommand);
265
+
180
266
  // ─────────────────────────────────────────────────────────────────────────────
181
267
  // Phase F Commands - Agent Mode
182
268
  // ─────────────────────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nclamvn/vibecode-cli",
3
- "version": "2.2.1",
3
+ "version": "3.0.0",
4
4
  "description": "Build software with discipline - AI coding with guardrails",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -48,22 +48,29 @@ function getDefaultConfig() {
48
48
  timeout: 30 // minutes
49
49
  },
50
50
  autoEvidence: true,
51
- verbose: false
51
+ verbose: false,
52
+ notifications: true // Desktop notifications
52
53
  };
53
54
  }
54
55
 
55
56
  export async function configCommand(options = {}) {
56
57
  try {
57
58
  // Check workspace for set operations
58
- if (options.provider || options.set) {
59
+ if (options.provider || options.notifications !== undefined) {
59
60
  if (!await workspaceExists()) {
60
61
  printError('No Vibecode workspace found. Run `vibecode init` first.');
61
62
  process.exit(1);
62
63
  }
63
64
  }
64
65
 
66
+ // Set notifications
67
+ if (options.notifications !== undefined) {
68
+ await setNotifications(options.notifications);
69
+ return;
70
+ }
71
+
65
72
  // Show current config
66
- if (options.show || (!options.provider && !options.set)) {
73
+ if (options.show || (!options.provider)) {
67
74
  await showConfig();
68
75
  return;
69
76
  }
@@ -105,7 +112,8 @@ Provider: ${config.provider}
105
112
  Flags: ${config.claudeCode?.flags?.join(', ') || 'none'}
106
113
  Timeout: ${config.claudeCode?.timeout || 30} minutes
107
114
  Auto Evidence: ${config.autoEvidence ? 'enabled' : 'disabled'}
108
- Verbose: ${config.verbose ? 'enabled' : 'disabled'}`;
115
+ Verbose: ${config.verbose ? 'enabled' : 'disabled'}
116
+ Notifications: ${config.notifications !== false ? 'enabled' : 'disabled'}`;
109
117
 
110
118
  printBox(content, { borderColor: 'cyan' });
111
119
 
@@ -147,3 +155,33 @@ async function setProvider(providerName) {
147
155
  printSuccess(`Provider set to: ${providerName}`);
148
156
  console.log(chalk.gray(`Config saved to: ${getConfigPath()}`));
149
157
  }
158
+
159
+ /**
160
+ * Set notifications on/off
161
+ */
162
+ async function setNotifications(value) {
163
+ const enabled = value === 'on' || value === true || value === 'true';
164
+
165
+ const config = await loadConfig();
166
+ config.notifications = enabled;
167
+ await saveConfig(config);
168
+
169
+ if (enabled) {
170
+ printSuccess('Desktop notifications enabled');
171
+ } else {
172
+ printSuccess('Desktop notifications disabled');
173
+ }
174
+ console.log(chalk.gray(`Config saved to: ${getConfigPath()}`));
175
+ }
176
+
177
+ /**
178
+ * Get notifications setting from config
179
+ */
180
+ export async function getNotificationsSetting() {
181
+ try {
182
+ const config = await loadConfig();
183
+ return config.notifications !== false;
184
+ } catch {
185
+ return true; // Default to enabled
186
+ }
187
+ }