myaidev-method 0.2.22 → 0.2.24-1

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.
Files changed (59) hide show
  1. package/USER_GUIDE.md +453 -48
  2. package/bin/cli.js +236 -38
  3. package/content-rules.example.md +80 -0
  4. package/dist/mcp/mcp-launcher.js +237 -0
  5. package/dist/server/.tsbuildinfo +1 -1
  6. package/dist/server/auth/layers.d.ts +1 -1
  7. package/dist/server/auth/services/AuthService.d.ts +1 -1
  8. package/dist/server/auth/services/TokenService.js.map +1 -1
  9. package/dist/server/auth/services/example.d.ts +5 -5
  10. package/package.json +22 -17
  11. package/src/config/workflows.js +28 -44
  12. package/src/index.js +21 -8
  13. package/src/lib/ascii-banner.js +214 -0
  14. package/src/lib/config-manager.js +470 -0
  15. package/src/lib/content-generator.js +427 -0
  16. package/src/lib/html-conversion-utils.js +843 -0
  17. package/src/lib/seo-optimizer.js +515 -0
  18. package/src/lib/update-manager.js +2 -1
  19. package/src/lib/visual-config-utils.js +321 -295
  20. package/src/lib/visual-generation-utils.js +1000 -811
  21. package/src/lib/wordpress-client.js +633 -0
  22. package/src/lib/workflow-installer.js +3 -3
  23. package/src/scripts/configure-wordpress-mcp.js +8 -3
  24. package/src/scripts/generate-visual-cli.js +365 -235
  25. package/src/scripts/html-conversion-cli.js +526 -0
  26. package/src/scripts/init/configure.js +436 -0
  27. package/src/scripts/init/install.js +460 -0
  28. package/src/scripts/ping.js +250 -0
  29. package/src/scripts/utils/file-utils.js +404 -0
  30. package/src/scripts/utils/logger.js +300 -0
  31. package/src/scripts/utils/write-content.js +293 -0
  32. package/src/scripts/wordpress/publish-to-wordpress.js +165 -0
  33. package/src/server/auth/services/TokenService.ts +1 -1
  34. package/src/templates/claude/agents/content-rules-setup.md +657 -0
  35. package/src/templates/claude/agents/content-writer.md +328 -1
  36. package/src/templates/claude/agents/visual-content-generator.md +311 -8
  37. package/src/templates/claude/commands/myai-configure.md +1 -1
  38. package/src/templates/claude/commands/myai-content-rules-setup.md +204 -0
  39. package/src/templates/claude/commands/myai-convert-html.md +186 -0
  40. package/src/templates/codex/commands/myai-content-rules-setup.md +85 -0
  41. package/src/templates/diagrams/architecture.d2 +52 -0
  42. package/src/templates/diagrams/flowchart.d2 +42 -0
  43. package/src/templates/diagrams/sequence.d2 +47 -0
  44. package/src/templates/docs/content-creation-guide.md +164 -0
  45. package/src/templates/docs/deployment-guide.md +336 -0
  46. package/src/templates/docs/visual-generation-guide.md +248 -0
  47. package/src/templates/docs/wordpress-publishing-guide.md +208 -0
  48. package/src/templates/gemini/commands/myai-content-rules-setup.toml +57 -0
  49. package/src/templates/infographics/comparison-table.html +347 -0
  50. package/src/templates/infographics/data-chart.html +268 -0
  51. package/src/templates/infographics/process-flow.html +365 -0
  52. package/.claude/mcp/sparc-orchestrator-server.js +0 -607
  53. package/.claude/mcp/wordpress-server.js +0 -1277
  54. package/src/agents/content-writer-prompt.md +0 -164
  55. package/src/agents/content-writer.json +0 -70
  56. package/src/templates/claude/mcp_config.json +0 -74
  57. package/src/templates/claude/slash_commands.json +0 -166
  58. package/src/templates/scripts/configure-wordpress-mcp.js +0 -181
  59. /package/src/scripts/{wordpress-health-check.js → wordpress/wordpress-health-check.js} +0 -0
