myaidev-method 0.0.7 → 0.1.0
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/CLAUDE.md +52 -0
- package/.claude/agents/content-writer.md +155 -0
- package/.claude/commands/myai-configure.md +44 -0
- package/.claude/commands/myai-content-writer.md +78 -0
- package/.claude/commands/myai-wordpress-publish.md +120 -0
- package/.claude/mcp/gutenberg-converter.js +447 -0
- package/.claude/mcp/mcp-config.json +101 -0
- package/.claude/mcp/wordpress-server-simple.js +182 -0
- package/.claude/mcp/wordpress-server.js +1277 -0
- package/.claude/settings.local.json +12 -0
- package/COOLIFY_DEPLOYMENT.md +750 -0
- package/README.md +6 -6
- package/WORDPRESS_ADMIN_SCRIPTS.md +474 -0
- package/bin/cli.js +17 -22
- package/dist/mcp/gutenberg-converter.js +447 -0
- package/dist/mcp/mcp-config.json +101 -0
- package/dist/mcp/wordpress-server-simple.js +182 -0
- package/dist/mcp/wordpress-server.js +1277 -0
- package/package.json +29 -5
- package/src/lib/coolify-utils.js +380 -0
- package/src/lib/report-synthesizer.js +504 -0
- package/src/lib/wordpress-admin-utils.js +703 -0
- package/src/mcp/health-check.js +190 -0
- package/src/mcp/mcp-launcher.js +237 -0
- package/src/scripts/coolify-deploy-app.js +287 -0
- package/src/scripts/coolify-list-resources.js +199 -0
- package/src/scripts/coolify-status.js +97 -0
- package/src/scripts/test-coolify-deploy.js +47 -0
- package/src/scripts/wordpress-comprehensive-report.js +325 -0
- package/src/scripts/wordpress-health-check.js +175 -0
- package/src/scripts/wordpress-performance-check.js +461 -0
- package/src/scripts/wordpress-security-scan.js +221 -0
- package/src/templates/claude/agents/coolify-deploy.md +563 -0
- package/src/templates/claude/agents/wordpress-admin.md +228 -271
- package/src/templates/claude/commands/myai-configure.md +10 -74
- package/src/templates/claude/commands/myai-coolify-deploy.md +172 -0
- package/src/templates/claude/commands/myai-wordpress-publish.md +16 -8
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# MyAIDev Method
|
|
2
2
|
|
|
3
|
-
> **🚀 The easiest way to supercharge your AI CLI with professional agents and
|
|
3
|
+
> **🚀 The easiest way to supercharge your AI CLI with professional agents and get real work done!**
|
|
4
4
|
|
|
5
|
-
A comprehensive package for AI CLI tools (Claude Code, Gemini CLI, Codex CLI) that provides custom subagents and MCP integrations for enhanced development workflows. **Zero
|
|
5
|
+
A comprehensive package for AI CLI tools (Claude Code, Gemini CLI, Codex CLI) that provides custom subagents and MCP integrations for enhanced development workflows. **Zero code required** - just run one command and start creating professional content!
|
|
6
6
|
|
|
7
7
|
**✨ What makes this special:**
|
|
8
8
|
- **Instant setup**: One `npx` command and you're ready
|
|
9
9
|
- **Professional agents**: Content writer and WordPress admin out-of-the-box
|
|
10
|
-
- **Claude Code native**: Follows official standards for maximum compatibility
|
|
11
|
-
- **No dependencies**: Works standalone, WordPress integration is optional
|
|
10
|
+
- **Claude Code native**: Follows official standards for maximum compatibility, with Gemini and OpenAI Codex CLI too.
|
|
11
|
+
- **No dependencies**: Works standalone, leverages MCPs for WordPress, Notion, Google Workspace integration is optional
|
|
12
12
|
|
|
13
13
|
## 📋 Table of Contents
|
|
14
14
|
|
|
@@ -62,11 +62,11 @@ npx myaidev-method init --codex
|
|
|
62
62
|
npx myaidev-method init
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
**That's it!** No
|
|
65
|
+
**That's it!** No complex setup.
|
|
66
66
|
|
|
67
67
|
### Requirements
|
|
68
68
|
|
|
69
|
-
- Node.js >=
|
|
69
|
+
- Node.js >= 20.0.0
|
|
70
70
|
- Claude Code >= 1.0.0 (for Claude features)
|
|
71
71
|
- WordPress site with REST API enabled (optional, for WordPress features)
|
|
72
72
|
- SSH access to server (optional, for advanced WordPress admin features)
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
# WordPress Admin Scripts
|
|
2
|
+
|
|
3
|
+
Reusable Node.js utilities for WordPress administration tasks with predictable JSON output for agent processing.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The MyAIDev Method package includes scriptable WordPress admin utilities that can be:
|
|
8
|
+
- Run directly via `npm run` commands
|
|
9
|
+
- Called via `npx myaidev-method` commands
|
|
10
|
+
- Used by the `wordpress-admin` agent for automated analysis
|
|
11
|
+
- Integrated into CI/CD pipelines for monitoring
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install myaidev-method
|
|
17
|
+
# or
|
|
18
|
+
npx myaidev-method init --claude
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
All scripts use WordPress REST API credentials from `.env`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
WORDPRESS_URL=https://your-site.com
|
|
27
|
+
WORDPRESS_USERNAME=admin_username
|
|
28
|
+
WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Create WordPress Application Password:
|
|
32
|
+
1. Go to WordPress Admin → Users → Your Profile
|
|
33
|
+
2. Scroll to "Application Passwords"
|
|
34
|
+
3. Enter name (e.g., "MyAIDev Scripts") and click "Add New"
|
|
35
|
+
4. Copy the generated password to `.env`
|
|
36
|
+
|
|
37
|
+
## Available Scripts
|
|
38
|
+
|
|
39
|
+
### 1. Health Check
|
|
40
|
+
|
|
41
|
+
Comprehensive WordPress site health assessment.
|
|
42
|
+
|
|
43
|
+
**Usage:**
|
|
44
|
+
```bash
|
|
45
|
+
# Via npm
|
|
46
|
+
npm run wordpress:health-check
|
|
47
|
+
|
|
48
|
+
# Via npx
|
|
49
|
+
npx myaidev-method wordpress:health-check
|
|
50
|
+
|
|
51
|
+
# With options
|
|
52
|
+
npm run wordpress:health-check -- --format text --output health-report.txt
|
|
53
|
+
npx myaidev-method wordpress:health-check -- --verbose
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Options:**
|
|
57
|
+
- `--format <type>` - Output format: `json` (default) or `text`
|
|
58
|
+
- `--output <file>` / `-o <file>` - Write output to file
|
|
59
|
+
- `--verbose` / `-v` - Show detailed progress
|
|
60
|
+
- `--help` / `-h` - Show help
|
|
61
|
+
|
|
62
|
+
**Checks performed:**
|
|
63
|
+
- WordPress version status
|
|
64
|
+
- Plugin health and updates
|
|
65
|
+
- Content health (posts, media, cleanup needs)
|
|
66
|
+
- User security audit
|
|
67
|
+
- Performance metrics
|
|
68
|
+
|
|
69
|
+
**Output Structure (JSON):**
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"success": true,
|
|
73
|
+
"timestamp": "2025-10-01T12:00:00.000Z",
|
|
74
|
+
"site": { "name": "...", "url": "..." },
|
|
75
|
+
"overall_health": {
|
|
76
|
+
"score": 85,
|
|
77
|
+
"grade": "B",
|
|
78
|
+
"status": "healthy"
|
|
79
|
+
},
|
|
80
|
+
"checks": [...],
|
|
81
|
+
"summary": {
|
|
82
|
+
"total_checks": 5,
|
|
83
|
+
"passed": 4,
|
|
84
|
+
"warnings": 1,
|
|
85
|
+
"critical": 0
|
|
86
|
+
},
|
|
87
|
+
"recommendations": [...]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Exit Codes:**
|
|
92
|
+
- `0` - No critical issues
|
|
93
|
+
- `1` - Scan error
|
|
94
|
+
- `2` - Critical issues found
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### 2. Security Scan
|
|
99
|
+
|
|
100
|
+
Security vulnerability detection and user audit.
|
|
101
|
+
|
|
102
|
+
**Usage:**
|
|
103
|
+
```bash
|
|
104
|
+
# Via npm
|
|
105
|
+
npm run wordpress:security-scan
|
|
106
|
+
|
|
107
|
+
# Via npx
|
|
108
|
+
npx myaidev-method wordpress:security-scan
|
|
109
|
+
|
|
110
|
+
# With options
|
|
111
|
+
npm run wordpress:security-scan -- --detailed --output security-report.json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Options:**
|
|
115
|
+
- `--format <type>` - Output format: `json` (default) or `text`
|
|
116
|
+
- `--output <file>` / `-o <file>` - Write output to file
|
|
117
|
+
- `--verbose` / `-v` - Show detailed progress
|
|
118
|
+
- `--detailed` / `-d` - Include detailed vulnerability info
|
|
119
|
+
- `--help` / `-h` - Show help
|
|
120
|
+
|
|
121
|
+
**Security checks:**
|
|
122
|
+
- User account security audit
|
|
123
|
+
- Plugin vulnerability detection
|
|
124
|
+
- Outdated software detection
|
|
125
|
+
- Common security misconfigurations
|
|
126
|
+
- Weak password patterns
|
|
127
|
+
|
|
128
|
+
**Output Structure (JSON):**
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"success": true,
|
|
132
|
+
"timestamp": "2025-10-01T12:00:00.000Z",
|
|
133
|
+
"site": { "name": "...", "url": "..." },
|
|
134
|
+
"security_score": 85,
|
|
135
|
+
"vulnerabilities": [],
|
|
136
|
+
"warnings": [...],
|
|
137
|
+
"summary": {
|
|
138
|
+
"critical_issues": 0,
|
|
139
|
+
"warnings": 2,
|
|
140
|
+
"status": "warning"
|
|
141
|
+
},
|
|
142
|
+
"recommendations": [...]
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Exit Codes:**
|
|
147
|
+
- `0` - No security issues
|
|
148
|
+
- `1` - Scan error
|
|
149
|
+
- `2` - Warnings found
|
|
150
|
+
- `3` - Critical vulnerabilities found
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### 3. Performance Check
|
|
155
|
+
|
|
156
|
+
Performance analysis with timing measurements.
|
|
157
|
+
|
|
158
|
+
**Usage:**
|
|
159
|
+
```bash
|
|
160
|
+
# Via npm
|
|
161
|
+
npm run wordpress:performance-check
|
|
162
|
+
|
|
163
|
+
# Via npx
|
|
164
|
+
npx myaidev-method wordpress:performance-check
|
|
165
|
+
|
|
166
|
+
# With options
|
|
167
|
+
npm run wordpress:performance-check -- --iterations 5 --output perf-report.json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Options:**
|
|
171
|
+
- `--format <type>` - Output format: `json` (default) or `text`
|
|
172
|
+
- `--output <file>` / `-o <file>` - Write output to file
|
|
173
|
+
- `--verbose` / `-v` - Show detailed progress
|
|
174
|
+
- `--iterations <n>` / `-i <n>` - Number of timing iterations (default: 3)
|
|
175
|
+
- `--help` / `-h` - Show help
|
|
176
|
+
|
|
177
|
+
**Performance checks:**
|
|
178
|
+
- API response time measurement (avg, median, min, max)
|
|
179
|
+
- Database content analysis
|
|
180
|
+
- Media file optimization opportunities
|
|
181
|
+
- Plugin performance impact
|
|
182
|
+
- Resource usage patterns
|
|
183
|
+
|
|
184
|
+
**Output Structure (JSON):**
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"success": true,
|
|
188
|
+
"timestamp": "2025-10-01T12:00:00.000Z",
|
|
189
|
+
"site": { "name": "...", "url": "..." },
|
|
190
|
+
"performance_score": 85,
|
|
191
|
+
"timing": {
|
|
192
|
+
"average": 250,
|
|
193
|
+
"median": 245,
|
|
194
|
+
"min": 230,
|
|
195
|
+
"max": 280
|
|
196
|
+
},
|
|
197
|
+
"metrics": {
|
|
198
|
+
"post_count": 150,
|
|
199
|
+
"media_count": 400,
|
|
200
|
+
"plugin_count": 15,
|
|
201
|
+
"active_plugins": 12
|
|
202
|
+
},
|
|
203
|
+
"analysis": {...},
|
|
204
|
+
"recommendations": [...]
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Exit Codes:**
|
|
209
|
+
- `0` - No performance issues
|
|
210
|
+
- `1` - Check error
|
|
211
|
+
- `2` - Performance warnings
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### 4. Comprehensive Report
|
|
216
|
+
|
|
217
|
+
Runs all checks and synthesizes into comprehensive report.
|
|
218
|
+
|
|
219
|
+
**Usage:**
|
|
220
|
+
```bash
|
|
221
|
+
# Via npm
|
|
222
|
+
npm run wordpress:comprehensive-report
|
|
223
|
+
|
|
224
|
+
# Via npx
|
|
225
|
+
npx myaidev-method wordpress:comprehensive-report
|
|
226
|
+
|
|
227
|
+
# With options
|
|
228
|
+
npm run wordpress:comprehensive-report -- --format markdown --output wp-report.md
|
|
229
|
+
npm run wordpress:comprehensive-report -- --save-individual --verbose
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Options:**
|
|
233
|
+
- `--format <type>` - Output format: `markdown` (default) or `json`
|
|
234
|
+
- `--output <file>` / `-o <file>` - Write output to file
|
|
235
|
+
- `--verbose` / `-v` - Show detailed progress
|
|
236
|
+
- `--save-individual` - Save individual report files as well
|
|
237
|
+
- `--health-only` - Only run health check
|
|
238
|
+
- `--security-only` - Only run security scan
|
|
239
|
+
- `--performance-only` - Only run performance check
|
|
240
|
+
- `--help` / `-h` - Show help
|
|
241
|
+
|
|
242
|
+
**Report includes:**
|
|
243
|
+
- Executive summary with all scores
|
|
244
|
+
- Critical issues requiring immediate attention
|
|
245
|
+
- Warnings and recommendations
|
|
246
|
+
- Prioritized action items
|
|
247
|
+
- Key metrics and statistics
|
|
248
|
+
- Individual check results
|
|
249
|
+
|
|
250
|
+
**Exit Codes:**
|
|
251
|
+
- `0` - No critical issues
|
|
252
|
+
- `1` - Error occurred
|
|
253
|
+
- `2` - Warnings found
|
|
254
|
+
- `3` - Critical issues found
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Agent Integration
|
|
259
|
+
|
|
260
|
+
These scripts are designed to work with the `wordpress-admin` agent:
|
|
261
|
+
|
|
262
|
+
### Example: WordPress Admin Agent Workflow
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# Agent calls comprehensive report
|
|
266
|
+
npx myaidev-method wordpress:comprehensive-report --format json --output /tmp/wp-report.json
|
|
267
|
+
|
|
268
|
+
# Agent reads and processes JSON output
|
|
269
|
+
# Agent generates natural language analysis
|
|
270
|
+
# Agent provides actionable recommendations
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Agent Usage Pattern
|
|
274
|
+
|
|
275
|
+
1. **Script Execution**: Agent runs script to get structured data
|
|
276
|
+
2. **Data Processing**: Agent parses JSON output
|
|
277
|
+
3. **Analysis**: Agent synthesizes findings with context
|
|
278
|
+
4. **Recommendations**: Agent provides prioritized actions
|
|
279
|
+
|
|
280
|
+
### Calling from Agent
|
|
281
|
+
|
|
282
|
+
In `.claude/agents/wordpress-admin.md`:
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
## Running Health Check
|
|
286
|
+
|
|
287
|
+
Use the Bash tool to execute the health check script:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
npm run wordpress:health-check -- --format json --output /tmp/health.json
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Then read the JSON output:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# Read the report
|
|
297
|
+
cat /tmp/health.json
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Process the structured data and provide comprehensive analysis.
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Library Usage
|
|
306
|
+
|
|
307
|
+
You can also use the utilities programmatically:
|
|
308
|
+
|
|
309
|
+
```javascript
|
|
310
|
+
import { WordPressAdminUtils } from 'myaidev-method/src/lib/wordpress-admin-utils.js';
|
|
311
|
+
import { ReportSynthesizer } from 'myaidev-method/src/lib/report-synthesizer.js';
|
|
312
|
+
|
|
313
|
+
// Initialize
|
|
314
|
+
const wpUtils = new WordPressAdminUtils({
|
|
315
|
+
url: 'https://your-site.com',
|
|
316
|
+
username: 'admin',
|
|
317
|
+
appPassword: 'xxxx xxxx xxxx xxxx'
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// Run health check
|
|
321
|
+
const healthData = await wpUtils.runHealthCheck();
|
|
322
|
+
console.log(healthData);
|
|
323
|
+
|
|
324
|
+
// Run security scan
|
|
325
|
+
const securityData = await wpUtils.runSecurityScan();
|
|
326
|
+
console.log(securityData);
|
|
327
|
+
|
|
328
|
+
// Synthesize multiple reports
|
|
329
|
+
const synthesizer = new ReportSynthesizer();
|
|
330
|
+
synthesizer.addReport(healthData, 'health');
|
|
331
|
+
synthesizer.addReport(securityData, 'security');
|
|
332
|
+
|
|
333
|
+
const comprehensive = synthesizer.synthesize();
|
|
334
|
+
console.log(comprehensive);
|
|
335
|
+
|
|
336
|
+
// Generate markdown report
|
|
337
|
+
const markdown = synthesizer.generateMarkdownReport();
|
|
338
|
+
console.log(markdown);
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## CI/CD Integration
|
|
344
|
+
|
|
345
|
+
### Example: GitHub Actions
|
|
346
|
+
|
|
347
|
+
```yaml
|
|
348
|
+
name: WordPress Health Check
|
|
349
|
+
|
|
350
|
+
on:
|
|
351
|
+
schedule:
|
|
352
|
+
- cron: '0 0 * * *' # Daily at midnight
|
|
353
|
+
|
|
354
|
+
jobs:
|
|
355
|
+
health-check:
|
|
356
|
+
runs-on: ubuntu-latest
|
|
357
|
+
steps:
|
|
358
|
+
- uses: actions/checkout@v3
|
|
359
|
+
|
|
360
|
+
- name: Setup Node.js
|
|
361
|
+
uses: actions/setup-node@v3
|
|
362
|
+
with:
|
|
363
|
+
node-version: '18'
|
|
364
|
+
|
|
365
|
+
- name: Install dependencies
|
|
366
|
+
run: npm install myaidev-method
|
|
367
|
+
|
|
368
|
+
- name: Run health check
|
|
369
|
+
env:
|
|
370
|
+
WORDPRESS_URL: ${{ secrets.WORDPRESS_URL }}
|
|
371
|
+
WORDPRESS_USERNAME: ${{ secrets.WORDPRESS_USERNAME }}
|
|
372
|
+
WORDPRESS_APP_PASSWORD: ${{ secrets.WORDPRESS_APP_PASSWORD }}
|
|
373
|
+
run: |
|
|
374
|
+
npx myaidev-method wordpress:comprehensive-report \
|
|
375
|
+
--format json \
|
|
376
|
+
--output health-report.json
|
|
377
|
+
|
|
378
|
+
- name: Upload report
|
|
379
|
+
uses: actions/upload-artifact@v3
|
|
380
|
+
with:
|
|
381
|
+
name: wordpress-health-report
|
|
382
|
+
path: health-report.json
|
|
383
|
+
|
|
384
|
+
- name: Check for critical issues
|
|
385
|
+
run: |
|
|
386
|
+
# Exit code 3 = critical issues
|
|
387
|
+
if [ $? -eq 3 ]; then
|
|
388
|
+
echo "::error::Critical WordPress issues found"
|
|
389
|
+
exit 1
|
|
390
|
+
fi
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Monitoring & Automation
|
|
396
|
+
|
|
397
|
+
### Scheduled Health Checks
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# Add to crontab for daily checks
|
|
401
|
+
0 0 * * * cd /path/to/project && npm run wordpress:comprehensive-report -- --output /var/log/wp-health-$(date +\%Y\%m\%d).json
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Alert on Critical Issues
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
#!/bin/bash
|
|
408
|
+
# health-check-alert.sh
|
|
409
|
+
|
|
410
|
+
npm run wordpress:health-check -- --format json --output /tmp/health.json
|
|
411
|
+
EXIT_CODE=$?
|
|
412
|
+
|
|
413
|
+
if [ $EXIT_CODE -eq 2 ]; then
|
|
414
|
+
# Send alert (email, Slack, etc.)
|
|
415
|
+
echo "Critical WordPress issues detected!"
|
|
416
|
+
cat /tmp/health.json | mail -s "WordPress Critical Alert" admin@example.com
|
|
417
|
+
fi
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## Troubleshooting
|
|
423
|
+
|
|
424
|
+
### Authentication Errors
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
# Test connection
|
|
428
|
+
npx myaidev-method wordpress:health-check --verbose
|
|
429
|
+
|
|
430
|
+
# Common issues:
|
|
431
|
+
# - Incorrect application password (no spaces in .env)
|
|
432
|
+
# - Wrong username
|
|
433
|
+
# - REST API disabled
|
|
434
|
+
# - Firewall blocking requests
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Permission Errors
|
|
438
|
+
|
|
439
|
+
Some operations require administrator privileges:
|
|
440
|
+
- Plugin management
|
|
441
|
+
- User audits
|
|
442
|
+
- Theme information
|
|
443
|
+
|
|
444
|
+
Ensure the WordPress user has admin role.
|
|
445
|
+
|
|
446
|
+
### Script Not Found
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
# Ensure package is installed
|
|
450
|
+
npm list myaidev-method
|
|
451
|
+
|
|
452
|
+
# Reinstall if needed
|
|
453
|
+
npm install myaidev-method
|
|
454
|
+
|
|
455
|
+
# Run from project root
|
|
456
|
+
npm run wordpress:health-check
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Contributing
|
|
462
|
+
|
|
463
|
+
To add new WordPress admin utilities:
|
|
464
|
+
|
|
465
|
+
1. Add functions to `src/lib/wordpress-admin-utils.js`
|
|
466
|
+
2. Create script in `src/scripts/wordpress-*.js`
|
|
467
|
+
3. Add npm script to `package.json`
|
|
468
|
+
4. Update this documentation
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## License
|
|
473
|
+
|
|
474
|
+
MIT - See LICENSE file for details
|
package/bin/cli.js
CHANGED
|
@@ -99,10 +99,12 @@ async function setupClaude(projectDir) {
|
|
|
99
99
|
const claudeDir = path.join(projectDir, '.claude');
|
|
100
100
|
const commandsDir = path.join(claudeDir, 'commands');
|
|
101
101
|
const agentsDir = path.join(claudeDir, 'agents');
|
|
102
|
+
const mcpDir = path.join(claudeDir, 'mcp');
|
|
102
103
|
|
|
103
104
|
// Ensure directories exist
|
|
104
105
|
await fs.ensureDir(commandsDir);
|
|
105
106
|
await fs.ensureDir(agentsDir);
|
|
107
|
+
await fs.ensureDir(mcpDir);
|
|
106
108
|
|
|
107
109
|
// Copy command markdown files
|
|
108
110
|
const templateCommandsDir = path.join(__dirname, '..', 'src', 'templates', 'claude', 'commands');
|
|
@@ -132,6 +134,20 @@ async function setupClaude(projectDir) {
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
|
|
137
|
+
// Copy MCP server files
|
|
138
|
+
const templateMcpDir = path.join(__dirname, '..', '.claude', 'mcp');
|
|
139
|
+
if (await fs.pathExists(templateMcpDir)) {
|
|
140
|
+
const mcpFiles = await fs.readdir(templateMcpDir);
|
|
141
|
+
for (const file of mcpFiles) {
|
|
142
|
+
if (file.endsWith('.js') || file.endsWith('.json')) {
|
|
143
|
+
await fs.copy(
|
|
144
|
+
path.join(templateMcpDir, file),
|
|
145
|
+
path.join(mcpDir, file)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
135
151
|
// Create CLAUDE.md configuration file
|
|
136
152
|
const claudeMd = `# Claude Code Configuration
|
|
137
153
|
|
|
@@ -197,28 +213,7 @@ DEFAULT_TONE=professional
|
|
|
197
213
|
|
|
198
214
|
await fs.writeFile(path.join(projectDir, '.env.example'), envExample);
|
|
199
215
|
|
|
200
|
-
//
|
|
201
|
-
const mcpDir = path.join(claudeDir, 'mcp');
|
|
202
|
-
await fs.ensureDir(mcpDir);
|
|
203
|
-
|
|
204
|
-
const wordpressMcpServer = path.join(__dirname, '..', '.claude', 'mcp', 'wordpress-server.js');
|
|
205
|
-
if (await fs.pathExists(wordpressMcpServer)) {
|
|
206
|
-
await fs.copy(wordpressMcpServer, path.join(mcpDir, 'wordpress-server.js'));
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// Copy Gutenberg converter
|
|
210
|
-
const gutenbergConverter = path.join(__dirname, '..', '.claude', 'mcp', 'gutenberg-converter.js');
|
|
211
|
-
if (await fs.pathExists(gutenbergConverter)) {
|
|
212
|
-
await fs.copy(gutenbergConverter, path.join(mcpDir, 'gutenberg-converter.js'));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// Copy scripts directory
|
|
216
|
-
const scriptsTemplateDir = path.join(__dirname, '..', 'src', 'templates', 'scripts');
|
|
217
|
-
const scriptsDestDir = path.join(projectDir, 'scripts');
|
|
218
|
-
|
|
219
|
-
if (await fs.pathExists(scriptsTemplateDir)) {
|
|
220
|
-
await fs.copy(scriptsTemplateDir, scriptsDestDir);
|
|
221
|
-
}
|
|
216
|
+
// Note: MCP integration disabled for now - using native tools for WordPress REST API
|
|
222
217
|
|
|
223
218
|
// Copy USER_GUIDE.md - Essential for users to understand customization
|
|
224
219
|
const userGuide = path.join(__dirname, '..', 'USER_GUIDE.md');
|