myaidev-method 0.2.10 → 0.2.12
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/CHANGELOG.md +164 -0
- package/README.md +25 -0
- package/USER_GUIDE.md +156 -0
- package/bin/cli.js +268 -15
- package/package.json +3 -2
- package/src/lib/update-manager.js +385 -0
- package/src/templates/claude/agents/coolify-deploy.md +50 -50
- package/src/templates/claude/agents/payloadcms-publish.md +2 -2
|
@@ -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
|