@@ -12,268 +12,398 @@
12
12
  * Platform support: Claude Code, Gemini CLI, Codex CLI
13
13
  */
14
14
 
15
- import { generateImage, generateVideoVeo, estimateCost, validateAPIKeys } from '../lib/visual-generation-utils.js';
16
- import { saveImage, saveVideo, generateMarkdownReference, checkBudgetLimit, getTodaysCost, getMonthCost } from '../lib/asset-management.js';
17
- import { hasAnyAPIKeys, getConfigStatusMessage, getServiceDisplayInfo } from '../lib/visual-config-utils.js';
18
- import chalk from 'chalk';
19
- import ora from 'ora';
15
+ import {
16
+ generateImage,
17
+ generateVideoVeo,
18
+ estimateCost,
19
+ validateAPIKeys,
20
+ } from "../lib/visual-generation-utils.js";
21
+ import {
22
+ saveImage,
23
+ saveVideo,
24
+ generateMarkdownReference,
25
+ checkBudgetLimit,
26
+ getTodaysCost,
27
+ getMonthCost,
28
+ } from "../lib/asset-management.js";
29
+ import {
30
+ hasAnyAPIKeys,
31
+ getConfigStatusMessage,
32
+ getServiceDisplayInfo,
33
+ } from "../lib/visual-config-utils.js";
34
+ import chalk from "chalk";
35
+ import ora from "ora";
20
36
 
21
37
  // Parse command line arguments
22
38
  const args = process.argv.slice(2);
23
39
 
24
- if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
25
- showHelp();
26
- process.exit(0);
40
+ if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
41
+ showHelp();
42
+ process.exit(0);
27
43
  }
28
44
 
29
45
  // Extract prompt (first non-option argument)
30
- const prompt = args.find(arg => !arg.startsWith('--'));
46
+ const prompt = args.find((arg) => !arg.startsWith("--"));
31
47
 
32
48
  if (!prompt) {
33
- console.error(chalk.red('āŒ Error: Prompt is required'));
34
- console.log('\nUsage: node generate-visual-cli.js "your prompt" --type=hero --service=gemini');
35
- process.exit(1);
49
+ console.error(chalk.red("āŒ Error: Prompt is required"));
50
+ console.log(
51
+ '\nUsage: node generate-visual-cli.js "your prompt" --type=hero --service=gemini',
52
+ );
53
+ process.exit(1);
36
54
  }
37
55
 
38
56
  // Parse options
39
57
  const options = {
40
- type: getOption('type', 'hero'),
41
- service: getOption('service', null),
42
- size: getOption('size', '1024x1024'),
43
- quality: getOption('quality', 'standard'),
44
- description: getOption('description', null)
58
+ type: getOption("type", "hero"),
59
+ service: getOption("service", null),
60
+ size: getOption("size", "1024x1024"),
61
+ quality: getOption("quality", "standard"),
62
+ description: getOption("description", null),
45
63
  };
46
64
 
47
65
  // Main execution
