myaidev-method 0.2.10 → 0.2.11
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
CHANGED
|
@@ -111,10 +111,10 @@ program
|
|
|
111
111
|
console.log(chalk.gray(' • COOLIFY_DEPLOYMENT.md - Application deployment'));
|
|
112
112
|
console.log(chalk.gray(' • WORDPRESS_ADMIN_SCRIPTS.md - WordPress utilities'));
|
|
113
113
|
|
|
114
|
-
console.log(chalk.magenta('\n🛠️ Scripts and Utilities
|
|
115
|
-
console.log(chalk.gray(' •
|
|
116
|
-
console.log(chalk.gray(' •
|
|
117
|
-
console.log(chalk.gray(' •
|
|
114
|
+
console.log(chalk.magenta('\n🛠️ Scripts and Utilities Installed:'));
|
|
115
|
+
console.log(chalk.gray(' • .myaidev-method/scripts/ - Publishing and deployment scripts'));
|
|
116
|
+
console.log(chalk.gray(' • .myaidev-method/lib/ - Utility libraries and helpers'));
|
|
117
|
+
console.log(chalk.gray(' • Installing script dependencies... (this may take a moment)'));
|
|
118
118
|
|
|
119
119
|
console.log(chalk.magenta('\n🔧 MCP Server Integration (Optional Advanced Features):'));
|
|
120
120
|
console.log(chalk.gray(' • SPARC Orchestrator: Workflow automation with MCP tools'));
|
|
@@ -285,21 +285,28 @@ COOLIFY_API_KEY=your-api-key
|
|
|
285
285
|
- All custom commands are in \`.claude/commands/\`
|
|
286
286
|
- All agents are in \`.claude/agents/\`
|
|
287
287
|
- Commands and agents use Markdown format with YAML frontmatter
|
|
288
|
-
- Executable scripts are in
|
|
288
|
+
- Executable scripts and utilities are in \`.myaidev-method/scripts/\` and \`.myaidev-method/lib/\`
|
|
289
289
|
|
|
290
290
|
## Scripts and Utilities
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
Agents can invoke these scripts using the Bash tool:
|
|
292
|
+
The \`.myaidev-method/\` directory contains self-contained scripts and utilities:
|
|
294
293
|
|
|
295
294
|
\`\`\`bash
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
295
|
+
.myaidev-method/
|
|
296
|
+
├── scripts/ # Executable publishing and deployment scripts
|
|
297
|
+
├── lib/ # Utility libraries (PayloadCMSUtils, etc.)
|
|
298
|
+
├── node_modules/ # Script dependencies (installed automatically)
|
|
299
|
+
└── package.json # Dependency manifest
|
|
300
|
+
\`\`\`
|
|
301
|
+
|
|
302
|
+
**Agents can invoke scripts directly using the Bash tool**:
|
|
300
303
|
|
|
301
|
-
|
|
302
|
-
|
|
304
|
+
\`\`\`bash
|
|
305
|
+
# Publishing scripts
|
|
306
|
+
node .myaidev-method/scripts/payloadcms-publish.js "article.md" --status published
|
|
307
|
+
node .myaidev-method/scripts/wordpress-health-check.js
|
|
308
|
+
node .myaidev-method/scripts/docusaurus-publish.js "guide.md" --category tutorials
|
|
309
|
+
node .myaidev-method/scripts/coolify-deploy-app.js --name myapp
|
|
303
310
|
\`\`\`
|
|
304
311
|
|
|
305
312
|
**Available Scripts**:
|
|
@@ -312,6 +319,14 @@ npx myaidev-method [script-name]
|
|
|
312
319
|
- \`wordpress-security-scan.js\` - WordPress security scan
|
|
313
320
|
- \`wordpress-performance-check.js\` - WordPress performance analysis
|
|
314
321
|
|
|
322
|
+
**Note**: The \`.myaidev-method/\` directory includes its own \`node_modules/\` with all required dependencies.
|
|
323
|
+
To update dependencies, run \`npm install\` inside the \`.myaidev-method/\` directory.
|
|
324
|
+
|
|
325
|
+
**Git Ignore**: Add to your \`.gitignore\`:
|
|
326
|
+
\`\`\`
|
|
327
|
+
.myaidev-method/node_modules/
|
|
328
|
+
\`\`\`
|
|
329
|
+
|
|
315
330
|
## Notes
|
|
316
331
|
|
|
317
332
|
This configuration follows Claude Code's official standards for custom commands and agents.
|
|
@@ -325,8 +340,70 @@ This configuration follows Claude Code's official standards for custom commands
|
|
|
325
340
|
await fs.copy(sourceEnvExample, path.join(projectDir, '.env.example'));
|
|
326
341
|
}
|
|
327
342
|
|
|
328
|
-
//
|
|
329
|
-
//
|
|
343
|
+
// Create .myaidev-method directory for scripts and utilities
|
|
344
|
+
// This allows agents to access publishing/deployment scripts in non-Node.js projects
|
|
345
|
+
const myaidevDir = path.join(projectDir, '.myaidev-method');
|
|
346
|
+
const scriptsDir = path.join(myaidevDir, 'scripts');
|
|
347
|
+
const libDir = path.join(myaidevDir, 'lib');
|
|
348
|
+
|
|
349
|
+
await fs.ensureDir(scriptsDir);
|
|
350
|
+
await fs.ensureDir(libDir);
|
|
351
|
+
|
|
352
|
+
// Copy all executable scripts
|
|
353
|
+
const sourceScriptsDir = path.join(__dirname, '..', 'src', 'scripts');
|
|
354
|
+
if (await fs.pathExists(sourceScriptsDir)) {
|
|
355
|
+
const scriptFiles = await fs.readdir(sourceScriptsDir);
|
|
356
|
+
for (const file of scriptFiles) {
|
|
357
|
+
if (file.endsWith('.js') && file !== 'init-project.js') { // Skip init script
|
|
358
|
+
await fs.copy(
|
|
359
|
+
path.join(sourceScriptsDir, file),
|
|
360
|
+
path.join(scriptsDir, file)
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// Copy all utility libraries
|
|
367
|
+
const sourceLibDir = path.join(__dirname, '..', 'src', 'lib');
|
|
368
|
+
if (await fs.pathExists(sourceLibDir)) {
|
|
369
|
+
await fs.copy(sourceLibDir, libDir);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Copy package.json and install dependencies in .myaidev-method
|
|
373
|
+
// This ensures scripts have access to required npm packages
|
|
374
|
+
const packageJson = {
|
|
375
|
+
"name": "myaidev-method-scripts",
|
|
376
|
+
"version": "1.0.0",
|
|
377
|
+
"type": "module",
|
|
378
|
+
"private": true,
|
|
379
|
+
"dependencies": {
|
|
380
|
+
"node-fetch": "^3.3.2",
|
|
381
|
+
"marked": "^11.0.0",
|
|
382
|
+
"gray-matter": "^4.0.3",
|
|
383
|
+
"dotenv": "^16.4.1",
|
|
384
|
+
"chalk": "^5.3.0",
|
|
385
|
+
"ora": "^8.0.1"
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
await fs.writeFile(
|
|
390
|
+
path.join(myaidevDir, 'package.json'),
|
|
391
|
+
JSON.stringify(packageJson, null, 2)
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
// Install dependencies in .myaidev-method directory
|
|
395
|
+
console.log(chalk.gray('\n Installing script dependencies...'));
|
|
396
|
+
const { execSync } = await import('child_process');
|
|
397
|
+
try {
|
|
398
|
+
execSync('npm install', {
|
|
399
|
+
cwd: myaidevDir,
|
|
400
|
+
stdio: 'inherit'
|
|
401
|
+
});
|
|
402
|
+
console.log(chalk.green(' ✓ Dependencies installed successfully'));
|
|
403
|
+
} catch (error) {
|
|
404
|
+
console.log(chalk.yellow(' ⚠ Failed to install dependencies automatically'));
|
|
405
|
+
console.log(chalk.gray(' Run: cd .myaidev-method && npm install'));
|
|
406
|
+
}
|
|
330
407
|
|
|
331
408
|
// Note: MCP integration disabled for now - using native tools for WordPress REST API
|
|
332
409
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myaidev-method",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "Comprehensive development framework with SPARC methodology for AI-assisted software development, multi-platform publishing (WordPress, PayloadCMS, Astro, Docusaurus, Mintlify), and Coolify deployment",
|
|
5
5
|
"mcpName": "io.github.myaione/myaidev-method",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -25,7 +25,7 @@ COOLIFY_API_KEY=your_api_key_here
|
|
|
25
25
|
|
|
26
26
|
Verify configuration:
|
|
27
27
|
```bash
|
|
28
|
-
node
|
|
28
|
+
node .myaidev-method/scripts/coolify-status.js
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Operational Patterns (Claude Code 2.0)
|
|
@@ -37,10 +37,10 @@ node node_modules/myaidev-method/src/scripts/coolify-status.js
|
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
# Deploy application
|
|
40
|
-
node
|
|
40
|
+
node .myaidev-method/scripts/coolify-deploy-app.js --name myapp --repo https://github.com/user/repo
|
|
41
41
|
|
|
42
42
|
# Check status
|
|
43
|
-
node
|
|
43
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type applications
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### Pattern 2: Extended Thinking
|
|
@@ -69,13 +69,13 @@ Main agent → Deploy subagent (App A) → Verify subagent
|
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
71
|
# Step 1: Verify Coolify connectivity
|
|
72
|
-
node
|
|
72
|
+
node .myaidev-method/scripts/coolify-status.js
|
|
73
73
|
|
|
74
74
|
# Step 2: List available servers
|
|
75
|
-
node
|
|
75
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type servers
|
|
76
76
|
|
|
77
77
|
# Step 3: Deploy application
|
|
78
|
-
node
|
|
78
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
79
79
|
--name "myapp" \
|
|
80
80
|
--repo "https://github.com/user/myapp" \
|
|
81
81
|
--branch "main" \
|
|
@@ -86,7 +86,7 @@ node node_modules/myaidev-method/src/scripts/coolify-deploy-app.js \
|
|
|
86
86
|
--domain "myapp.example.com"
|
|
87
87
|
|
|
88
88
|
# Step 4: Monitor deployment
|
|
89
|
-
node
|
|
89
|
+
node .myaidev-method/scripts/coolify-watch-deployment.js --uuid "app-uuid"
|
|
90
90
|
|
|
91
91
|
# Step 5: Verify deployment
|
|
92
92
|
curl https://myapp.example.com
|
|
@@ -118,14 +118,14 @@ curl https://myapp.example.com
|
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
120
|
# Deploy to staging
|
|
121
|
-
node
|
|
121
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
122
122
|
--name "myapp-staging" \
|
|
123
123
|
--branch "develop" \
|
|
124
124
|
--env-file ".env.staging"
|
|
125
125
|
|
|
126
126
|
# Deploy to production (with approval gate)
|
|
127
127
|
# Agent prompts: "Ready to deploy to production? (y/n)"
|
|
128
|
-
node
|
|
128
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
129
129
|
--name "myapp-prod" \
|
|
130
130
|
--branch "main" \
|
|
131
131
|
--env-file ".env.production"
|
|
@@ -139,23 +139,23 @@ All scripts use credentials from `.env` automatically:
|
|
|
139
139
|
|
|
140
140
|
```bash
|
|
141
141
|
# Resource Management
|
|
142
|
-
node
|
|
143
|
-
node
|
|
144
|
-
node
|
|
142
|
+
node .myaidev-method/scripts/coolify-list-resources.js [--type servers|projects|applications|databases]
|
|
143
|
+
node .myaidev-method/scripts/coolify-status.js
|
|
144
|
+
node .myaidev-method/scripts/coolify-server-info.js --uuid <server-uuid>
|
|
145
145
|
|
|
146
146
|
# Application Deployment
|
|
147
|
-
node
|
|
148
|
-
node
|
|
149
|
-
node
|
|
150
|
-
node
|
|
147
|
+
node .myaidev-method/scripts/coolify-deploy-app.js [options]
|
|
148
|
+
node .myaidev-method/scripts/coolify-watch-deployment.js --uuid <app-uuid>
|
|
149
|
+
node .myaidev-method/scripts/coolify-restart-app.js --uuid <app-uuid>
|
|
150
|
+
node .myaidev-method/scripts/coolify-stop-app.js --uuid <app-uuid>
|
|
151
151
|
|
|
152
152
|
# Environment Variables
|
|
153
|
-
node
|
|
154
|
-
node
|
|
153
|
+
node .myaidev-method/scripts/coolify-set-env.js --uuid <app-uuid> --file .env.production
|
|
154
|
+
node .myaidev-method/scripts/coolify-get-env.js --uuid <app-uuid>
|
|
155
155
|
|
|
156
156
|
# Logs & Debugging
|
|
157
|
-
node
|
|
158
|
-
node
|
|
157
|
+
node .myaidev-method/scripts/coolify-logs.js --uuid <app-uuid> [--follow]
|
|
158
|
+
node .myaidev-method/scripts/coolify-deployment-report.js --uuid <app-uuid>
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
### Using Coolify Utils Library
|
|
@@ -249,7 +249,7 @@ const result = await coolify.waitForDeployment(uuid, {
|
|
|
249
249
|
**Issue: API Authentication Failed**
|
|
250
250
|
```bash
|
|
251
251
|
# Verify API key
|
|
252
|
-
node
|
|
252
|
+
node .myaidev-method/scripts/coolify-status.js
|
|
253
253
|
|
|
254
254
|
# Check .env file
|
|
255
255
|
cat .env | grep COOLIFY
|
|
@@ -261,47 +261,47 @@ curl -H "Authorization: Bearer $COOLIFY_API_KEY" https://coolify.myai1.ai/api/v1
|
|
|
261
261
|
**Issue: Deployment Stuck or Failed**
|
|
262
262
|
```bash
|
|
263
263
|
# Check deployment logs
|
|
264
|
-
node
|
|
264
|
+
node .myaidev-method/scripts/coolify-logs.js --uuid <app-uuid>
|
|
265
265
|
|
|
266
266
|
# Get deployment status
|
|
267
|
-
node
|
|
267
|
+
node .myaidev-method/scripts/coolify-deployment-report.js --uuid <app-uuid>
|
|
268
268
|
|
|
269
269
|
# Restart application
|
|
270
|
-
node
|
|
270
|
+
node .myaidev-method/scripts/coolify-restart-app.js --uuid <app-uuid>
|
|
271
271
|
```
|
|
272
272
|
|
|
273
273
|
**Issue: Application Not Accessible**
|
|
274
274
|
```bash
|
|
275
275
|
# Verify domains configured
|
|
276
|
-
node
|
|
276
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type applications | grep -A 5 "myapp"
|
|
277
277
|
|
|
278
278
|
# Check server status
|
|
279
|
-
node
|
|
279
|
+
node .myaidev-method/scripts/coolify-server-info.js --uuid <server-uuid>
|
|
280
280
|
|
|
281
281
|
# Verify application running
|
|
282
|
-
node
|
|
282
|
+
node .myaidev-method/scripts/coolify-logs.js --uuid <app-uuid> --tail 50
|
|
283
283
|
```
|
|
284
284
|
|
|
285
285
|
### Diagnostic Workflow
|
|
286
286
|
|
|
287
287
|
1. **Check System Status**
|
|
288
288
|
```bash
|
|
289
|
-
node
|
|
289
|
+
node .myaidev-method/scripts/coolify-status.js
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
2. **Verify Application State**
|
|
293
293
|
```bash
|
|
294
|
-
node
|
|
294
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type applications
|
|
295
295
|
```
|
|
296
296
|
|
|
297
297
|
3. **Analyze Logs**
|
|
298
298
|
```bash
|
|
299
|
-
node
|
|
299
|
+
node .myaidev-method/scripts/coolify-logs.js --uuid <uuid> --follow
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
4. **Generate Deployment Report**
|
|
303
303
|
```bash
|
|
304
|
-
node
|
|
304
|
+
node .myaidev-method/scripts/coolify-deployment-report.js --uuid <uuid> --output report.json
|
|
305
305
|
```
|
|
306
306
|
|
|
307
307
|
## Security Best Practices
|
|
@@ -349,7 +349,7 @@ fi
|
|
|
349
349
|
/myai-content-writer "10 Tips for Productivity"
|
|
350
350
|
|
|
351
351
|
# Coolify-deploy agent deploys WordPress if needed
|
|
352
|
-
node
|
|
352
|
+
node .myaidev-method/scripts/coolify-deploy-app.js --name wordpress --template wordpress
|
|
353
353
|
|
|
354
354
|
# WordPress-admin agent publishes content
|
|
355
355
|
/myai-wordpress-publish content.md
|
|
@@ -370,7 +370,7 @@ node node_modules/myaidev-method/src/scripts/coolify-deploy-app.js --name wordpr
|
|
|
370
370
|
|
|
371
371
|
```bash
|
|
372
372
|
# List servers with metrics
|
|
373
|
-
node
|
|
373
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type servers --detailed
|
|
374
374
|
|
|
375
375
|
# Agent analyzes:
|
|
376
376
|
# - Server load
|
|
@@ -397,7 +397,7 @@ node node_modules/myaidev-method/src/scripts/coolify-list-resources.js --type se
|
|
|
397
397
|
|
|
398
398
|
```bash
|
|
399
399
|
# Real-time deployment monitoring
|
|
400
|
-
node
|
|
400
|
+
node .myaidev-method/scripts/coolify-watch-deployment.js --uuid <uuid>
|
|
401
401
|
|
|
402
402
|
# Output:
|
|
403
403
|
# [12:00:00] 🚀 Deployment started
|
|
@@ -411,7 +411,7 @@ node node_modules/myaidev-method/src/scripts/coolify-watch-deployment.js --uuid
|
|
|
411
411
|
|
|
412
412
|
```bash
|
|
413
413
|
# System-wide health check
|
|
414
|
-
node
|
|
414
|
+
node .myaidev-method/scripts/coolify-status.js --comprehensive
|
|
415
415
|
|
|
416
416
|
# Per-application health check
|
|
417
417
|
curl -I https://myapp.example.com/health
|
|
@@ -426,13 +426,13 @@ curl -I https://myapp.example.com/health
|
|
|
426
426
|
**Agent workflow**:
|
|
427
427
|
```bash
|
|
428
428
|
# 1. Verify connectivity
|
|
429
|
-
node
|
|
429
|
+
node .myaidev-method/scripts/coolify-status.js
|
|
430
430
|
|
|
431
431
|
# 2. List available servers
|
|
432
|
-
node
|
|
432
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type servers
|
|
433
433
|
|
|
434
434
|
# 3. Deploy application
|
|
435
|
-
node
|
|
435
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
436
436
|
--name "nextjs-app" \
|
|
437
437
|
--repo "https://github.com/user/nextjs-app" \
|
|
438
438
|
--branch "main" \
|
|
@@ -442,7 +442,7 @@ node node_modules/myaidev-method/src/scripts/coolify-deploy-app.js \
|
|
|
442
442
|
--server-uuid "ho4k04okko0wks8g0gsccww4"
|
|
443
443
|
|
|
444
444
|
# 4. Watch deployment
|
|
445
|
-
node
|
|
445
|
+
node .myaidev-method/scripts/coolify-watch-deployment.js --uuid "<new-app-uuid>"
|
|
446
446
|
```
|
|
447
447
|
|
|
448
448
|
### Example 2: Update Environment Variables
|
|
@@ -452,16 +452,16 @@ node node_modules/myaidev-method/src/scripts/coolify-watch-deployment.js --uuid
|
|
|
452
452
|
**Agent workflow**:
|
|
453
453
|
```bash
|
|
454
454
|
# 1. Find application
|
|
455
|
-
node
|
|
455
|
+
node .myaidev-method/scripts/coolify-list-resources.js --type applications | grep myapp
|
|
456
456
|
|
|
457
457
|
# 2. Update environment variable
|
|
458
|
-
node
|
|
458
|
+
node .myaidev-method/scripts/coolify-set-env.js \
|
|
459
459
|
--uuid "<app-uuid>" \
|
|
460
460
|
--key "API_KEY" \
|
|
461
461
|
--value "<new-api-key>"
|
|
462
462
|
|
|
463
463
|
# 3. Restart application to apply changes
|
|
464
|
-
node
|
|
464
|
+
node .myaidev-method/scripts/coolify-restart-app.js --uuid "<app-uuid>"
|
|
465
465
|
```
|
|
466
466
|
|
|
467
467
|
### Example 3: Deploy Database
|
|
@@ -471,7 +471,7 @@ node node_modules/myaidev-method/src/scripts/coolify-restart-app.js --uuid "<app
|
|
|
471
471
|
**Agent workflow**:
|
|
472
472
|
```bash
|
|
473
473
|
# 1. Create database
|
|
474
|
-
node
|
|
474
|
+
node .myaidev-method/scripts/coolify-create-database.js \
|
|
475
475
|
--name "myapp-db" \
|
|
476
476
|
--type "postgresql" \
|
|
477
477
|
--version "16" \
|
|
@@ -479,10 +479,10 @@ node node_modules/myaidev-method/src/scripts/coolify-create-database.js \
|
|
|
479
479
|
--project-uuid "<project-uuid>"
|
|
480
480
|
|
|
481
481
|
# 2. Get connection string
|
|
482
|
-
node
|
|
482
|
+
node .myaidev-method/scripts/coolify-get-database-connection.js --uuid "<db-uuid>"
|
|
483
483
|
|
|
484
484
|
# 3. Update application with DB connection
|
|
485
|
-
node
|
|
485
|
+
node .myaidev-method/scripts/coolify-set-env.js \
|
|
486
486
|
--uuid "<app-uuid>" \
|
|
487
487
|
--key "DATABASE_URL" \
|
|
488
488
|
--value "<connection-string>"
|
|
@@ -494,21 +494,21 @@ node node_modules/myaidev-method/src/scripts/coolify-set-env.js \
|
|
|
494
494
|
|
|
495
495
|
```bash
|
|
496
496
|
# Deploy to blue environment
|
|
497
|
-
node
|
|
497
|
+
node .myaidev-method/scripts/coolify-deploy-app.js --name "myapp-blue" --branch "release"
|
|
498
498
|
|
|
499
499
|
# Test blue environment
|
|
500
500
|
curl https://blue.myapp.com/health
|
|
501
501
|
|
|
502
502
|
# Switch traffic (update DNS or proxy)
|
|
503
503
|
# Stop green environment
|
|
504
|
-
node
|
|
504
|
+
node .myaidev-method/scripts/coolify-stop-app.js --uuid "<green-uuid>"
|
|
505
505
|
```
|
|
506
506
|
|
|
507
507
|
### Pattern: Canary Deployment
|
|
508
508
|
|
|
509
509
|
```bash
|
|
510
510
|
# Deploy canary version
|
|
511
|
-
node
|
|
511
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
512
512
|
--name "myapp-canary" \
|
|
513
513
|
--branch "canary" \
|
|
514
514
|
--domain "canary.myapp.com"
|
|
@@ -522,12 +522,12 @@ node node_modules/myaidev-method/src/scripts/coolify-deploy-app.js \
|
|
|
522
522
|
|
|
523
523
|
```bash
|
|
524
524
|
# Deploy to US server
|
|
525
|
-
node
|
|
525
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
526
526
|
--name "myapp-us" \
|
|
527
527
|
--server-uuid "<us-server-uuid>"
|
|
528
528
|
|
|
529
529
|
# Deploy to EU server
|
|
530
|
-
node
|
|
530
|
+
node .myaidev-method/scripts/coolify-deploy-app.js \
|
|
531
531
|
--name "myapp-eu" \
|
|
532
532
|
--server-uuid "<eu-server-uuid>"
|
|
533
533
|
|
|
@@ -125,7 +125,7 @@ Agent:
|
|
|
125
125
|
```
|
|
126
126
|
1. Read(markdown_file) → Extract content
|
|
127
127
|
2. Use Bash tool to execute publishing script:
|
|
128
|
-
node
|
|
128
|
+
node .myaidev-method/scripts/payloadcms-publish.js [file] [options]
|
|
129
129
|
3. The script handles:
|
|
130
130
|
- Authentication (JWT token from .env credentials)
|
|
131
131
|
- Markdown to Lexical conversion
|
|
@@ -135,7 +135,7 @@ Agent:
|
|
|
135
135
|
|
|
136
136
|
**Alternative**: Use PayloadCMSUtils library directly if you prefer programmatic control:
|
|
137
137
|
```
|
|
138
|
-
import { PayloadCMSUtils } from '
|
|
138
|
+
import { PayloadCMSUtils } from '.myaidev-method/lib/payloadcms-utils.js'
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
## Configuration Setup
|