myaidev-method 0.3.4 → 0.3.6
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/.claude-plugin/plugin.json +0 -1
- package/.env.example +5 -4
- package/CHANGELOG.md +2 -2
- package/CONTENT_CREATION_GUIDE.md +489 -3211
- package/DEVELOPER_USE_CASES.md +1 -1
- package/MODULAR_INSTALLATION.md +2 -2
- package/README.md +39 -33
- package/TECHNICAL_ARCHITECTURE.md +1 -1
- package/USER_GUIDE.md +242 -190
- package/agents/content-editor-agent.md +90 -0
- package/agents/content-planner-agent.md +97 -0
- package/agents/content-research-agent.md +62 -0
- package/agents/content-seo-agent.md +101 -0
- package/agents/content-writer-agent.md +69 -0
- package/agents/infographic-analyzer-agent.md +63 -0
- package/agents/infographic-designer-agent.md +72 -0
- package/bin/cli.js +846 -427
- package/{content-rules.example.md → content-rules-example.md} +2 -2
- package/dist/mcp/health-check.js +82 -68
- package/dist/mcp/mcp-config.json +8 -0
- package/dist/mcp/openstack-server.js +1746 -1262
- package/dist/server/.tsbuildinfo +1 -1
- package/extension.json +21 -4
- package/package.json +181 -184
- package/skills/company-config/SKILL.md +133 -0
- package/skills/configure/SKILL.md +1 -1
- package/skills/myai-configurator/SKILL.md +77 -0
- package/skills/myai-configurator/content-creation-configurator/SKILL.md +516 -0
- package/skills/myai-configurator/content-maintenance-configurator/SKILL.md +397 -0
- package/skills/myai-content-enrichment/SKILL.md +114 -0
- package/skills/myai-content-ideation/SKILL.md +288 -0
- package/skills/myai-content-ideation/evals/evals.json +182 -0
- package/skills/myai-content-production-coordinator/SKILL.md +946 -0
- package/skills/{content-rules-setup → myai-content-rules-setup}/SKILL.md +1 -1
- package/skills/{content-verifier → myai-content-verifier}/SKILL.md +1 -1
- package/skills/myai-content-writer/SKILL.md +333 -0
- package/skills/{infographic → myai-infographic}/SKILL.md +1 -1
- package/skills/myai-proprietary-content-verifier/SKILL.md +175 -0
- package/skills/myai-proprietary-content-verifier/evals/evals.json +36 -0
- package/skills/myai-skill-builder/SKILL.md +699 -0
- package/skills/myai-skill-builder/agents/analyzer-agent.md +137 -0
- package/skills/myai-skill-builder/agents/comparator-agent.md +77 -0
- package/skills/myai-skill-builder/agents/grader-agent.md +103 -0
- package/skills/myai-skill-builder/assets/eval_review.html +131 -0
- package/skills/myai-skill-builder/references/schemas.md +211 -0
- package/skills/myai-skill-builder/scripts/aggregate_benchmark.py +190 -0
- package/skills/myai-skill-builder/scripts/generate_review.py +381 -0
- package/skills/myai-skill-builder/scripts/package_skill.py +91 -0
- package/skills/myai-skill-builder/scripts/run_eval.py +105 -0
- package/skills/myai-skill-builder/scripts/run_loop.py +211 -0
- package/skills/myai-skill-builder/scripts/utils.py +123 -0
- package/skills/myai-visual-generator/SKILL.md +125 -0
- package/skills/myai-visual-generator/evals/evals.json +155 -0
- package/skills/myai-visual-generator/references/infographic-pipeline.md +73 -0
- package/skills/myai-visual-generator/references/research-visuals.md +57 -0
- package/skills/myai-visual-generator/references/services.md +89 -0
- package/skills/myai-visual-generator/scripts/visual-generation-utils.js +1272 -0
- package/skills/myaidev-figma/SKILL.md +212 -0
- package/skills/myaidev-figma/capture.js +133 -0
- package/skills/myaidev-figma/crawl.js +130 -0
- package/skills/myaidev-figma-configure/SKILL.md +130 -0
- package/skills/openstack-manager/SKILL.md +1 -1
- package/skills/payloadcms-publisher/SKILL.md +141 -77
- package/skills/payloadcms-publisher/references/field-mapping.md +142 -0
- package/skills/payloadcms-publisher/references/lexical-format.md +97 -0
- package/skills/security-auditor/SKILL.md +1 -1
- package/src/cli/commands/addon.js +105 -7
- package/src/config/workflows.js +172 -228
- package/src/lib/ascii-banner.js +197 -182
- package/src/lib/{content-coordinator.js → content-production-coordinator.js} +649 -459
- package/src/lib/installation-detector.js +93 -59
- package/src/lib/payloadcms-utils.js +285 -510
- package/src/lib/workflow-installer.js +55 -0
- package/src/mcp/health-check.js +82 -68
- package/src/mcp/openstack-server.js +1746 -1262
- package/src/scripts/configure-visual-apis.js +224 -173
- package/src/scripts/configure-wordpress-mcp.js +96 -66
- package/src/scripts/init/install.js +109 -85
- package/src/scripts/init-project.js +138 -67
- package/src/scripts/utils/write-content.js +67 -52
- package/src/scripts/wordpress/publish-to-wordpress.js +128 -128
- package/src/templates/claude/CLAUDE.md +19 -12
- package/hooks/hooks.json +0 -26
- package/skills/content-coordinator/SKILL.md +0 -130
- package/skills/content-enrichment/SKILL.md +0 -80
- package/skills/content-writer/SKILL.md +0 -285
- package/skills/skill-builder/SKILL.md +0 -417
- package/skills/visual-generator/SKILL.md +0 -140
- /package/skills/{content-writer → myai-content-writer}/agents/editor-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/planner-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/research-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/seo-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/visual-planner-agent.md +0 -0
- /package/skills/{content-writer → myai-content-writer}/agents/writer-agent.md +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import fs from
|
|
4
|
-
import path from
|
|
5
|
-
import dotenv from
|
|
6
|
-
import { fileURLToPath } from
|
|
3
|
+
import fs from "fs-extra";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import dotenv from "dotenv";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
7
|
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
9
|
const __dirname = path.dirname(__filename);
|
|
@@ -15,42 +15,58 @@ const __dirname = path.dirname(__filename);
|
|
|
15
15
|
*/
|
|
16
16
|
export async function configureWordPressMCP(projectDir = process.cwd()) {
|
|
17
17
|
try {
|
|
18
|
-
console.log(
|
|
18
|
+
console.log("🔧 Configuring WordPress MCP integration...");
|
|
19
19
|
|
|
20
20
|
// Load environment variables from .env file
|
|
21
|
-
const envPath = path.join(projectDir,
|
|
21
|
+
const envPath = path.join(projectDir, ".env");
|
|
22
22
|
if (!fs.existsSync(envPath)) {
|
|
23
|
-
throw new Error(
|
|
23
|
+
throw new Error(
|
|
24
|
+
".env file not found. Please run WordPress configuration first.",
|
|
25
|
+
);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
dotenv.config({ path: envPath });
|
|
27
29
|
|
|
28
30
|
// Validate required environment variables
|
|
29
|
-
const requiredVars = [
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const requiredVars = [
|
|
32
|
+
"WORDPRESS_URL",
|
|
33
|
+
"WORDPRESS_USERNAME",
|
|
34
|
+
"WORDPRESS_APP_PASSWORD",
|
|
35
|
+
];
|
|
36
|
+
const missing = requiredVars.filter((varName) => !process.env[varName]);
|
|
37
|
+
|
|
32
38
|
if (missing.length > 0) {
|
|
33
|
-
throw new Error(
|
|
39
|
+
throw new Error(
|
|
40
|
+
`Missing required environment variables: ${missing.join(", ")}`,
|
|
41
|
+
);
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
// Check if MCP server files exist
|
|
37
|
-
const mcpServerPath = path.join(
|
|
38
|
-
|
|
45
|
+
const mcpServerPath = path.join(
|
|
46
|
+
projectDir,
|
|
47
|
+
".claude/mcp/wordpress-server.js",
|
|
48
|
+
);
|
|
49
|
+
const gutenbergConverterPath = path.join(
|
|
50
|
+
projectDir,
|
|
51
|
+
".claude/mcp/gutenberg-converter.js",
|
|
52
|
+
);
|
|
39
53
|
|
|
40
54
|
if (!fs.existsSync(mcpServerPath)) {
|
|
41
55
|
throw new Error(`WordPress MCP server not found at: ${mcpServerPath}`);
|
|
42
56
|
}
|
|
43
57
|
|
|
44
58
|
if (!fs.existsSync(gutenbergConverterPath)) {
|
|
45
|
-
throw new Error(
|
|
59
|
+
throw new Error(
|
|
60
|
+
`Gutenberg converter not found at: ${gutenbergConverterPath}`,
|
|
61
|
+
);
|
|
46
62
|
}
|
|
47
63
|
|
|
48
64
|
// Create MCP configuration
|
|
49
|
-
const mcpConfigPath = path.join(projectDir,
|
|
50
|
-
|
|
65
|
+
const mcpConfigPath = path.join(projectDir, ".mcp.json");
|
|
66
|
+
|
|
51
67
|
// Use relative path for portability across different environments
|
|
52
68
|
const relativeMcpServerPath = ".claude/mcp/wordpress-server.js";
|
|
53
|
-
|
|
69
|
+
|
|
54
70
|
const mcpConfig = {
|
|
55
71
|
mcpServers: {
|
|
56
72
|
wordpress: {
|
|
@@ -60,20 +76,25 @@ export async function configureWordPressMCP(projectDir = process.cwd()) {
|
|
|
60
76
|
WORDPRESS_URL: process.env.WORDPRESS_URL,
|
|
61
77
|
WORDPRESS_USERNAME: process.env.WORDPRESS_USERNAME,
|
|
62
78
|
WORDPRESS_APP_PASSWORD: process.env.WORDPRESS_APP_PASSWORD,
|
|
63
|
-
WORDPRESS_USE_GUTENBERG:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
WORDPRESS_USE_GUTENBERG:
|
|
80
|
+
process.env.WORDPRESS_USE_GUTENBERG || "false",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
67
84
|
};
|
|
68
85
|
|
|
69
86
|
// If .mcp.json already exists, merge with existing configuration
|
|
70
87
|
let existingConfig = {};
|
|
71
88
|
if (fs.existsSync(mcpConfigPath)) {
|
|
72
89
|
try {
|
|
73
|
-
existingConfig = JSON.parse(fs.readFileSync(mcpConfigPath,
|
|
74
|
-
console.log(
|
|
90
|
+
existingConfig = JSON.parse(fs.readFileSync(mcpConfigPath, "utf8"));
|
|
91
|
+
console.log(
|
|
92
|
+
"📝 Found existing .mcp.json file, merging configuration...",
|
|
93
|
+
);
|
|
75
94
|
} catch (error) {
|
|
76
|
-
console.warn(
|
|
95
|
+
console.warn(
|
|
96
|
+
"⚠️ Existing .mcp.json file is invalid, creating new one...",
|
|
97
|
+
);
|
|
77
98
|
}
|
|
78
99
|
}
|
|
79
100
|
|
|
@@ -82,88 +103,97 @@ export async function configureWordPressMCP(projectDir = process.cwd()) {
|
|
|
82
103
|
...existingConfig,
|
|
83
104
|
mcpServers: {
|
|
84
105
|
...existingConfig.mcpServers,
|
|
85
|
-
...mcpConfig.mcpServers
|
|
86
|
-
}
|
|
106
|
+
...mcpConfig.mcpServers,
|
|
107
|
+
},
|
|
87
108
|
};
|
|
88
109
|
|
|
89
110
|
// Write MCP configuration file
|
|
90
111
|
fs.writeFileSync(mcpConfigPath, JSON.stringify(finalConfig, null, 2));
|
|
91
|
-
console.log(
|
|
112
|
+
console.log("✅ Created .mcp.json configuration file");
|
|
92
113
|
|
|
93
114
|
// Set executable permissions on MCP server
|
|
94
115
|
try {
|
|
95
116
|
fs.chmodSync(mcpServerPath, 0o755);
|
|
96
|
-
console.log(
|
|
117
|
+
console.log("✅ Set executable permissions on WordPress MCP server");
|
|
97
118
|
} catch (error) {
|
|
98
|
-
console.warn(
|
|
119
|
+
console.warn("⚠️ Could not set executable permissions:", error.message);
|
|
99
120
|
}
|
|
100
121
|
|
|
101
122
|
// Test MCP server startup
|
|
102
|
-
console.log(
|
|
103
|
-
|
|
123
|
+
console.log("🧪 Testing MCP server startup...");
|
|
124
|
+
|
|
104
125
|
try {
|
|
105
|
-
const { spawn } = await import(
|
|
106
|
-
|
|
126
|
+
const { spawn } = await import("child_process");
|
|
127
|
+
|
|
107
128
|
return new Promise((resolve, reject) => {
|
|
108
|
-
const testProcess = spawn(
|
|
129
|
+
const testProcess = spawn("node", [relativeMcpServerPath], {
|
|
109
130
|
cwd: projectDir, // Set working directory to project root
|
|
110
131
|
env: { ...process.env, ...mcpConfig.mcpServers.wordpress.env },
|
|
111
|
-
stdio: [
|
|
132
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
112
133
|
});
|
|
113
134
|
|
|
114
|
-
let stderr =
|
|
115
|
-
testProcess.stderr.on(
|
|
135
|
+
let stderr = "";
|
|
136
|
+
testProcess.stderr.on("data", (data) => {
|
|
116
137
|
stderr += data.toString();
|
|
117
138
|
});
|
|
118
139
|
|
|
119
140
|
// Give the server 3 seconds to start up
|
|
120
141
|
setTimeout(() => {
|
|
121
|
-
testProcess.kill(
|
|
122
|
-
|
|
123
|
-
if (
|
|
124
|
-
|
|
142
|
+
testProcess.kill("SIGTERM");
|
|
143
|
+
|
|
144
|
+
if (
|
|
145
|
+
stderr.includes("WordPress MCP Server running") ||
|
|
146
|
+
stderr.includes("Server running")
|
|
147
|
+
) {
|
|
148
|
+
console.log("✅ MCP server startup test successful");
|
|
125
149
|
resolve(true);
|
|
126
|
-
} else if (
|
|
127
|
-
|
|
128
|
-
|
|
150
|
+
} else if (
|
|
151
|
+
stderr.includes("Error") ||
|
|
152
|
+
stderr.includes("Missing required environment")
|
|
153
|
+
) {
|
|
154
|
+
console.error("❌ MCP server startup failed:", stderr);
|
|
155
|
+
reject(new Error("MCP server failed to start"));
|
|
129
156
|
} else {
|
|
130
|
-
console.log(
|
|
157
|
+
console.log("✅ MCP server appears to be working");
|
|
131
158
|
resolve(true);
|
|
132
159
|
}
|
|
133
160
|
}, 3000);
|
|
134
161
|
|
|
135
|
-
testProcess.on(
|
|
162
|
+
testProcess.on("error", (error) => {
|
|
136
163
|
reject(new Error(`Failed to start MCP server: ${error.message}`));
|
|
137
164
|
});
|
|
138
165
|
});
|
|
139
166
|
} catch (testError) {
|
|
140
|
-
console.warn(
|
|
141
|
-
console.log(
|
|
167
|
+
console.warn("⚠️ Could not test MCP server startup:", testError.message);
|
|
168
|
+
console.log(
|
|
169
|
+
" MCP configuration created, but please test manually if needed",
|
|
170
|
+
);
|
|
142
171
|
}
|
|
143
172
|
|
|
144
|
-
console.log(
|
|
145
|
-
console.log(
|
|
173
|
+
console.log("\n🎉 WordPress MCP integration configured successfully!");
|
|
174
|
+
console.log("\n📋 Configuration Summary:");
|
|
146
175
|
console.log(` • WordPress URL: ${process.env.WORDPRESS_URL}`);
|
|
147
176
|
console.log(` • Username: ${process.env.WORDPRESS_USERNAME}`);
|
|
148
|
-
console.log(
|
|
177
|
+
console.log(
|
|
178
|
+
` • Gutenberg mode: ${process.env.WORDPRESS_USE_GUTENBERG || "false"}`,
|
|
179
|
+
);
|
|
149
180
|
console.log(` • MCP config: ${mcpConfigPath}`);
|
|
150
181
|
console.log(` • MCP server: ${relativeMcpServerPath}`);
|
|
151
|
-
|
|
152
|
-
console.log('\n🔄 Next steps:');
|
|
153
|
-
console.log(' 1. Restart Claude Code to load the new MCP configuration');
|
|
154
|
-
console.log(' 2. Use WordPress MCP tools in your agents and commands');
|
|
155
|
-
console.log(' 3. Test with: /myai-wordpress-admin or /myai-wordpress-publish');
|
|
156
182
|
|
|
157
|
-
|
|
183
|
+
console.log("\n🔄 Next steps:");
|
|
184
|
+
console.log(" 1. Restart Claude Code to load the new MCP configuration");
|
|
185
|
+
console.log(" 2. Use WordPress MCP tools in your agents and commands");
|
|
186
|
+
console.log(" 3. Test with: /wordpress-admin or /wordpress-publish");
|
|
158
187
|
|
|
188
|
+
return true;
|
|
159
189
|
} catch (error) {
|
|
160
|
-
console.error(
|
|
161
|
-
console.log(
|
|
162
|
-
console.log(
|
|
163
|
-
console.log(
|
|
164
|
-
console.log(
|
|
165
|
-
console.log(
|
|
166
|
-
|
|
190
|
+
console.error("❌ WordPress MCP configuration failed:", error.message);
|
|
191
|
+
console.log("\n🛠️ Troubleshooting:");
|
|
192
|
+
console.log(" • Ensure WordPress credentials are configured in .env");
|
|
193
|
+
console.log(" • Check that .claude/mcp/wordpress-server.js exists");
|
|
194
|
+
console.log(" • Verify Node.js version is 18+ (required for MCP SDK)");
|
|
195
|
+
console.log(" • Run: npm install to ensure dependencies are installed");
|
|
196
|
+
|
|
167
197
|
return false;
|
|
168
198
|
}
|
|
169
199
|
}
|
|
@@ -175,7 +205,7 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
175
205
|
process.exit(success ? 0 : 1);
|
|
176
206
|
})
|
|
177
207
|
.catch((error) => {
|
|
178
|
-
console.error(
|
|
208
|
+
console.error("Configuration script error:", error);
|
|
179
209
|
process.exit(1);
|
|
180
210
|
});
|
|
181
|
-
}
|
|
211
|
+
}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* Handles installation of workflows, agents, commands, and dependencies
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import WorkflowInstaller from
|
|
10
|
-
import { ConfigManager } from
|
|
11
|
-
import { logger, ProgressTracker, createSpinner } from
|
|
12
|
-
import { ensureDir } from
|
|
13
|
-
import inquirer from
|
|
14
|
-
import path from
|
|
15
|
-
import fs from
|
|
9
|
+
import WorkflowInstaller from "../../lib/workflow-installer.js";
|
|
10
|
+
import { ConfigManager } from "../../lib/config-manager.js";
|
|
11
|
+
import { logger, ProgressTracker, createSpinner } from "../utils/logger.js";
|
|
12
|
+
import { ensureDir } from "../utils/file-utils.js";
|
|
13
|
+
import inquirer from "inquirer";
|
|
14
|
+
import path from "path";
|
|
15
|
+
import fs from "fs-extra";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Installation Orchestrator Class
|
|
@@ -32,13 +32,13 @@ class InstallationOrchestrator {
|
|
|
32
32
|
async run(options = {}) {
|
|
33
33
|
const {
|
|
34
34
|
workflows = [],
|
|
35
|
-
cliType =
|
|
35
|
+
cliType = "claude",
|
|
36
36
|
interactive = false,
|
|
37
37
|
force = false,
|
|
38
|
-
verbose = false
|
|
38
|
+
verbose = false,
|
|
39
39
|
} = options;
|
|
40
40
|
|
|
41
|
-
logger.header(
|
|
41
|
+
logger.header("MyAIDev Method Installation");
|
|
42
42
|
logger.info(`Target directory: ${this.targetDir}`);
|
|
43
43
|
logger.info(`CLI type: ${cliType}`);
|
|
44
44
|
logger.blank();
|
|
@@ -48,7 +48,7 @@ class InstallationOrchestrator {
|
|
|
48
48
|
if (interactive) {
|
|
49
49
|
const selectedWorkflows = await this.selectWorkflows();
|
|
50
50
|
if (selectedWorkflows.length === 0) {
|
|
51
|
-
logger.info(
|
|
51
|
+
logger.info("No workflows selected. Exiting.");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
workflows.push(...selectedWorkflows);
|
|
@@ -56,11 +56,11 @@ class InstallationOrchestrator {
|
|
|
56
56
|
|
|
57
57
|
// If no workflows specified, install core
|
|
58
58
|
if (workflows.length === 0) {
|
|
59
|
-
workflows.push(
|
|
59
|
+
workflows.push("core");
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// Install each workflow
|
|
63
|
-
const progress = new ProgressTracker(workflows.length,
|
|
63
|
+
const progress = new ProgressTracker(workflows.length, "Installation");
|
|
64
64
|
progress.start();
|
|
65
65
|
|
|
66
66
|
for (const workflow of workflows) {
|
|
@@ -82,7 +82,6 @@ class InstallationOrchestrator {
|
|
|
82
82
|
if (interactive && this.needsConfiguration()) {
|
|
83
83
|
await this.offerConfiguration();
|
|
84
84
|
}
|
|
85
|
-
|
|
86
85
|
} catch (error) {
|
|
87
86
|
logger.error(`Installation failed: ${error.message}`);
|
|
88
87
|
throw error;
|
|
@@ -98,21 +97,21 @@ class InstallationOrchestrator {
|
|
|
98
97
|
|
|
99
98
|
const { workflows } = await inquirer.prompt([
|
|
100
99
|
{
|
|
101
|
-
type:
|
|
102
|
-
name:
|
|
103
|
-
message:
|
|
104
|
-
choices: available.map(w => ({
|
|
100
|
+
type: "checkbox",
|
|
101
|
+
name: "workflows",
|
|
102
|
+
message: "Select workflows to install:",
|
|
103
|
+
choices: available.map((w) => ({
|
|
105
104
|
name: `${w.name} - ${w.description}`,
|
|
106
105
|
value: w.id,
|
|
107
|
-
checked: w.id ===
|
|
106
|
+
checked: w.id === "core",
|
|
108
107
|
})),
|
|
109
108
|
validate: (answer) => {
|
|
110
109
|
if (answer.length === 0) {
|
|
111
|
-
return
|
|
110
|
+
return "Please select at least one workflow";
|
|
112
111
|
}
|
|
113
112
|
return true;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
113
|
+
},
|
|
114
|
+
},
|
|
116
115
|
]);
|
|
117
116
|
|
|
118
117
|
return workflows;
|
|
@@ -135,17 +134,21 @@ class InstallationOrchestrator {
|
|
|
135
134
|
spinner.start();
|
|
136
135
|
|
|
137
136
|
try {
|
|
138
|
-
const result = await this.installer.install(
|
|
137
|
+
const result = await this.installer.install(
|
|
138
|
+
workflow,
|
|
139
|
+
this.targetDir,
|
|
140
|
+
cliType,
|
|
141
|
+
);
|
|
139
142
|
|
|
140
143
|
if (result.success) {
|
|
141
144
|
spinner.succeed(`${workflow} installed`);
|
|
142
145
|
|
|
143
146
|
if (verbose && result.installed) {
|
|
144
147
|
if (result.installed.agents?.length > 0) {
|
|
145
|
-
logger.info(` Agents: ${result.installed.agents.join(
|
|
148
|
+
logger.info(` Agents: ${result.installed.agents.join(", ")}`);
|
|
146
149
|
}
|
|
147
150
|
if (result.installed.commands?.length > 0) {
|
|
148
|
-
logger.info(` Commands: ${result.installed.commands.join(
|
|
151
|
+
logger.info(` Commands: ${result.installed.commands.join(", ")}`);
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
154
|
} else {
|
|
@@ -168,12 +171,12 @@ class InstallationOrchestrator {
|
|
|
168
171
|
* Show installation summary
|
|
169
172
|
*/
|
|
170
173
|
async showSummary() {
|
|
171
|
-
logger.section(
|
|
174
|
+
logger.section("Installation Summary");
|
|
172
175
|
|
|
173
176
|
// Count installed items
|
|
174
|
-
const claudeDir = path.join(this.targetDir,
|
|
175
|
-
const agentsDir = path.join(claudeDir,
|
|
176
|
-
const commandsDir = path.join(claudeDir,
|
|
177
|
+
const claudeDir = path.join(this.targetDir, ".claude");
|
|
178
|
+
const agentsDir = path.join(claudeDir, "agents");
|
|
179
|
+
const commandsDir = path.join(claudeDir, "commands");
|
|
177
180
|
|
|
178
181
|
let agentCount = 0;
|
|
179
182
|
let commandCount = 0;
|
|
@@ -181,38 +184,49 @@ class InstallationOrchestrator {
|
|
|
181
184
|
try {
|
|
182
185
|
if (await fs.pathExists(agentsDir)) {
|
|
183
186
|
const agents = await fs.readdir(agentsDir);
|
|
184
|
-
agentCount = agents.filter(f => f.endsWith(
|
|
187
|
+
agentCount = agents.filter((f) => f.endsWith(".md")).length;
|
|
185
188
|
}
|
|
186
189
|
if (await fs.pathExists(commandsDir)) {
|
|
187
190
|
const commands = await fs.readdir(commandsDir);
|
|
188
|
-
commandCount = commands.filter(f => f.endsWith(
|
|
191
|
+
commandCount = commands.filter((f) => f.endsWith(".md")).length;
|
|
189
192
|
}
|
|
190
193
|
} catch (error) {
|
|
191
194
|
// Ignore errors
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
logger.log(`Workflows installed: ${this.installedWorkflows.length}`);
|
|
195
|
-
logger.log(` - ${this.installedWorkflows.join(
|
|
198
|
+
logger.log(` - ${this.installedWorkflows.join(", ")}`);
|
|
196
199
|
logger.blank();
|
|
197
200
|
logger.log(`Agents: ${agentCount}`);
|
|
198
201
|
logger.log(`Commands: ${commandCount}`);
|
|
199
202
|
logger.blank();
|
|
200
203
|
|
|
201
204
|
// Show next steps
|
|
202
|
-
logger.section(
|
|
203
|
-
logger.log(
|
|
204
|
-
logger.log(
|
|
205
|
+
logger.section("Next Steps");
|
|
206
|
+
logger.log("1. Configure your settings:");
|
|
207
|
+
logger.log(" Run: /myai-configurator");
|
|
205
208
|
logger.blank();
|
|
206
|
-
logger.log(
|
|
209
|
+
logger.log("2. Available commands:");
|
|
207
210
|
|
|
208
|
-
if (
|
|
209
|
-
|
|
211
|
+
if (
|
|
212
|
+
this.installedWorkflows.includes("content") ||
|
|
213
|
+
this.installedWorkflows.includes("core")
|
|
214
|
+
) {
|
|
215
|
+
logger.log(" /content-writer - Create SEO-optimized content");
|
|
210
216
|
}
|
|
211
|
-
if (
|
|
212
|
-
|
|
217
|
+
if (
|
|
218
|
+
this.installedWorkflows.includes("content") ||
|
|
219
|
+
this.installedWorkflows.includes("publish-wordpress")
|
|
220
|
+
) {
|
|
221
|
+
logger.log(" /wordpress-publish - Publish to WordPress");
|
|
213
222
|
}
|
|
214
|
-
if (
|
|
215
|
-
|
|
223
|
+
if (
|
|
224
|
+
this.installedWorkflows.includes("content") ||
|
|
225
|
+
this.installedWorkflows.includes("core")
|
|
226
|
+
) {
|
|
227
|
+
logger.log(
|
|
228
|
+
" /myai-content-production-coordinator - Coordinate content workflow",
|
|
229
|
+
);
|
|
216
230
|
}
|
|
217
231
|
|
|
218
232
|
logger.blank();
|
|
@@ -223,11 +237,11 @@ class InstallationOrchestrator {
|
|
|
223
237
|
* @returns {boolean}
|
|
224
238
|
*/
|
|
225
239
|
needsConfiguration() {
|
|
226
|
-
const needsWordPress = this.installedWorkflows.some(w =>
|
|
227
|
-
[
|
|
240
|
+
const needsWordPress = this.installedWorkflows.some((w) =>
|
|
241
|
+
["content", "publish-wordpress"].includes(w),
|
|
228
242
|
);
|
|
229
|
-
const needsOpenStack = this.installedWorkflows.some(w =>
|
|
230
|
-
[
|
|
243
|
+
const needsOpenStack = this.installedWorkflows.some((w) =>
|
|
244
|
+
["openstack"].includes(w),
|
|
231
245
|
);
|
|
232
246
|
|
|
233
247
|
return needsWordPress || needsOpenStack;
|
|
@@ -239,16 +253,16 @@ class InstallationOrchestrator {
|
|
|
239
253
|
async offerConfiguration() {
|
|
240
254
|
const { configure } = await inquirer.prompt([
|
|
241
255
|
{
|
|
242
|
-
type:
|
|
243
|
-
name:
|
|
244
|
-
message:
|
|
245
|
-
default: true
|
|
246
|
-
}
|
|
256
|
+
type: "confirm",
|
|
257
|
+
name: "configure",
|
|
258
|
+
message: "Would you like to configure your settings now?",
|
|
259
|
+
default: true,
|
|
260
|
+
},
|
|
247
261
|
]);
|
|
248
262
|
|
|
249
263
|
if (configure) {
|
|
250
264
|
// Import and run configure script
|
|
251
|
-
const { default: runConfigure } = await import(
|
|
265
|
+
const { default: runConfigure } = await import("./configure.js");
|
|
252
266
|
// Note: This will run the configure wizard
|
|
253
267
|
}
|
|
254
268
|
}
|
|
@@ -258,7 +272,7 @@ class InstallationOrchestrator {
|
|
|
258
272
|
* @param {string[]} workflows - Workflows to uninstall
|
|
259
273
|
*/
|
|
260
274
|
async uninstall(workflows) {
|
|
261
|
-
logger.header(
|
|
275
|
+
logger.header("Uninstalling Workflows");
|
|
262
276
|
|
|
263
277
|
for (const workflow of workflows) {
|
|
264
278
|
const spinner = createSpinner(`Uninstalling ${workflow}...`);
|
|
@@ -275,7 +289,12 @@ class InstallationOrchestrator {
|
|
|
275
289
|
// Remove agents
|
|
276
290
|
if (workflowInfo.agents) {
|
|
277
291
|
for (const agent of workflowInfo.agents) {
|
|
278
|
-
const agentPath = path.join(
|
|
292
|
+
const agentPath = path.join(
|
|
293
|
+
this.targetDir,
|
|
294
|
+
".claude",
|
|
295
|
+
"agents",
|
|
296
|
+
`${agent}.md`,
|
|
297
|
+
);
|
|
279
298
|
await fs.remove(agentPath);
|
|
280
299
|
}
|
|
281
300
|
}
|
|
@@ -283,7 +302,12 @@ class InstallationOrchestrator {
|
|
|
283
302
|
// Remove commands
|
|
284
303
|
if (workflowInfo.commands) {
|
|
285
304
|
for (const command of workflowInfo.commands) {
|
|
286
|
-
const commandPath = path.join(
|
|
305
|
+
const commandPath = path.join(
|
|
306
|
+
this.targetDir,
|
|
307
|
+
".claude",
|
|
308
|
+
"commands",
|
|
309
|
+
`${command}.md`,
|
|
310
|
+
);
|
|
287
311
|
await fs.remove(commandPath);
|
|
288
312
|
}
|
|
289
313
|
}
|
|
@@ -299,41 +323,41 @@ class InstallationOrchestrator {
|
|
|
299
323
|
* List installed workflows
|
|
300
324
|
*/
|
|
301
325
|
async listInstalled() {
|
|
302
|
-
logger.header(
|
|
326
|
+
logger.header("Installed Workflows");
|
|
303
327
|
|
|
304
|
-
const claudeDir = path.join(this.targetDir,
|
|
328
|
+
const claudeDir = path.join(this.targetDir, ".claude");
|
|
305
329
|
|
|
306
|
-
if (!await fs.pathExists(claudeDir)) {
|
|
307
|
-
logger.info(
|
|
330
|
+
if (!(await fs.pathExists(claudeDir))) {
|
|
331
|
+
logger.info("No workflows installed.");
|
|
308
332
|
return;
|
|
309
333
|
}
|
|
310
334
|
|
|
311
|
-
const agentsDir = path.join(claudeDir,
|
|
312
|
-
const commandsDir = path.join(claudeDir,
|
|
335
|
+
const agentsDir = path.join(claudeDir, "agents");
|
|
336
|
+
const commandsDir = path.join(claudeDir, "commands");
|
|
313
337
|
|
|
314
|
-
logger.section(
|
|
338
|
+
logger.section("Agents");
|
|
315
339
|
if (await fs.pathExists(agentsDir)) {
|
|
316
340
|
const agents = await fs.readdir(agentsDir);
|
|
317
|
-
const mdAgents = agents.filter(f => f.endsWith(
|
|
341
|
+
const mdAgents = agents.filter((f) => f.endsWith(".md"));
|
|
318
342
|
if (mdAgents.length > 0) {
|
|
319
343
|
for (const agent of mdAgents) {
|
|
320
|
-
logger.log(` • ${agent.replace(
|
|
344
|
+
logger.log(` • ${agent.replace(".md", "")}`);
|
|
321
345
|
}
|
|
322
346
|
} else {
|
|
323
|
-
logger.info(
|
|
347
|
+
logger.info(" No agents installed.");
|
|
324
348
|
}
|
|
325
349
|
}
|
|
326
350
|
|
|
327
|
-
logger.section(
|
|
351
|
+
logger.section("Commands");
|
|
328
352
|
if (await fs.pathExists(commandsDir)) {
|
|
329
353
|
const commands = await fs.readdir(commandsDir);
|
|
330
|
-
const mdCommands = commands.filter(f => f.endsWith(
|
|
354
|
+
const mdCommands = commands.filter((f) => f.endsWith(".md"));
|
|
331
355
|
if (mdCommands.length > 0) {
|
|
332
356
|
for (const command of mdCommands) {
|
|
333
|
-
logger.log(` • ${command.replace(
|
|
357
|
+
logger.log(` • ${command.replace(".md", "")}`);
|
|
334
358
|
}
|
|
335
359
|
} else {
|
|
336
|
-
logger.info(
|
|
360
|
+
logger.info(" No commands installed.");
|
|
337
361
|
}
|
|
338
362
|
}
|
|
339
363
|
}
|
|
@@ -347,38 +371,38 @@ class InstallationOrchestrator {
|
|
|
347
371
|
function parseArgs(args) {
|
|
348
372
|
const options = {
|
|
349
373
|
workflows: [],
|
|
350
|
-
cliType:
|
|
374
|
+
cliType: "claude",
|
|
351
375
|
interactive: false,
|
|
352
376
|
force: false,
|
|
353
377
|
verbose: false,
|
|
354
378
|
uninstall: false,
|
|
355
379
|
list: false,
|
|
356
|
-
help: false
|
|
380
|
+
help: false,
|
|
357
381
|
};
|
|
358
382
|
|
|
359
383
|
let i = 0;
|
|
360
384
|
while (i < args.length) {
|
|
361
385
|
const arg = args[i];
|
|
362
386
|
|
|
363
|
-
if (arg ===
|
|
387
|
+
if (arg === "--help" || arg === "-h") {
|
|
364
388
|
options.help = true;
|
|
365
|
-
} else if (arg ===
|
|
389
|
+
} else if (arg === "--interactive" || arg === "-i") {
|
|
366
390
|
options.interactive = true;
|
|
367
|
-
} else if (arg ===
|
|
391
|
+
} else if (arg === "--force" || arg === "-f") {
|
|
368
392
|
options.force = true;
|
|
369
|
-
} else if (arg ===
|
|
393
|
+
} else if (arg === "--verbose" || arg === "-v") {
|
|
370
394
|
options.verbose = true;
|
|
371
|
-
} else if (arg ===
|
|
372
|
-
options.cliType =
|
|
373
|
-
} else if (arg ===
|
|
374
|
-
options.cliType =
|
|
375
|
-
} else if (arg ===
|
|
376
|
-
options.cliType =
|
|
377
|
-
} else if (arg ===
|
|
395
|
+
} else if (arg === "--claude") {
|
|
396
|
+
options.cliType = "claude";
|
|
397
|
+
} else if (arg === "--gemini") {
|
|
398
|
+
options.cliType = "gemini";
|
|
399
|
+
} else if (arg === "--codex") {
|
|
400
|
+
options.cliType = "codex";
|
|
401
|
+
} else if (arg === "--uninstall" || arg === "-u") {
|
|
378
402
|
options.uninstall = true;
|
|
379
|
-
} else if (arg ===
|
|
403
|
+
} else if (arg === "--list" || arg === "-l") {
|
|
380
404
|
options.list = true;
|
|
381
|
-
} else if (!arg.startsWith(
|
|
405
|
+
} else if (!arg.startsWith("-")) {
|
|
382
406
|
options.workflows.push(arg);
|
|
383
407
|
}
|
|
384
408
|
|
|
@@ -444,7 +468,7 @@ async function main() {
|
|
|
444
468
|
await orchestrator.listInstalled();
|
|
445
469
|
} else if (options.uninstall) {
|
|
446
470
|
if (options.workflows.length === 0) {
|
|
447
|
-
logger.error(
|
|
471
|
+
logger.error("Please specify workflows to uninstall.");
|
|
448
472
|
process.exit(1);
|
|
449
473
|
}
|
|
450
474
|
await orchestrator.uninstall(options.workflows);
|