myaidev-method 0.3.4 → 0.3.5

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 (94) hide show
  1. package/.claude-plugin/plugin.json +0 -1
  2. package/.env.example +5 -4
  3. package/CHANGELOG.md +2 -2
  4. package/CONTENT_CREATION_GUIDE.md +489 -3211
  5. package/DEVELOPER_USE_CASES.md +1 -1
  6. package/MODULAR_INSTALLATION.md +2 -2
  7. package/README.md +39 -33
  8. package/TECHNICAL_ARCHITECTURE.md +1 -1
  9. package/USER_GUIDE.md +242 -190
  10. package/agents/content-editor-agent.md +90 -0
  11. package/agents/content-planner-agent.md +97 -0
  12. package/agents/content-research-agent.md +62 -0
  13. package/agents/content-seo-agent.md +101 -0
  14. package/agents/content-writer-agent.md +69 -0
  15. package/agents/infographic-analyzer-agent.md +63 -0
  16. package/agents/infographic-designer-agent.md +72 -0
  17. package/bin/cli.js +776 -422
  18. package/{content-rules.example.md → content-rules-example.md} +2 -2
  19. package/dist/mcp/health-check.js +82 -68
  20. package/dist/mcp/mcp-config.json +8 -0
  21. package/dist/mcp/openstack-server.js +1746 -1262
  22. package/dist/server/.tsbuildinfo +1 -1
  23. package/extension.json +21 -4
  24. package/package.json +181 -184
  25. package/skills/company-config/SKILL.md +133 -0
  26. package/skills/configure/SKILL.md +1 -1
  27. package/skills/myai-configurator/SKILL.md +77 -0
  28. package/skills/myai-configurator/content-creation-configurator/SKILL.md +516 -0
  29. package/skills/myai-configurator/content-maintenance-configurator/SKILL.md +397 -0
  30. package/skills/myai-content-enrichment/SKILL.md +114 -0
  31. package/skills/myai-content-ideation/SKILL.md +288 -0
  32. package/skills/myai-content-ideation/evals/evals.json +182 -0
  33. package/skills/myai-content-production-coordinator/SKILL.md +946 -0
  34. package/skills/{content-rules-setup → myai-content-rules-setup}/SKILL.md +1 -1
  35. package/skills/{content-verifier → myai-content-verifier}/SKILL.md +1 -1
  36. package/skills/myai-content-writer/SKILL.md +333 -0
  37. package/skills/{infographic → myai-infographic}/SKILL.md +1 -1
  38. package/skills/myai-proprietary-content-verifier/SKILL.md +175 -0
  39. package/skills/myai-proprietary-content-verifier/evals/evals.json +36 -0
  40. package/skills/myai-skill-builder/SKILL.md +699 -0
  41. package/skills/myai-skill-builder/agents/analyzer-agent.md +137 -0
  42. package/skills/myai-skill-builder/agents/comparator-agent.md +77 -0
  43. package/skills/myai-skill-builder/agents/grader-agent.md +103 -0
  44. package/skills/myai-skill-builder/assets/eval_review.html +131 -0
  45. package/skills/myai-skill-builder/references/schemas.md +211 -0
  46. package/skills/myai-skill-builder/scripts/aggregate_benchmark.py +190 -0
  47. package/skills/myai-skill-builder/scripts/generate_review.py +381 -0
  48. package/skills/myai-skill-builder/scripts/package_skill.py +91 -0
  49. package/skills/myai-skill-builder/scripts/run_eval.py +105 -0
  50. package/skills/myai-skill-builder/scripts/run_loop.py +211 -0
  51. package/skills/myai-skill-builder/scripts/utils.py +123 -0
  52. package/skills/myai-visual-generator/SKILL.md +125 -0
  53. package/skills/myai-visual-generator/evals/evals.json +155 -0
  54. package/skills/myai-visual-generator/references/infographic-pipeline.md +73 -0
  55. package/skills/myai-visual-generator/references/research-visuals.md +57 -0
  56. package/skills/myai-visual-generator/references/services.md +89 -0
  57. package/skills/myai-visual-generator/scripts/visual-generation-utils.js +1272 -0
  58. package/skills/myaidev-figma/SKILL.md +212 -0
  59. package/skills/myaidev-figma/capture.js +133 -0
  60. package/skills/myaidev-figma/crawl.js +130 -0
  61. package/skills/myaidev-figma-configure/SKILL.md +130 -0
  62. package/skills/openstack-manager/SKILL.md +1 -1
  63. package/skills/payloadcms-publisher/SKILL.md +141 -77
  64. package/skills/payloadcms-publisher/references/field-mapping.md +142 -0
  65. package/skills/payloadcms-publisher/references/lexical-format.md +97 -0
  66. package/skills/security-auditor/SKILL.md +1 -1
  67. package/src/cli/commands/addon.js +105 -7
  68. package/src/config/workflows.js +172 -228
  69. package/src/lib/ascii-banner.js +197 -182
  70. package/src/lib/{content-coordinator.js → content-production-coordinator.js} +649 -459
  71. package/src/lib/installation-detector.js +93 -59
  72. package/src/lib/payloadcms-utils.js +285 -510
  73. package/src/lib/workflow-installer.js +55 -0
  74. package/src/mcp/health-check.js +82 -68
  75. package/src/mcp/openstack-server.js +1746 -1262
  76. package/src/scripts/configure-visual-apis.js +224 -173
  77. package/src/scripts/configure-wordpress-mcp.js +96 -66
  78. package/src/scripts/init/install.js +109 -85
  79. package/src/scripts/init-project.js +138 -67
  80. package/src/scripts/utils/write-content.js +67 -52
  81. package/src/scripts/wordpress/publish-to-wordpress.js +128 -128
  82. package/src/templates/claude/CLAUDE.md +19 -12
  83. package/hooks/hooks.json +0 -26
  84. package/skills/content-coordinator/SKILL.md +0 -130
  85. package/skills/content-enrichment/SKILL.md +0 -80
  86. package/skills/content-writer/SKILL.md +0 -285
  87. package/skills/skill-builder/SKILL.md +0 -417
  88. package/skills/visual-generator/SKILL.md +0 -140
  89. /package/skills/{content-writer → myai-content-writer}/agents/editor-agent.md +0 -0
  90. /package/skills/{content-writer → myai-content-writer}/agents/planner-agent.md +0 -0
  91. /package/skills/{content-writer → myai-content-writer}/agents/research-agent.md +0 -0
  92. /package/skills/{content-writer → myai-content-writer}/agents/seo-agent.md +0 -0
  93. /package/skills/{content-writer → myai-content-writer}/agents/visual-planner-agent.md +0 -0
  94. /package/skills/{content-writer → myai-content-writer}/agents/writer-agent.md +0 -0