48
66
  (async () => {
49
- try {
50
- // Check configuration
51
- if (!hasAnyAPIKeys()) {
52
- console.log(chalk.yellow(getConfigStatusMessage()));
53
- process.exit(1);
54
- }
55
-
56
- // Validate type
57
- const validTypes = ['hero', 'illustration', 'diagram', 'screenshot', 'video'];
58
- if (!validTypes.includes(options.type)) {
59
- console.error(chalk.red(`āŒ Invalid type: ${options.type}`));
60
- console.log(chalk.gray(`Valid types: ${validTypes.join(', ')}`));
61
- process.exit(1);
62
- }
63
-
64
- // Display configuration
65
- console.log(chalk.blue('\nšŸŽØ Visual Content Generation\n'));
66
- console.log(chalk.gray(`Type: ${options.type}`));
67
- console.log(chalk.gray(`Prompt: "${prompt}"`));
68
- if (options.service) {
69
- console.log(chalk.gray(`Service: ${options.service}`));
70
- }
71
- console.log('');
72
-
73
- // Estimate cost
74
- let service = options.service;
75
- if (!service) {
76
- // Auto-select based on available services
77
- const validation = validateAPIKeys();
78
- service = validation.availableServices[0];
79
- console.log(chalk.gray(`Auto-selected service: ${service}`));
80
- }
81
-
82
- const cost = estimateCost(service, { quality: options.quality, size: options.size });
83
-
84
- // Check budget
85
- const budget = await checkBudgetLimit(cost);
86
- const todayCost = await getTodaysCost();
87
- const monthCost = await getMonthCost();
88
-
89
- console.log(chalk.cyan('šŸ’° Cost Estimate:'));
90
- console.log(chalk.gray(` This generation: $${cost.toFixed(2)}`));
91
- console.log(chalk.gray(` Today: $${todayCost.toFixed(2)} / $${budget.dailyBudget.toFixed(2)} (${Math.round((todayCost/budget.dailyBudget)*100)}%)`));
92
- console.log(chalk.gray(` Month: $${monthCost.toFixed(2)} / $${budget.monthlyBudget.toFixed(2)} (${Math.round((monthCost/budget.monthlyBudget)*100)}%)`));
93
- console.log('');
94
-
95
- // Check if budget exceeded
96
- if (budget.exceedsDailyBudget) {
97
- console.error(chalk.red('āŒ Daily budget limit exceeded!'));
98
- console.log(chalk.yellow(`\nCurrent usage: $${budget.todaysCost.toFixed(2)}`));
99
- console.log(chalk.yellow(`Daily limit: $${budget.dailyBudget.toFixed(2)}`));
100
- console.log(chalk.gray('\nOptions:'));
101
- console.log(chalk.gray('1. Increase VISUAL_DAILY_BUDGET in .env'));
102
- console.log(chalk.gray('2. Wait until tomorrow (resets at midnight)'));
103
- process.exit(1);
104
- }
105
-
106
- if (budget.exceedsMonthlyBudget) {
107
- console.error(chalk.red('āŒ Monthly budget limit exceeded!'));
108
- console.log(chalk.yellow(`\nCurrent usage: $${budget.monthCost.toFixed(2)}`));
109
- console.log(chalk.yellow(`Monthly limit: $${budget.monthlyBudget.toFixed(2)}`));
110
- console.log(chalk.gray('\nOptions:'));
111
- console.log(chalk.gray('1. Increase VISUAL_MONTHLY_BUDGET in .env'));
112
- console.log(chalk.gray('2. Wait until next month'));
113
- process.exit(1);
114
- }
115
-
116
- // Warnings
117
- if (budget.dailyWarning) {
118
- console.log(chalk.yellow(`āš ļø Warning: Approaching daily budget limit (${Math.round((budget.newDailyCost/budget.dailyBudget)*100)}%)`));
119
- console.log('');
120
- }
121
-
122
- // Generate content
123
- const spinner = ora(`Generating ${options.type} using ${service}...`).start();
124
-
125
- let result;
126
- let saved;
127
-
128
- if (options.type === 'video') {
129
- // Generate video
130
- spinner.text = `Generating video using ${service}...`;
131
- result = await generateVideoVeo(prompt, {
132
- duration: 5,
133
- aspectRatio: '16:9'
134
- });
135
-
136
- spinner.text = 'Saving video...';
137
- saved = await saveVideo(result.buffer || Buffer.from(result.data, 'base64'), {
138
- description: options.description || prompt,
139
- service: result.service,
140
- cost: result.cost,
141
- prompt: prompt,
142
- duration: result.duration || 5
143
- });
144
-
145
- } else {
146
- // Generate image
147
- spinner.text = `Generating ${options.type} using ${service}...`;
148
- result = await generateImage(prompt, {
149
- preferredService: service,
150
- type: options.type,
151
- quality: options.quality,
152
- size: options.size
153
- });
154
-
155
- spinner.text = 'Saving image...';
156
- saved = await saveImage(result.buffer, {
157
- type: options.type,
158
- description: options.description || prompt,
159
- service: result.service,
160
- cost: result.cost,
161
- prompt: result.prompt
162
- });
163
- }
164
-
165
- spinner.succeed(chalk.green(`${options.type === 'video' ? 'Video' : 'Image'} generated successfully!`));
166
-
167
- // Display results
168
- console.log('');
169
- console.log(chalk.cyan(`šŸ“ø Details:`));
170
-
171
- const serviceInfo = getServiceDisplayInfo(result.service);
172
- if (serviceInfo) {
173
- console.log(chalk.gray(` Service: ${serviceInfo.name}`));
174
- }
175
-
176
- console.log(chalk.gray(` Type: ${options.type.charAt(0).toUpperCase() + options.type.slice(1)}`));
177
- console.log(chalk.gray(` Cost: $${result.cost.toFixed(2)}`));
178
- console.log(chalk.gray(` File: ${saved.relativePath}`));
179
- console.log(chalk.gray(` Size: ${(saved.size / 1024).toFixed(1)} KB`));
180
- if (options.type === 'video' && result.duration) {
181
- console.log(chalk.gray(` Duration: ${result.duration}s`));
182
- }
183
-
184
- // Display updated budget
185
- const newTodayCost = await getTodaysCost();
186
- const newMonthCost = await getMonthCost();
187
-
188
- console.log('');
189
- console.log(chalk.cyan('šŸ’° Updated Budget:'));
190
- console.log(chalk.gray(` Today: $${newTodayCost.toFixed(2)} / $${budget.dailyBudget.toFixed(2)} (${Math.round((newTodayCost/budget.dailyBudget)*100)}%)`));
191
- console.log(chalk.gray(` Month: $${newMonthCost.toFixed(2)} / $${budget.monthlyBudget.toFixed(2)} (${Math.round((newMonthCost/budget.monthlyBudget)*100)}%)`));
192
-
193
- // Generate markdown
194
- const altText = `${options.type} ${options.type === 'video' ? 'video' : 'image'}: ${prompt}`;
195
- const markdown = generateMarkdownReference(saved.relativePath, altText);
196
-
197
- console.log('');
198
- console.log(chalk.cyan('šŸ“‹ Markdown Reference:'));
199
- console.log(chalk.white(markdown));
200
- console.log('');
201
- console.log(chalk.gray('Copy and paste into your content ↑'));
202
- console.log('');
203
-
204
- } catch (error) {
205
- console.error(chalk.red(`\nāŒ Error: ${error.message}`));
206
-
207
- // Provide helpful error messages
208
- if (error.message.includes('rate_limit') || error.message.includes('rate limit')) {
209
- console.log(chalk.yellow('\nāš ļø Rate limited by API'));
210
- console.log(chalk.gray('Options:'));
211
- console.log(chalk.gray('1. Wait 60 seconds and try again'));
212
- console.log(chalk.gray('2. Switch to different service: --service=dalle'));
213
- console.log(chalk.gray('3. Check your API quota limits'));
214
- } else if (error.message.includes('API key') || error.message.includes('unauthorized')) {
215
- console.log(chalk.yellow('\nāš ļø API key issue'));
216
- console.log(chalk.gray('Run configuration: node src/scripts/configure-visual-apis.js'));
217
- }
218
-
219
- process.exit(1);
220
- }
67
+ try {
68
+ // Check configuration
69
+ if (!hasAnyAPIKeys()) {
70
+ console.log(chalk.yellow(getConfigStatusMessage()));
71
+ process.exit(1);
72
+ }
73
+
74
+ // Validate type
75
+ const validTypes = [
76
+ "hero",
77
+ "illustration",
78
+ "diagram",
79
+ "screenshot",
80
+ "video",
81
+ ];
82
+ if (!validTypes.includes(options.type)) {
83
+ console.error(chalk.red(`āŒ Invalid type: ${options.type}`));
84
+ console.log(chalk.gray(`Valid types: ${validTypes.join(", ")}`));
85
+ process.exit(1);
86
+ }
87
+
88
+ // Display configuration
89
+ console.log(chalk.blue("\nšŸŽØ Visual Content Generation\n"));
90
+ console.log(chalk.gray(`Type: ${options.type}`));
91
+ console.log(chalk.gray(`Prompt: "${prompt}"`));
92
+ if (options.service) {
93
+ console.log(chalk.gray(`Service: ${options.service}`));
94
+ }
95
+ console.log("");
96
+
97
+ // Estimate cost
98
+ let service = options.service;
99
+ if (!service) {
100
+ // Auto-select based on available services
101
+ const validation = validateAPIKeys();
102
+ service = validation.availableServices[0];
103
+ console.log(chalk.gray(`Auto-selected service: ${service}`));
104
+ }
105
+
106
+ const cost = estimateCost(service, {
107
+ quality: options.quality,
108
+ size: options.size,
109
+ });
110
+
111
+ // Check budget
112
+ const budget = await checkBudgetLimit(cost);
113
+ const todayCost = await getTodaysCost();
114
+ const monthCost = await getMonthCost();
115
+
116
+ console.log(chalk.cyan("šŸ’° Cost Estimate:"));
117
+ console.log(chalk.gray(` This generation: $${cost.toFixed(2)}`));
118
+ console.log(
119
+ chalk.gray(
120
+ ` Today: $${todayCost.toFixed(2)} / $${budget.dailyBudget.toFixed(2)} (${Math.round((todayCost / budget.dailyBudget) * 100)}%)`,
121
+ ),
122
+ );
123
+ console.log(
124
+ chalk.gray(
125
+ ` Month: $${monthCost.toFixed(2)} / $${budget.monthlyBudget.toFixed(2)} (${Math.round((monthCost / budget.monthlyBudget) * 100)}%)`,
126
+ ),
127
+ );
128
+ console.log("");
129
+
130
+ // Check if budget exceeded
131
+ if (budget.exceedsDailyBudget) {
132
+ console.error(chalk.red("āŒ Daily budget limit exceeded!"));
133
+ console.log(
134
+ chalk.yellow(`\nCurrent usage: $${budget.todaysCost.toFixed(2)}`),
135
+ );
136
+ console.log(
137
+ chalk.yellow(`Daily limit: $${budget.dailyBudget.toFixed(2)}`),
138
+ );
139
+ console.log(chalk.gray("\nOptions:"));
140
+ console.log(chalk.gray("1. Increase VISUAL_DAILY_BUDGET in .env"));
141
+ console.log(chalk.gray("2. Wait until tomorrow (resets at midnight)"));
142
+ process.exit(1);
143
+ }
144
+
145
+ if (budget.exceedsMonthlyBudget) {
146
+ console.error(chalk.red("āŒ Monthly budget limit exceeded!"));
147
+ console.log(
148
+ chalk.yellow(`\nCurrent usage: $${budget.monthCost.toFixed(2)}`),
149
+ );
150
+ console.log(
151
+ chalk.yellow(`Monthly limit: $${budget.monthlyBudget.toFixed(2)}`),
152
+ );
153
+ console.log(chalk.gray("\nOptions:"));
154
+ console.log(chalk.gray("1. Increase VISUAL_MONTHLY_BUDGET in .env"));
155
+ console.log(chalk.gray("2. Wait until next month"));
156
+ process.exit(1);
157
+ }
158
+
159
+ // Warnings
160
+ if (budget.dailyWarning) {
161
+ console.log(
162
+ chalk.yellow(
163
+ `āš ļø Warning: Approaching daily budget limit (${Math.round((budget.newDailyCost / budget.dailyBudget) * 100)}%)`,
164
+ ),
165
+ );
166
+ console.log("");
167
+ }
168
+
169
+ // Generate content
170
+ const spinner = ora(
171
+ `Generating ${options.type} using ${service}...`,
172
+ ).start();
173
+
174
+ let result;
175
+ let saved;
176
+
177
+ if (options.type === "video") {
178
+ // Generate video
179
+ spinner.text = `Generating video using ${service}...`;
180
+ result = await generateVideoVeo(prompt, {
181
+ duration: 5,
182
+ aspectRatio: "16:9",
183
+ });
184
+
185
+ spinner.text = "Saving video...";
186
+ saved = await saveVideo(
187
+ result.buffer || Buffer.from(result.data, "base64"),
188
+ {
189
+ description: options.description || prompt,
190
+ service: result.service,
191
+ cost: result.cost,
192
+ prompt: prompt,
193
+ duration: result.duration || 5,
194
+ },
195
+ );
196
+ } else {
197
+ // Generate image
198
+ spinner.text = `Generating ${options.type} using ${service}...`;
199
+ result = await generateImage(prompt, {
200
+ preferredService: service,
201
+ type: options.type,
202
+ quality: options.quality,
203
+ size: options.size,
204
+ });
205
+
206
+ spinner.text = "Saving image...";
207
+ saved = await saveImage(result.buffer, {
208
+ type: options.type,
209
+ description: options.description || prompt,
210
+ service: result.service,
211
+ cost: result.cost,
212
+ prompt: result.prompt,
213
+ });
214
+ }
215
+
216
+ spinner.succeed(
217
+ chalk.green(
218
+ `${options.type === "video" ? "Video" : "Image"} generated successfully!`,
219
+ ),
220
+ );
221
+
222
+ // Display results
223
+ console.log("");
224
+ console.log(chalk.cyan(`šŸ“ø Details:`));
225
+
226
+ const serviceInfo = getServiceDisplayInfo(result.service);
227
+ if (serviceInfo) {
228
+ console.log(chalk.gray(` Service: ${serviceInfo.name}`));
229
+ }
230
+
231
+ console.log(
232
+ chalk.gray(
233
+ ` Type: ${options.type.charAt(0).toUpperCase() + options.type.slice(1)}`,
234
+ ),
235
+ );
236
+ console.log(chalk.gray(` Cost: $${result.cost.toFixed(2)}`));
237
+ console.log(chalk.gray(` File: ${saved.relativePath}`));
238
+ console.log(chalk.gray(` Size: ${(saved.size / 1024).toFixed(1)} KB`));
239
+ if (options.type === "video" && result.duration) {
240
+ console.log(chalk.gray(` Duration: ${result.duration}s`));
241
+ }
242
+
243
+ // Display updated budget
244
+ const newTodayCost = await getTodaysCost();
245
+ const newMonthCost = await getMonthCost();
246
+
247
+ console.log("");
248
+ console.log(chalk.cyan("šŸ’° Updated Budget:"));
249
+ console.log(
250
+ chalk.gray(
251
+ ` Today: $${newTodayCost.toFixed(2)} / $${budget.dailyBudget.toFixed(2)} (${Math.round((newTodayCost / budget.dailyBudget) * 100)}%)`,
252
+ ),
253
+ );
254
+ console.log(
255
+ chalk.gray(
256
+ ` Month: $${newMonthCost.toFixed(2)} / $${budget.monthlyBudget.toFixed(2)} (${Math.round((newMonthCost / budget.monthlyBudget) * 100)}%)`,
257
+ ),
258
+ );
259
+
260
+ // Generate markdown
261
+ const altText = `${options.type} ${options.type === "video" ? "video" : "image"}: ${prompt}`;
262
+ const markdown = generateMarkdownReference(saved.relativePath, altText);
263
+
264
+ console.log("");
265
+ console.log(chalk.cyan("šŸ“‹ Markdown Reference:"));
266
+ console.log(chalk.white(markdown));
267
+ console.log("");
268
+ console.log(chalk.gray("Copy and paste into your content ↑"));
269
+ console.log("");
270
+ } catch (error) {
271
+ console.error(chalk.red(`\nāŒ Error: ${error.message}`));
272
+
273
+ // Provide helpful error messages
274
+ if (
275
+ error.message.includes("rate_limit") ||
276
+ error.message.includes("rate limit")
277
+ ) {
278
+ console.log(chalk.yellow("\nāš ļø Rate limited by API"));
279
+ console.log(chalk.gray("Options:"));
280
+ console.log(chalk.gray("1. Wait 60 seconds and try again"));
281
+ console.log(
282
+ chalk.gray("2. Switch to different service: --service=dalle"),
283
+ );
284
+ console.log(chalk.gray("3. Check your API quota limits"));
285
+ } else if (
286
+ error.message.includes("API key") ||
287
+ error.message.includes("unauthorized")
288
+ ) {
289
+ console.log(chalk.yellow("\nāš ļø API key issue"));
290
+ console.log(
291
+ chalk.gray(
292
+ "Run configuration: node src/scripts/configure-visual-apis.js",
293
+ ),
294
+ );
295
+ }
296
+
297
+ process.exit(1);
298
+ }
221
299
  })();
