myaidev-method 0.2.23 ā 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.
- package/bin/cli.js +218 -38
- package/dist/server/.tsbuildinfo +1 -1
- package/package.json +10 -5
- package/src/config/workflows.js +28 -44
- package/src/lib/ascii-banner.js +214 -0
- package/src/lib/config-manager.js +470 -0
- package/src/lib/content-generator.js +427 -0
- package/src/lib/html-conversion-utils.js +843 -0
- package/src/lib/seo-optimizer.js +515 -0
- package/src/lib/wordpress-client.js +633 -0
- package/src/lib/workflow-installer.js +3 -3
- package/src/scripts/html-conversion-cli.js +526 -0
- package/src/scripts/init/configure.js +436 -0
- package/src/scripts/init/install.js +460 -0
- package/src/scripts/utils/file-utils.js +404 -0
- package/src/scripts/utils/logger.js +300 -0
- package/src/scripts/utils/write-content.js +293 -0
- package/src/templates/claude/agents/visual-content-generator.md +129 -4
- package/src/templates/claude/commands/myai-convert-html.md +186 -0
- package/src/templates/diagrams/architecture.d2 +52 -0
- package/src/templates/diagrams/flowchart.d2 +42 -0
- package/src/templates/diagrams/sequence.d2 +47 -0
- package/src/templates/docs/content-creation-guide.md +164 -0
- package/src/templates/docs/deployment-guide.md +336 -0
- package/src/templates/docs/visual-generation-guide.md +248 -0
- package/src/templates/docs/wordpress-publishing-guide.md +208 -0
- package/src/templates/infographics/comparison-table.html +347 -0
- package/src/templates/infographics/data-chart.html +268 -0
- package/src/templates/infographics/process-flow.html +365 -0
- /package/src/scripts/{wordpress-health-check.js ā wordpress/wordpress-health-check.js} +0 -0
package/bin/cli.js
CHANGED
|
@@ -7,7 +7,17 @@ import fs from 'fs-extra';
|
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { fileURLToPath } from 'url';
|
|
9
9
|
import inquirer from 'inquirer';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getASCIIBanner,
|
|
12
|
+
getSPARCBreakdown,
|
|
13
|
+
getInitSuccessMessage,
|
|
14
|
+
getWorkflowBanner,
|
|
15
|
+
getContentWorkflowSuccess,
|
|
16
|
+
getVisualWorkflowSuccess,
|
|
17
|
+
getDevWorkflowSuccess,
|
|
18
|
+
getPublishWorkflowSuccess,
|
|
19
|
+
getDeployWorkflowSuccess
|
|
20
|
+
} from '../src/lib/ascii-banner.js';
|
|
11
21
|
|
|
12
22
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
23
|
const __dirname = path.dirname(__filename);
|
|
@@ -31,53 +41,174 @@ program
|
|
|
31
41
|
.version('0.2.22')
|
|
32
42
|
.description('MyAIDev Method - Comprehensive development framework with SPARC methodology');
|
|
33
43
|
|
|
44
|
+
// Helper function for CLI type selection
|
|
45
|
+
async function selectCLIType(options) {
|
|
46
|
+
if (options.claude) return 'claude';
|
|
47
|
+
if (options.gemini) return 'gemini';
|
|
48
|
+
if (options.codex) return 'codex';
|
|
49
|
+
|
|
50
|
+
// Interactive selection if no flag provided
|
|
51
|
+
const answer = await inquirer.prompt([
|
|
52
|
+
{
|
|
53
|
+
type: 'list',
|
|
54
|
+
name: 'cliType',
|
|
55
|
+
message: 'Which AI CLI are you configuring for?',
|
|
56
|
+
choices: [
|
|
57
|
+
{ name: 'Claude Code (Recommended)', value: 'claude' },
|
|
58
|
+
{ name: 'Gemini CLI', value: 'gemini' },
|
|
59
|
+
{ name: 'Codex CLI / OpenCode', value: 'codex' }
|
|
60
|
+
],
|
|
61
|
+
default: 'claude'
|
|
62
|
+
}
|
|
63
|
+
]);
|
|
64
|
+
return answer.cliType;
|
|
65
|
+
}
|
|
66
|
+
|
|
34
67
|
// Modular workflow installation commands
|
|
35
68
|
program
|
|
36
69
|
.command('content')
|
|
37
70
|
.description('Install content creation workflow')
|
|
38
71
|
.option('--claude', 'Install for Claude Code')
|
|
72
|
+
.option('--gemini', 'Install for Gemini CLI')
|
|
73
|
+
.option('--codex', 'Install for Codex CLI')
|
|
39
74
|
.option('--dry-run', 'Show what would be installed without making changes')
|
|
40
75
|
.option('--verbose', 'Show detailed progress')
|
|
41
76
|
.action(async (options) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
77
|
+
// Display workflow banner
|
|
78
|
+
console.log(getWorkflowBanner('content'));
|
|
79
|
+
|
|
80
|
+
const cliType = await selectCLIType(options);
|
|
81
|
+
|
|
82
|
+
// For non-Claude CLIs, inform user about limited support
|
|
83
|
+
if (cliType !== 'claude') {
|
|
84
|
+
console.log(chalk.yellow(`\nNote: Content workflow is optimized for Claude Code.`));
|
|
85
|
+
console.log(chalk.gray(`Some features may have limited support for ${cliType}.\n`));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const spinner = ora('Installing content creation workflow...').start();
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
await loadWorkflowSystem();
|
|
92
|
+
const installer = new WorkflowInstaller({
|
|
93
|
+
projectRoot: process.cwd(),
|
|
94
|
+
verbose: options.verbose,
|
|
95
|
+
dryRun: options.dryRun
|
|
96
|
+
});
|
|
97
|
+
const result = await installer.install(['content']);
|
|
98
|
+
|
|
99
|
+
if (options.dryRun) {
|
|
100
|
+
spinner.succeed(chalk.yellow('Dry run complete - no changes made'));
|
|
101
|
+
} else {
|
|
102
|
+
spinner.succeed(chalk.green('Content workflow installed successfully!'));
|
|
103
|
+
|
|
104
|
+
// Display rich success message
|
|
105
|
+
console.log(getContentWorkflowSuccess(result.results || [], cliType));
|
|
106
|
+
|
|
107
|
+
console.log(chalk.cyan(`\nš Restart ${cliType} to load your new content commands!`));
|
|
108
|
+
}
|
|
109
|
+
} catch (error) {
|
|
110
|
+
spinner.fail(chalk.red('Failed to install content workflow'));
|
|
111
|
+
console.error(chalk.red(error.message));
|
|
112
|
+
if (options.verbose) console.error(error);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
49
115
|
});
|
|
50
116
|
|
|
51
117
|
program
|
|
52
118
|
.command('visual')
|
|
53
119
|
.description('Install visual content generation workflow')
|
|
54
120
|
.option('--claude', 'Install for Claude Code')
|
|
121
|
+
.option('--gemini', 'Install for Gemini CLI')
|
|
122
|
+
.option('--codex', 'Install for Codex CLI')
|
|
55
123
|
.option('--dry-run', 'Show what would be installed without making changes')
|
|
56
124
|
.option('--verbose', 'Show detailed progress')
|
|
57
125
|
.action(async (options) => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
126
|
+
// Display workflow banner
|
|
127
|
+
console.log(getWorkflowBanner('visual'));
|
|
128
|
+
|
|
129
|
+
const cliType = await selectCLIType(options);
|
|
130
|
+
|
|
131
|
+
// For non-Claude CLIs, inform user about limited support
|
|
132
|
+
if (cliType !== 'claude') {
|
|
133
|
+
console.log(chalk.yellow(`\nNote: Visual workflow is optimized for Claude Code.`));
|
|
134
|
+
console.log(chalk.gray(`Some features may have limited support for ${cliType}.\n`));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const spinner = ora('Installing visual content generation workflow...').start();
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
await loadWorkflowSystem();
|
|
141
|
+
const installer = new WorkflowInstaller({
|
|
142
|
+
projectRoot: process.cwd(),
|
|
143
|
+
verbose: options.verbose,
|
|
144
|
+
dryRun: options.dryRun
|
|
145
|
+
});
|
|
146
|
+
const result = await installer.install(['visual']);
|
|
147
|
+
|
|
148
|
+
if (options.dryRun) {
|
|
149
|
+
spinner.succeed(chalk.yellow('Dry run complete - no changes made'));
|
|
150
|
+
} else {
|
|
151
|
+
spinner.succeed(chalk.green('Visual workflow installed successfully!'));
|
|
152
|
+
|
|
153
|
+
// Display rich success message
|
|
154
|
+
console.log(getVisualWorkflowSuccess(result.results || [], cliType));
|
|
155
|
+
|
|
156
|
+
console.log(chalk.cyan(`\nš Restart ${cliType} to load your new visual commands!`));
|
|
157
|
+
}
|
|
158
|
+
} catch (error) {
|
|
159
|
+
spinner.fail(chalk.red('Failed to install visual workflow'));
|
|
160
|
+
console.error(chalk.red(error.message));
|
|
161
|
+
if (options.verbose) console.error(error);
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
65
164
|
});
|
|
66
165
|
|
|
67
166
|
program
|
|
68
167
|
.command('dev')
|
|
69
168
|
.description('Install development workflow (SPARC methodology)')
|
|
70
169
|
.option('--claude', 'Install for Claude Code')
|
|
170
|
+
.option('--gemini', 'Install for Gemini CLI')
|
|
171
|
+
.option('--codex', 'Install for Codex CLI')
|
|
71
172
|
.option('--dry-run', 'Show what would be installed without making changes')
|
|
72
173
|
.option('--verbose', 'Show detailed progress')
|
|
73
174
|
.action(async (options) => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
175
|
+
// Display workflow banner
|
|
176
|
+
console.log(getWorkflowBanner('development'));
|
|
177
|
+
|
|
178
|
+
const cliType = await selectCLIType(options);
|
|
179
|
+
|
|
180
|
+
if (cliType !== 'claude') {
|
|
181
|
+
console.log(chalk.yellow(`\nNote: Development workflow is optimized for Claude Code.`));
|
|
182
|
+
console.log(chalk.gray(`Some features may have limited support for ${cliType}.\n`));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const spinner = ora('Installing SPARC development workflow...').start();
|
|
186
|
+
|
|
187
|
+
try {
|
|
188
|
+
await loadWorkflowSystem();
|
|
189
|
+
const installer = new WorkflowInstaller({
|
|
190
|
+
projectRoot: process.cwd(),
|
|
191
|
+
verbose: options.verbose,
|
|
192
|
+
dryRun: options.dryRun
|
|
193
|
+
});
|
|
194
|
+
const result = await installer.install(['development']);
|
|
195
|
+
|
|
196
|
+
if (options.dryRun) {
|
|
197
|
+
spinner.succeed(chalk.yellow('Dry run complete - no changes made'));
|
|
198
|
+
} else {
|
|
199
|
+
spinner.succeed(chalk.green('Development workflow installed successfully!'));
|
|
200
|
+
|
|
201
|
+
// Display rich success message
|
|
202
|
+
console.log(getDevWorkflowSuccess(result.results || [], cliType));
|
|
203
|
+
|
|
204
|
+
console.log(chalk.cyan(`\nš Restart ${cliType} to load your new development commands!`));
|
|
205
|
+
}
|
|
206
|
+
} catch (error) {
|
|
207
|
+
spinner.fail(chalk.red('Failed to install development workflow'));
|
|
208
|
+
console.error(chalk.red(error.message));
|
|
209
|
+
if (options.verbose) console.error(error);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
81
212
|
});
|
|
82
213
|
|
|
83
214
|
program
|
|
@@ -90,7 +221,9 @@ program
|
|
|
90
221
|
.option('--dry-run', 'Show what would be installed without making changes')
|
|
91
222
|
.option('--verbose', 'Show detailed progress')
|
|
92
223
|
.action(async (options) => {
|
|
93
|
-
|
|
224
|
+
// Display workflow banner
|
|
225
|
+
console.log(getWorkflowBanner('publish'));
|
|
226
|
+
|
|
94
227
|
const workflows = [];
|
|
95
228
|
if (options.wordpress) workflows.push('publish-wordpress');
|
|
96
229
|
if (options.payloadcms) workflows.push('publish-payloadcms');
|
|
@@ -103,12 +236,34 @@ program
|
|
|
103
236
|
console.log(chalk.gray(' --wordpress, --payloadcms, --static, or --all'));
|
|
104
237
|
process.exit(1);
|
|
105
238
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
239
|
+
|
|
240
|
+
const spinner = ora('Installing publishing workflows...').start();
|
|
241
|
+
|
|
242
|
+
try {
|
|
243
|
+
await loadWorkflowSystem();
|
|
244
|
+
const installer = new WorkflowInstaller({
|
|
245
|
+
projectRoot: process.cwd(),
|
|
246
|
+
verbose: options.verbose,
|
|
247
|
+
dryRun: options.dryRun
|
|
248
|
+
});
|
|
249
|
+
const result = await installer.install(workflows);
|
|
250
|
+
|
|
251
|
+
if (options.dryRun) {
|
|
252
|
+
spinner.succeed(chalk.yellow('Dry run complete - no changes made'));
|
|
253
|
+
} else {
|
|
254
|
+
spinner.succeed(chalk.green('Publishing workflows installed successfully!'));
|
|
255
|
+
|
|
256
|
+
// Display rich success message
|
|
257
|
+
console.log(getPublishWorkflowSuccess(workflows, result.results || [], 'claude'));
|
|
258
|
+
|
|
259
|
+
console.log(chalk.cyan(`\nš Restart Claude Code to load your new publishing commands!`));
|
|
260
|
+
}
|
|
261
|
+
} catch (error) {
|
|
262
|
+
spinner.fail(chalk.red('Failed to install publishing workflows'));
|
|
263
|
+
console.error(chalk.red(error.message));
|
|
264
|
+
if (options.verbose) console.error(error);
|
|
265
|
+
process.exit(1);
|
|
266
|
+
}
|
|
112
267
|
});
|
|
113
268
|
|
|
114
269
|
program
|
|
@@ -119,19 +274,43 @@ program
|
|
|
119
274
|
.option('--dry-run', 'Show what would be installed without making changes')
|
|
120
275
|
.option('--verbose', 'Show detailed progress')
|
|
121
276
|
.action(async (options) => {
|
|
122
|
-
|
|
277
|
+
// Display workflow banner
|
|
278
|
+
console.log(getWorkflowBanner('deploy'));
|
|
279
|
+
|
|
123
280
|
const workflows = [];
|
|
124
281
|
if (options.coolify) workflows.push('coolify');
|
|
125
282
|
if (options.all) workflows.push('deployment', 'coolify');
|
|
126
283
|
if (workflows.length === 0) {
|
|
127
284
|
workflows.push('deployment');
|
|
128
285
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
286
|
+
|
|
287
|
+
const spinner = ora('Installing deployment workflows...').start();
|
|
288
|
+
|
|
289
|
+
try {
|
|
290
|
+
await loadWorkflowSystem();
|
|
291
|
+
const installer = new WorkflowInstaller({
|
|
292
|
+
projectRoot: process.cwd(),
|
|
293
|
+
verbose: options.verbose,
|
|
294
|
+
dryRun: options.dryRun
|
|
295
|
+
});
|
|
296
|
+
const result = await installer.install(workflows);
|
|
297
|
+
|
|
298
|
+
if (options.dryRun) {
|
|
299
|
+
spinner.succeed(chalk.yellow('Dry run complete - no changes made'));
|
|
300
|
+
} else {
|
|
301
|
+
spinner.succeed(chalk.green('Deployment workflows installed successfully!'));
|
|
302
|
+
|
|
303
|
+
// Display rich success message
|
|
304
|
+
console.log(getDeployWorkflowSuccess(workflows, result.results || [], 'claude'));
|
|
305
|
+
|
|
306
|
+
console.log(chalk.cyan(`\nš Restart Claude Code to load your new deployment commands!`));
|
|
307
|
+
}
|
|
308
|
+
} catch (error) {
|
|
309
|
+
spinner.fail(chalk.red('Failed to install deployment workflows'));
|
|
310
|
+
console.error(chalk.red(error.message));
|
|
311
|
+
if (options.verbose) console.error(error);
|
|
312
|
+
process.exit(1);
|
|
313
|
+
}
|
|
135
314
|
});
|
|
136
315
|
|
|
137
316
|
// Workflow management commands
|
|
@@ -210,11 +389,12 @@ program
|
|
|
210
389
|
{
|
|
211
390
|
type: 'list',
|
|
212
391
|
name: 'cliType',
|
|
213
|
-
message: 'Which AI CLI are you configuring for?',
|
|
392
|
+
message: 'Which AI CLI are you configuring for? (claude|gemini|codex|opencode)',
|
|
214
393
|
choices: [
|
|
215
394
|
{ name: 'Claude Code', value: 'claude' },
|
|
216
395
|
{ name: 'Gemini CLI', value: 'gemini' },
|
|
217
|
-
{ name: 'Codex CLI', value: 'codex' }
|
|
396
|
+
{ name: 'Codex CLI', value: 'codex' },
|
|
397
|
+
{ name: 'Opencode CLI', value: 'opencode'}
|
|
218
398
|
]
|
|
219
399
|
}
|
|
220
400
|
]);
|