@@ -9,18 +9,18 @@
9
9
  * Usage:
10
10
  * node configure-visual-apis.js
11
11
  * OR
12
- * /myai-configure visual (from Claude Code)
12
+ * /myai-configurator visual (from Claude Code)
13
13
  *
14
14
  * Platform support: Claude Code, Gemini CLI, Codex CLI
15
15
  */
16
16
 
17
- import inquirer from 'inquirer';
18
- import fs from 'fs-extra';
19
- import path from 'path';
20
- import dotenv from 'dotenv';
21
- import chalk from 'chalk';
22
- import ora from 'ora';
23
- import { fileURLToPath } from 'url';
17
+ import inquirer from "inquirer";
18
+ import fs from "fs-extra";
19
+ import path from "path";
20
+ import dotenv from "dotenv";
21
+ import chalk from "chalk";
22
+ import ora from "ora";
23
+ import { fileURLToPath } from "url";
24
24
 
25
25
  // Load existing environment variables
26
26
  dotenv.config();
@@ -32,51 +32,57 @@ const __dirname = path.dirname(__filename);
32
32
  * Main configuration function
33
33
  */
34
34
  export async function configureVisualAPIs() {
35
- console.log(chalk.blue('\n🎨 Visual Content Generation Configuration'));
36
- console.log(chalk.gray('Configure Google AI and OpenAI APIs for image/video generation\n'));
37
-
38
- console.log(chalk.cyan('Supported Platforms:'));
39
- console.log(chalk.gray('✅ Claude Code'));
40
- console.log(chalk.gray('✅ Gemini CLI'));
41
- console.log(chalk.gray('✅ Codex CLI\n'));
35
+ console.log(chalk.blue("\n🎨 Visual Content Generation Configuration"));
36
+ console.log(
37
+ chalk.gray(
38
+ "Configure Google AI and OpenAI APIs for image/video generation\n",
39
+ ),
40
+ );
41
+
42
+ console.log(chalk.cyan("Supported Platforms:"));
43
+ console.log(chalk.gray("✅ Claude Code"));
44
+ console.log(chalk.gray("✅ Gemini CLI"));
45
+ console.log(chalk.gray("✅ Codex CLI\n"));
42
46
 
43
47
  try {
44
48
  // Step 1: Which services to configure
45
- const { services } = await inquirer.prompt([{
46
- type: 'checkbox',
47
- name: 'services',
48
- message: 'Which services do you want to configure?',
49
- choices: [
50
- {
51
- name: 'Google AI (Gemini Flash, Imagen 3, Veo 2)',
52
- value: 'google',
53
- checked: true
49
+ const { services } = await inquirer.prompt([
50
+ {
51
+ type: "checkbox",
52
+ name: "services",
53
+ message: "Which services do you want to configure?",
54
+ choices: [
55
+ {
56
+ name: "Google AI (Gemini Flash, Imagen 3, Veo 2)",
57
+ value: "google",
58
+ checked: true,
59
+ },
60
+ {
61
+ name: "OpenAI (DALL-E 3)",
62
+ value: "openai",
63
+ checked: true,
64
+ },
65
+ ],
66
+ validate: (answer) => {
67
+ if (answer.length < 1) {
68
+ return "You must choose at least one service.";
69
+ }
70
+ return true;
54
71
  },
55
- {
56
- name: 'OpenAI (DALL-E 3)',
57
- value: 'openai',
58
- checked: true
59
- }
60
- ],
61
- validate: (answer) => {
62
- if (answer.length < 1) {
63
- return 'You must choose at least one service.';
64
- }
65
- return true;
66
- }
67
- }]);
72
+ },
73
+ ]);
68
74
 
69
75
  const config = {};
70
76
 
71
77
  // Step 2: Configure Google AI
72
- if (services.includes('google')) {
73
- console.log(chalk.yellow('\n📋 Google AI API Setup:'));
74
- console.log(chalk.gray('1. Visit: https://ai.google.dev/'));
75
- console.log(chalk.gray('2. Sign in with your Google account'));
78
+ if (services.includes("google")) {
79
+ console.log(chalk.yellow("\n📋 Google AI API Setup:"));
80
+ console.log(chalk.gray("1. Visit: https://ai.google.dev/"));
81
+ console.log(chalk.gray("2. Sign in with your Google account"));
76
82
  console.log(chalk.gray('3. Click "Get API key" in Google AI Studio'));
77
- console.log(chalk.gray('4. Create or select a project'));
83
+ console.log(chalk.gray("4. Create or select a project"));
78
84
  console.log(chalk.gray('5. Click "Create API key"'));
79
- console.log(chalk.gray('6. Copy the API key\n'));
85
+ console.log(chalk.gray("6. Copy the API key\n"));
80
86
 
81
87
  const currentGoogleKey = process.env.GOOGLE_API_KEY;
82
88
  if (currentGoogleKey) {
@@ -85,41 +91,45 @@ export async function configureVisualAPIs() {
85
91
 
86
92
  const { googleKey, confirmGoogle } = await inquirer.prompt([
87
93
  {
88
- type: 'password',
89
- name: 'googleKey',
90
- message: 'Enter your Google API Key:',
91
- mask: '*',
94
+ type: "password",
95
+ name: "googleKey",
96
+ message: "Enter your Google API Key:",
97
+ mask: "*",
92
98
  validate: (input) => {
93
- if (!input) return 'API key is required';
94
- if (input.length < 20) return 'API key appears to be too short';
99
+ if (!input) return "API key is required";
100
+ if (input.length < 20) return "API key appears to be too short";
95
101
  return true;
96
- }
102
+ },
97
103
  },
98
104
  {
99
- type: 'confirm',
100
- name: 'confirmGoogle',
101
- message: 'Test API key connectivity?',
102
- default: true
103
- }
105
+ type: "confirm",
106
+ name: "confirmGoogle",
107
+ message: "Test API key connectivity?",
108
+ default: true,
109
+ },
104
110
  ]);
105
111
 
106
112
  config.GOOGLE_API_KEY = googleKey;
107
113
 
108
114
  // Test Google API
109
115
  if (confirmGoogle) {
110
- const spinner = ora('Testing Google API connection...').start();
116
+ const spinner = ora("Testing Google API connection...").start();
111
117
  try {
112
118
  const testResult = await testGoogleAPI(googleKey);
113
119
  if (testResult.success) {
114
- spinner.succeed(chalk.green('Google API connection successful!'));
120
+ spinner.succeed(chalk.green("Google API connection successful!"));
115
121
  } else {
116
- spinner.fail(chalk.red(`Google API test failed: ${testResult.error}`));
117
- const { continueAnyway } = await inquirer.prompt([{
118
- type: 'confirm',
119
- name: 'continueAnyway',
120
- message: 'Continue with this API key anyway?',
121
- default: false
122
- }]);
122
+ spinner.fail(
123
+ chalk.red(`Google API test failed: ${testResult.error}`),
124
+ );
125
+ const { continueAnyway } = await inquirer.prompt([
126
+ {
127
+ type: "confirm",
128
+ name: "continueAnyway",
129
+ message: "Continue with this API key anyway?",
130
+ default: false,
131
+ },
132
+ ]);
123
133
  if (!continueAnyway) {
124
134
  delete config.GOOGLE_API_KEY;
125
135
  }
@@ -131,13 +141,17 @@ export async function configureVisualAPIs() {
131
141
  }
132
142
 
133
143
  // Step 3: Configure OpenAI
134
- if (services.includes('openai')) {
135
- console.log(chalk.yellow('\n📋 OpenAI API Setup:'));
136
- console.log(chalk.gray('1. Visit: https://platform.openai.com/api-keys'));
137
- console.log(chalk.gray('2. Sign in to your OpenAI account'));
144
+ if (services.includes("openai")) {
145
+ console.log(chalk.yellow("\n📋 OpenAI API Setup:"));
146
+ console.log(chalk.gray("1. Visit: https://platform.openai.com/api-keys"));
147
+ console.log(chalk.gray("2. Sign in to your OpenAI account"));
138
148
  console.log(chalk.gray('3. Click "Create new secret key"'));
139
- console.log(chalk.gray('4. Name your key (e.g., "MyAIDev Visual Generation")'));
140
- console.log(chalk.gray('5. Copy the API key (you won\'t see it again!)\n'));
149
+ console.log(
150
+ chalk.gray('4. Name your key (e.g., "MyAIDev Visual Generation")'),
151
+ );
152
+ console.log(
153
+ chalk.gray("5. Copy the API key (you won't see it again!)\n"),
154
+ );
141
155
 
142
156
  const currentOpenAIKey = process.env.OPENAI_API_KEY;
143
157
  if (currentOpenAIKey) {
@@ -146,42 +160,47 @@ export async function configureVisualAPIs() {
146
160
 
147
161
  const { openaiKey, confirmOpenAI } = await inquirer.prompt([
148
162
  {
149
- type: 'password',
150
- name: 'openaiKey',
151
- message: 'Enter your OpenAI API Key:',
152
- mask: '*',
163
+ type: "password",
164
+ name: "openaiKey",
165
+ message: "Enter your OpenAI API Key:",
166
+ mask: "*",
153
167
  validate: (input) => {
154
- if (!input) return 'API key is required';
155
- if (input.length < 20) return 'API key appears to be too short';
156
- if (!input.startsWith('sk-')) return 'OpenAI API keys typically start with "sk-"';
168
+ if (!input) return "API key is required";
169
+ if (input.length < 20) return "API key appears to be too short";
170
+ if (!input.startsWith("sk-"))
171
+ return 'OpenAI API keys typically start with "sk-"';
157
172
  return true;
158
- }
173
+ },
159
174
  },
160
175
  {
161
- type: 'confirm',
162
- name: 'confirmOpenAI',
163
- message: 'Test API key connectivity?',
164
- default: true
165
- }
176
+ type: "confirm",
177
+ name: "confirmOpenAI",
178
+ message: "Test API key connectivity?",
179
+ default: true,
180
+ },
166
181
  ]);
167
182
 
168
183
  config.OPENAI_API_KEY = openaiKey;
169
184
 
170
185
  // Test OpenAI API
171
186
  if (confirmOpenAI) {
172
- const spinner = ora('Testing OpenAI API connection...').start();
187
+ const spinner = ora("Testing OpenAI API connection...").start();
173
188
  try {
174
189
  const testResult = await testOpenAIAPI(openaiKey);
175
190
  if (testResult.success) {
176
- spinner.succeed(chalk.green('OpenAI API connection successful!'));
191
+ spinner.succeed(chalk.green("OpenAI API connection successful!"));
177
192
  } else {
178
- spinner.fail(chalk.red(`OpenAI API test failed: ${testResult.error}`));
179
- const { continueAnyway } = await inquirer.prompt([{
180
- type: 'confirm',
181
- name: 'continueAnyway',
182
- message: 'Continue with this API key anyway?',
183
- default: false
184
- }]);
193
+ spinner.fail(
194
+ chalk.red(`OpenAI API test failed: ${testResult.error}`),
195
+ );
196
+ const { continueAnyway } = await inquirer.prompt([
197
+ {
198
+ type: "confirm",
199
+ name: "continueAnyway",
200
+ message: "Continue with this API key anyway?",
201
+ default: false,
202
+ },
203
+ ]);
185
204
  if (!continueAnyway) {
186
205
  delete config.OPENAI_API_KEY;
187
206
  }
@@ -194,118 +213,150 @@ export async function configureVisualAPIs() {
194
213
 
195
214
  // Step 4: Preferences
196
215
  if (Object.keys(config).length > 0) {
197
- console.log(chalk.yellow('\n⚙️ Preferences:\n'));
216
+ console.log(chalk.yellow("\n⚙️ Preferences:\n"));
198
217
 
199
218
  const serviceChoices = [];
200
219
  if (config.GOOGLE_API_KEY) {
201
220
  serviceChoices.push(
202
- { name: 'Gemini Flash (Fast & Cheap, $0.02)', value: 'gemini' },
203
- { name: 'Imagen 3 (Premium Quality, $0.03)', value: 'imagen' }
221
+ { name: "Gemini Flash (Fast & Cheap, $0.02)", value: "gemini" },
222
+ { name: "Imagen 3 (Premium Quality, $0.03)", value: "imagen" },
204
223
  );
205
224
  }
206
225
  if (config.OPENAI_API_KEY) {
207
- serviceChoices.push(
208
- { name: 'DALL-E 3 (Creative, $0.04-0.12)', value: 'dalle' }
209
- );
226
+ serviceChoices.push({
227
+ name: "DALL-E 3 (Creative, $0.04-0.12)",
228
+ value: "dalle",
229
+ });
210
230
  }
211
231
 
212
232
  const preferences = await inquirer.prompt([
213
233
  {
214
- type: 'list',
215
- name: 'defaultService',
216
- message: 'Default image generation service?',
234
+ type: "list",
235
+ name: "defaultService",
236
+ message: "Default image generation service?",
217
237
  choices: serviceChoices,
218
- default: 'gemini'
238
+ default: "gemini",
219
239
  },
220
240
  {
221
- type: 'list',
222
- name: 'defaultQuality',
223
- message: 'Default quality level?',
241
+ type: "list",
242
+ name: "defaultQuality",
243
+ message: "Default quality level?",
224
244
  choices: [
225
- { name: 'Standard (faster, cheaper)', value: 'standard' },
226
- { name: 'HD (higher quality, more expensive)', value: 'hd' }
245
+ { name: "Standard (faster, cheaper)", value: "standard" },
246
+ { name: "HD (higher quality, more expensive)", value: "hd" },
227
247
  ],
228
- default: 'standard'
248
+ default: "standard",
229
249
  },
230
250
  {
231
- type: 'number',
232
- name: 'dailyBudget',
233
- message: 'Daily budget limit (USD)?',
234
- default: 5.00,
251
+ type: "number",
252
+ name: "dailyBudget",
253
+ message: "Daily budget limit (USD)?",
254
+ default: 5.0,
235
255
  validate: (input) => {
236
- if (input <= 0) return 'Budget must be greater than 0';
237
- if (input > 1000) return 'Budget seems unusually high (max: $1000)';
256
+ if (input <= 0) return "Budget must be greater than 0";
257
+ if (input > 1000) return "Budget seems unusually high (max: $1000)";
238
258
  return true;
239
- }
259
+ },
240
260
  },
241
261
  {
242
- type: 'number',
243
- name: 'monthlyBudget',
244
- message: 'Monthly budget limit (USD)?',
245
- default: 50.00,
262
+ type: "number",
263
+ name: "monthlyBudget",
264
+ message: "Monthly budget limit (USD)?",
265
+ default: 50.0,
246
266
  validate: (input) => {
247
- if (input <= 0) return 'Budget must be greater than 0';
248
- if (input > 10000) return 'Budget seems unusually high (max: $10,000)';
267
+ if (input <= 0) return "Budget must be greater than 0";
268
+ if (input > 10000)
269
+ return "Budget seems unusually high (max: $10,000)";
249
270
  return true;
250
- }
251
- }
271
+ },
272
+ },
252
273
  ]);
253
274
 
254
275
  config.VISUAL_DEFAULT_SERVICE = preferences.defaultService;
255
276
  config.VISUAL_DEFAULT_QUALITY = preferences.defaultQuality;
256
277
  config.VISUAL_DAILY_BUDGET = preferences.dailyBudget;
257
278
  config.VISUAL_MONTHLY_BUDGET = preferences.monthlyBudget;
258
- config.VISUAL_WARN_THRESHOLD = 0.80;
259
- config.VISUAL_ASSETS_PATH = './content-assets';
279
+ config.VISUAL_WARN_THRESHOLD = 0.8;
280
+ config.VISUAL_ASSETS_PATH = "./content-assets";
260
281
 
261
282
  // Step 5: Update .env file
262
- console.log('');
263
- const spinner = ora('Updating .env file...').start();
283
+ console.log("");
284
+ const spinner = ora("Updating .env file...").start();
264
285
 
265
286
  try {
266
287
  await updateEnvFile(config);
267
- spinner.succeed(chalk.green('.env file updated successfully!'));
288
+ spinner.succeed(chalk.green(".env file updated successfully!"));
268
289
  } catch (error) {
269
290
  spinner.fail(chalk.red(`Failed to update .env: ${error.message}`));
270
291
  throw error;
271
292
  }
272
293
 
273
294
  // Step 6: Summary
274
- console.log(chalk.green('\n✅ Configuration Complete!\n'));
295
+ console.log(chalk.green("\n✅ Configuration Complete!\n"));
275
296
 
276
- console.log(chalk.cyan('📋 Summary:'));
297
+ console.log(chalk.cyan("📋 Summary:"));
277
298
  if (config.GOOGLE_API_KEY) {
278
- console.log(chalk.gray(` ✅ Google AI configured (Gemini, Imagen, Veo)`));
299
+ console.log(
300
+ chalk.gray(` ✅ Google AI configured (Gemini, Imagen, Veo)`),
301
+ );
279
302
  }
280
303
  if (config.OPENAI_API_KEY) {
281
304
  console.log(chalk.gray(` ✅ OpenAI configured (DALL-E 3)`));
282
305
  }
283
- console.log(chalk.gray(` Default service: ${config.VISUAL_DEFAULT_SERVICE}`));
284
- console.log(chalk.gray(` Default quality: ${config.VISUAL_DEFAULT_QUALITY}`));
285
- console.log(chalk.gray(` Daily budget: $${config.VISUAL_DAILY_BUDGET.toFixed(2)}`));
286
- console.log(chalk.gray(` Monthly budget: $${config.VISUAL_MONTHLY_BUDGET.toFixed(2)}`));
287
-
288
- console.log(chalk.yellow('\n💡 Quick Start:\n'));
289
- console.log(chalk.cyan(' # Generate hero image'));
290
- console.log(chalk.gray(' /myai-generate-visual "Modern developer workspace"\n'));
291
-
292
- console.log(chalk.cyan(' # Generate with specific service'));
293
- console.log(chalk.gray(' /myai-generate-visual "AI concept" --type=illustration --service=dalle\n'));
294
-
295
- console.log(chalk.cyan(' # Generate article with images'));
296
- console.log(chalk.gray(' /myai-content-writer "Article Title" --with-images\n'));
297
-
298
- console.log(chalk.white('📚 Documentation:'));
299
- console.log(chalk.gray(' VISUAL_CONTENT_GENERATION_GUIDE.md - Complete guide'));
300
- console.log(chalk.gray(' CONTENT_CREATION_GUIDE.md - Content workflow\n'));
301
-
306
+ console.log(
307
+ chalk.gray(` Default service: ${config.VISUAL_DEFAULT_SERVICE}`),
308
+ );
309
+ console.log(
310
+ chalk.gray(` Default quality: ${config.VISUAL_DEFAULT_QUALITY}`),
311
+ );
312
+ console.log(
313
+ chalk.gray(
314
+ ` Daily budget: $${config.VISUAL_DAILY_BUDGET.toFixed(2)}`,
315
+ ),
316
+ );
317
+ console.log(
318
+ chalk.gray(
319
+ ` Monthly budget: $${config.VISUAL_MONTHLY_BUDGET.toFixed(2)}`,
320
+ ),
321
+ );
322
+
323
+ console.log(chalk.yellow("\n💡 Quick Start:\n"));
324
+ console.log(chalk.cyan(" # Generate hero image"));
325
+ console.log(
326
+ chalk.gray(' /myai-visual-generator "Modern developer workspace"\n'),
327
+ );
328
+
329
+ console.log(chalk.cyan(" # Generate with specific service"));
330
+ console.log(
331
+ chalk.gray(
332
+ ' /myai-visual-generator "AI concept" --type=illustration --service=dalle\n',
333
+ ),
334
+ );
335
+
336
+ console.log(chalk.cyan(" # Generate article with images"));
337
+ console.log(
338
+ chalk.gray(' /content-writer "Article Title" --with-images\n'),
339
+ );
340
+
341
+ console.log(chalk.white("📚 Documentation:"));
342
+ console.log(
343
+ chalk.gray(" VISUAL_CONTENT_GENERATION_GUIDE.md - Complete guide"),
344
+ );
345
+ console.log(
346
+ chalk.gray(" CONTENT_CREATION_GUIDE.md - Content workflow\n"),
347
+ );
302
348
  } else {
303
- console.log(chalk.yellow('\n⚠️ No configuration saved (no valid API keys)\n'));
349
+ console.log(
350
+ chalk.yellow("\n⚠️ No configuration saved (no valid API keys)\n"),
351
+ );
304
352
  }
305
-
306
353
  } catch (error) {
307
354
  if (error.isTtyError) {
308
- console.error(chalk.red('\n❌ Prompt couldn\'t be rendered in the current environment'));
355
+ console.error(
356
+ chalk.red(
357
+ "\n❌ Prompt couldn't be rendered in the current environment",
358
+ ),
359
+ );
309
360
  } else {
310
361
  console.error(chalk.red(`\n❌ Configuration error: ${error.message}`));
311
362
  }
@@ -317,17 +368,17 @@ export async function configureVisualAPIs() {
317
368
  * Update .env file with configuration
318
369
  */
319
370
  async function updateEnvFile(config) {
320
- const envPath = path.join(process.cwd(), '.env');
321
- let envContent = '';
371
+ const envPath = path.join(process.cwd(), ".env");
372
+ let envContent = "";
322
373
 
323
374
  // Read existing .env if it exists
324
375
  if (await fs.pathExists(envPath)) {
325
- envContent = await fs.readFile(envPath, 'utf-8');
376
+ envContent = await fs.readFile(envPath, "utf-8");
326
377
  }
327
378
 
328
379
  // Update or add each config value
329
380
  for (const [key, value] of Object.entries(config)) {
330
- const regex = new RegExp(`^${key}=.*$`, 'm');
381
+ const regex = new RegExp(`^${key}=.*$`, "m");
331
382
  const line = `${key}=${value}`;
332
383
 
333
384
  if (regex.test(envContent)) {
@@ -335,8 +386,8 @@ async function updateEnvFile(config) {
335
386
  envContent = envContent.replace(regex, line);
336
387
  } else {
337
388
  // Add new key
338
- if (!envContent.endsWith('\n') && envContent.length > 0) {
339
- envContent += '\n';
389
+ if (!envContent.endsWith("\n") && envContent.length > 0) {
390
+ envContent += "\n";
340
391
  }
341
392
  envContent += `${line}\n`;
342
393
  }
@@ -356,7 +407,7 @@ async function testGoogleAPI(apiKey) {
356
407
  try {
357
408
  const response = await fetch(
358
409
  `https://generativelanguage.googleapis.com/v1beta/models?key=${apiKey}`,
359
- { method: 'GET' }
410
+ { method: "GET" },
360
411
  );
361
412
 
362
413
  if (response.ok) {
@@ -375,21 +426,21 @@ async function testGoogleAPI(apiKey) {
375
426
  */
376
427
  async function testOpenAIAPI(apiKey) {
377
428
  try {
378
- const response = await fetch(
379
- 'https://api.openai.com/v1/models',
380
- {
381
- method: 'GET',
382
- headers: {
383
- 'Authorization': `Bearer ${apiKey}`
384
- }
385
- }
386
- );
429
+ const response = await fetch("https://api.openai.com/v1/models", {
430
+ method: "GET",
431
+ headers: {
432
+ Authorization: `Bearer ${apiKey}`,
433
+ },
434
+ });
387
435
 
388
436
  if (response.ok) {
389
437
  return { success: true };
390
438
  } else {
391
439
  const errorData = await response.json();
392
- return { success: false, error: errorData.error?.message || `HTTP ${response.status}` };
440
+ return {
441
+ success: false,
442
+ error: errorData.error?.message || `HTTP ${response.status}`,
443
+ };
393
444
  }
394
445
  } catch (error) {
395
446
  return { success: false, error: error.message };
@@ -400,13 +451,13 @@ async function testOpenAIAPI(apiKey) {
400
451
  * Mask API key for display
401
452
  */
402
453
  function maskKey(key) {
403
- if (!key || key.length < 16) return '****';
404
- return `${key.substring(0, 8)}${'*'.repeat(Math.max(4, key.length - 12))}${key.substring(key.length - 4)}`;
454
+ if (!key || key.length < 16) return "****";
455
+ return `${key.substring(0, 8)}${"*".repeat(Math.max(4, key.length - 12))}${key.substring(key.length - 4)}`;
405
456
  }
406
457
 
407
458
  // Run if executed directly
408
459
  if (import.meta.url === `file://${process.argv[1]}`) {
409
- configureVisualAPIs().catch(error => {
460
+ configureVisualAPIs().catch((error) => {
410
461
  console.error(chalk.red(`\nFatal error: ${error.message}`));
411
462
  process.exit(1);
412
463
  });