@nclamvn/vibecode-cli 2.2.0 → 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 +101 -2
- package/package.json +3 -1
- package/src/commands/config.js +42 -4
- package/src/commands/deploy.js +728 -0
- package/src/commands/favorite.js +412 -0
- package/src/commands/feedback.js +473 -0
- package/src/commands/go.js +170 -4
- package/src/commands/history.js +249 -0
- package/src/commands/images.js +465 -0
- package/src/commands/preview.js +554 -0
- package/src/commands/voice.js +580 -0
- package/src/commands/watch.js +3 -20
- package/src/index.js +49 -2
- package/src/services/image-service.js +513 -0
- package/src/utils/history.js +357 -0
- package/src/utils/notifications.js +343 -0
package/bin/vibecode.js
CHANGED
|
@@ -35,6 +35,14 @@ import {
|
|
|
35
35
|
migrateCommand,
|
|
36
36
|
// Phase M Commands
|
|
37
37
|
templatesCommand,
|
|
38
|
+
previewCommand,
|
|
39
|
+
imagesCommand,
|
|
40
|
+
deployCommand,
|
|
41
|
+
feedbackCommand,
|
|
42
|
+
voiceCommand,
|
|
43
|
+
// Phase M8 Commands
|
|
44
|
+
historyCommand,
|
|
45
|
+
favoriteCommand,
|
|
38
46
|
VERSION
|
|
39
47
|
} from '../src/index.js';
|
|
40
48
|
|
|
@@ -128,6 +136,7 @@ program
|
|
|
128
136
|
.description('Manage Vibecode configuration')
|
|
129
137
|
.option('--show', 'Show current configuration')
|
|
130
138
|
.option('--provider <name>', 'Set default AI provider')
|
|
139
|
+
.option('--notifications <on|off>', 'Enable/disable desktop notifications')
|
|
131
140
|
.action(configCommand);
|
|
132
141
|
|
|
133
142
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -142,8 +151,15 @@ program
|
|
|
142
151
|
.option('--color <color>', 'Primary brand color (hex)')
|
|
143
152
|
.option('-i, --iterate', 'Enable iterative build mode')
|
|
144
153
|
.option('-m, --max <n>', 'Max iterations for iterative mode', parseInt)
|
|
145
|
-
.option('-o, --open', 'Auto-open
|
|
146
|
-
.option('-p, --preview', '
|
|
154
|
+
.option('-o, --open', 'Auto-open folder when done')
|
|
155
|
+
.option('-p, --preview', 'Start dev server and open browser after build')
|
|
156
|
+
.option('--port <port>', 'Preview port number', '3000')
|
|
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')
|
|
147
163
|
.action((description, options) => {
|
|
148
164
|
const desc = Array.isArray(description) ? description.join(' ') : description;
|
|
149
165
|
goCommand(desc, options);
|
|
@@ -164,6 +180,89 @@ program
|
|
|
164
180
|
.option('-q, --quiet', 'Non-interactive mode')
|
|
165
181
|
.action(templatesCommand);
|
|
166
182
|
|
|
183
|
+
program
|
|
184
|
+
.command('preview')
|
|
185
|
+
.description('Start dev server and open in browser')
|
|
186
|
+
.option('-p, --port <port>', 'Port number', '3000')
|
|
187
|
+
.option('-q, --qr', 'Show QR code for mobile')
|
|
188
|
+
.option('-s, --stop', 'Stop running preview server')
|
|
189
|
+
.option('--no-open', 'Do not open browser')
|
|
190
|
+
.option('-d, --detach', 'Run in background')
|
|
191
|
+
.action(previewCommand);
|
|
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
|
+
|
|
167
266
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
168
267
|
// Phase F Commands - Agent Mode
|
|
169
268
|
// ─────────────────────────────────────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nclamvn/vibecode-cli",
|
|
3
|
-
"version": "
|
|
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",
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
"commander": "^12.0.0",
|
|
36
36
|
"fs-extra": "^11.2.0",
|
|
37
37
|
"inquirer": "^9.2.12",
|
|
38
|
+
"open": "^11.0.0",
|
|
38
39
|
"ora": "^8.0.1",
|
|
40
|
+
"qrcode": "^1.5.4",
|
|
39
41
|
"yaml": "^2.3.4"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
package/src/commands/config.js
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
+
}
|