myaidev-method 0.2.22 → 0.2.23
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/USER_GUIDE.md +453 -48
- package/bin/cli.js +18 -0
- package/content-rules.example.md +80 -0
- package/dist/mcp/mcp-launcher.js +237 -0
- package/dist/server/.tsbuildinfo +1 -1
- package/dist/server/auth/layers.d.ts +1 -1
- package/dist/server/auth/services/AuthService.d.ts +1 -1
- package/dist/server/auth/services/TokenService.js.map +1 -1
- package/dist/server/auth/services/example.d.ts +5 -5
- package/package.json +16 -16
- package/src/index.js +21 -8
- package/src/lib/update-manager.js +2 -1
- package/src/lib/visual-config-utils.js +321 -295
- package/src/lib/visual-generation-utils.js +1000 -811
- package/src/scripts/configure-wordpress-mcp.js +8 -3
- package/src/scripts/generate-visual-cli.js +365 -235
- package/src/scripts/ping.js +250 -0
- package/src/scripts/wordpress/publish-to-wordpress.js +165 -0
- package/src/server/auth/services/TokenService.ts +1 -1
- package/src/templates/claude/agents/content-rules-setup.md +657 -0
- package/src/templates/claude/agents/content-writer.md +328 -1
- package/src/templates/claude/agents/visual-content-generator.md +182 -4
- package/src/templates/claude/commands/myai-configure.md +1 -1
- package/src/templates/claude/commands/myai-content-rules-setup.md +204 -0
- package/src/templates/codex/commands/myai-content-rules-setup.md +85 -0
- package/src/templates/gemini/commands/myai-content-rules-setup.toml +57 -0
- package/.claude/mcp/sparc-orchestrator-server.js +0 -607
- package/.claude/mcp/wordpress-server.js +0 -1277
- package/src/agents/content-writer-prompt.md +0 -164
- package/src/agents/content-writer.json +0 -70
- package/src/templates/claude/mcp_config.json +0 -74
- package/src/templates/claude/slash_commands.json +0 -166
- package/src/templates/scripts/configure-wordpress-mcp.js +0 -181
|
@@ -12,268 +12,398 @@
|
|
|
12
12
|
* Platform support: Claude Code, Gemini CLI, Codex CLI
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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] ===
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
}
|