222
300
 
223
301
  /**
224
302
  * Get option value from command line arguments
225
303
  */
226
304
  function getOption(name, defaultValue) {
227
- const arg = args.find(a => a.startsWith(`--${name}=`));
228
- if (arg) {
229
- return arg.split('=')[1];
230
- }
231
- return defaultValue;
305
+ const arg = args.find((a) => a.startsWith(`--${name}=`));
306
+ if (arg) {
307
+ return arg.split("=")[1];
308
+ }
309
+ return defaultValue;
232
310
  }
233
311
 
234
312
  /**
235
313
  * Show help message
236
314
  */
237
315
  function showHelp() {
238
- console.log(chalk.blue('\nšŸŽØ Visual Content Generation CLI\n'));
239
-
240
- console.log(chalk.white('Usage:'));
241
- console.log(chalk.gray(' node generate-visual-cli.js "prompt" [options]\n'));
242
-
243
- console.log(chalk.white('Options:'));
244
- console.log(chalk.gray(' --type=<type> Content type (default: hero)'));
245
- console.log(chalk.gray(' Values: hero, illustration, diagram, screenshot, video'));
246
- console.log(chalk.gray(' --service=<service> AI service (default: auto-select)'));
247
- console.log(chalk.gray(' Values: gemini, imagen, dalle, veo'));
248
- console.log(chalk.gray(' --size=<size> Image size (default: 1024x1024)'));
249
- console.log(chalk.gray(' Values: 1024x1024, 1792x1024, 1024x1792'));
250
- console.log(chalk.gray(' --quality=<quality> Quality level (default: standard)'));
251
- console.log(chalk.gray(' Values: standard, hd'));
252
- console.log(chalk.gray(' --description=<desc> Filename description (default: from prompt)\n'));
253
-
254
- console.log(chalk.white('Examples:'));
255
- console.log(chalk.gray(' # Generate hero image (auto-select service)'));
256
- console.log(chalk.cyan(' node generate-visual-cli.js "Modern developer workspace"\n'));
257
-
258
- console.log(chalk.gray(' # Generate diagram with Gemini'));
259
- console.log(chalk.cyan(' node generate-visual-cli.js "System architecture" --type=diagram --service=gemini\n'));
260
-
261
- console.log(chalk.gray(' # Generate HD illustration with DALL-E'));
262
- console.log(chalk.cyan(' node generate-visual-cli.js "AI brain network" --type=illustration --service=dalle --quality=hd\n'));
263
-
264
- console.log(chalk.gray(' # Generate video'));
265
- console.log(chalk.cyan(' node generate-visual-cli.js "Product demo" --type=video --service=veo\n'));
266
-
267
- console.log(chalk.white('Services:'));
268
- console.log(chalk.gray(' gemini Gemini 2.5 Flash - Fast, $0.02/image'));
269
- console.log(chalk.gray(' imagen Imagen 3 - Premium quality, $0.03/image'));
270
- console.log(chalk.gray(' dalle DALL-E 3 - Creative, $0.04-0.12/image'));
271
- console.log(chalk.gray(' veo Veo 2 - Video generation, $0.10/video\n'));
272
-
273
- console.log(chalk.white('Prerequisites:'));
274
- console.log(chalk.gray(' 1. Configure API keys: node src/scripts/configure-visual-apis.js'));
275
- console.log(chalk.gray(' 2. Or add to .env: GOOGLE_API_KEY=xxx and/or OPENAI_API_KEY=xxx\n'));
276
-
277
- console.log(chalk.white('Documentation:'));
278
- console.log(chalk.gray(' See VISUAL_CONTENT_GENERATION_GUIDE.md for complete guide\n'));
316
+ console.log(chalk.blue("\nšŸŽØ Visual Content Generation CLI\n"));
317
+
318
+ console.log(chalk.white("Usage:"));
319
+ console.log(chalk.gray(' node generate-visual-cli.js "prompt" [options]\n'));
320
+
321
+ console.log(chalk.white("Options:"));
322
+ console.log(
323
+ chalk.gray(" --type=<type> Content type (default: hero)"),
324
+ );
325
+ console.log(
326
+ chalk.gray(
327
+ " Values: hero, illustration, diagram, screenshot, video",
328
+ ),
329
+ );
330
+ console.log(
331
+ chalk.gray(" --service=<service> AI service (default: auto-select)"),
332
+ );
333
+ console.log(
334
+ chalk.gray(
335
+ " Values: gemini, imagen, dalle, veo, nano-banana-pro, flux-pro, flux-dev",
336
+ ),
337
+ );
338
+ console.log(
339
+ chalk.gray(" --size=<size> Image size (default: 1024x1024)"),
340
+ );
341
+ console.log(
342
+ chalk.gray(
343
+ " Values: 1024x1024, 1792x1024, 1024x1792",
344
+ ),
345
+ );
346
+ console.log(
347
+ chalk.gray(" --quality=<quality> Quality level (default: standard)"),
348
+ );
349
+ console.log(chalk.gray(" Values: standard, hd"));
350
+ console.log(
351
+ chalk.gray(
352
+ " --description=<desc> Filename description (default: from prompt)\n",
353
+ ),
354
+ );
355
+
356
+ console.log(chalk.white("Examples:"));
357
+ console.log(chalk.gray(" # Generate hero image (auto-select service)"));
358
+ console.log(
359
+ chalk.cyan(' node generate-visual-cli.js "Modern developer workspace"\n'),
360
+ );
361
+
362
+ console.log(chalk.gray(" # Generate diagram with Gemini"));
363
+ console.log(
364
+ chalk.cyan(
365
+ ' node generate-visual-cli.js "System architecture" --type=diagram --service=gemini\n',
366
+ ),
367
+ );
368
+
369
+ console.log(chalk.gray(" # Generate HD illustration with DALL-E"));
370
+ console.log(
371
+ chalk.cyan(
372
+ ' node generate-visual-cli.js "AI brain network" --type=illustration --service=dalle --quality=hd\n',
373
+ ),
374
+ );
375
+
376
+ console.log(chalk.gray(" # Generate video"));
377
+ console.log(
378
+ chalk.cyan(
379
+ ' node generate-visual-cli.js "Product demo" --type=video --service=veo\n',
380
+ ),
381
+ );
382
+
383
+ console.log(chalk.white("Services:"));
384
+ console.log(chalk.gray(" gemini Gemini 2.5 Flash - Fast, $0.02/image"));
385
+ console.log(
386
+ chalk.gray(" imagen Imagen 3 - Premium quality, $0.03/image"),
387
+ );
388
+ console.log(chalk.gray(" dalle DALL-E 3 - Creative, $0.04-0.12/image"));
389
+ console.log(
390
+ chalk.gray(" veo Veo 2 - Video generation, $0.10/video\n"),
391
+ );
392
+
393
+ console.log(chalk.white("Prerequisites:"));
394
+ console.log(
395
+ chalk.gray(
396
+ " 1. Configure API keys: node src/scripts/configure-visual-apis.js",
397
+ ),
398
+ );
399
+ console.log(
400
+ chalk.gray(
401
+ " 2. Or add to .env: GOOGLE_API_KEY=xxx and/or OPENAI_API_KEY=xxx\n",
402
+ ),
403
+ );
404
+
405
+ console.log(chalk.white("Documentation:"));
406
+ console.log(
407
+ chalk.gray(" See VISUAL_CONTENT_GENERATION_GUIDE.md for complete guide\n"),
408
+ );
279
409
  }