myaidev-method 0.0.8 → 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/COOLIFY_DEPLOYMENT.md +750 -0
- package/README.md +2 -2
- package/WORDPRESS_ADMIN_SCRIPTS.md +474 -0
- package/package.json +14 -3
- 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/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/commands/myai-coolify-deploy.md +172 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myai-coolify-deploy
|
|
3
|
+
description: Deploy applications to Coolify - infrastructure management and deployment automation
|
|
4
|
+
tools: Read, Write, Edit, Bash, Task, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Launch the Coolify deployment specialist agent for application deployment and infrastructure management.
|
|
8
|
+
|
|
9
|
+
## Task
|
|
10
|
+
Execute Coolify deployment operations based on the specified action: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
## Available Operations
|
|
13
|
+
|
|
14
|
+
### Quick Deploy Commands
|
|
15
|
+
- `deploy <app-name>` - Deploy application by name or from current directory
|
|
16
|
+
- `status` - Check Coolify system status and connectivity
|
|
17
|
+
- `list <resource-type>` - List servers, projects, applications, databases
|
|
18
|
+
- `logs <app-name>` - View application deployment logs
|
|
19
|
+
- `restart <app-name>` - Restart an application
|
|
20
|
+
- `env <app-name>` - Manage environment variables
|
|
21
|
+
|
|
22
|
+
### Detailed Deploy Commands
|
|
23
|
+
- `deploy --repo <url> --name <name> --server <uuid>` - Deploy with specific configuration
|
|
24
|
+
- `deploy --dockerfile --port 8080 --domain app.example.com` - Deploy Docker app
|
|
25
|
+
- `deploy-database --type postgresql --name mydb` - Deploy database
|
|
26
|
+
- `deploy-stack --config stack.json` - Deploy multi-component stack
|
|
27
|
+
|
|
28
|
+
## Usage Examples
|
|
29
|
+
|
|
30
|
+
### Quick Deployments
|
|
31
|
+
```
|
|
32
|
+
/myai-coolify-deploy status
|
|
33
|
+
/myai-coolify-deploy list servers
|
|
34
|
+
/myai-coolify-deploy deploy my-nextjs-app
|
|
35
|
+
/myai-coolify-deploy logs my-app
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Advanced Deployments
|
|
39
|
+
```
|
|
40
|
+
/myai-coolify-deploy deploy --repo https://github.com/user/app --name api-server
|
|
41
|
+
/myai-coolify-deploy deploy --dockerfile --port 3000 --domain api.example.com
|
|
42
|
+
/myai-coolify-deploy deploy-database --type postgresql --version 16
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Environment Management
|
|
46
|
+
```
|
|
47
|
+
/myai-coolify-deploy env my-app --set API_KEY=secret123
|
|
48
|
+
/myai-coolify-deploy env my-app --file .env.production
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Monitoring & Management
|
|
52
|
+
```
|
|
53
|
+
/myai-coolify-deploy list applications --detailed
|
|
54
|
+
/myai-coolify-deploy restart my-app
|
|
55
|
+
/myai-coolify-deploy logs my-app --follow
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Process Flow
|
|
59
|
+
|
|
60
|
+
1. **Parse Arguments**
|
|
61
|
+
- Extract operation type from $ARGUMENTS
|
|
62
|
+
- Identify deployment target and configuration
|
|
63
|
+
- Validate required parameters
|
|
64
|
+
|
|
65
|
+
2. **Verify Connectivity**
|
|
66
|
+
- Check Coolify API accessibility
|
|
67
|
+
- Validate credentials from `.env`
|
|
68
|
+
- Confirm target server availability
|
|
69
|
+
|
|
70
|
+
3. **Execute Operation**
|
|
71
|
+
- Load coolify-deploy agent
|
|
72
|
+
- Run appropriate deployment script
|
|
73
|
+
- Monitor progress and handle errors
|
|
74
|
+
|
|
75
|
+
4. **Report Results**
|
|
76
|
+
- Provide deployment URL and status
|
|
77
|
+
- Show relevant logs if deployment fails
|
|
78
|
+
- Suggest next steps or troubleshooting
|
|
79
|
+
|
|
80
|
+
## Agent Integration
|
|
81
|
+
|
|
82
|
+
This command loads the `coolify-deploy` agent which is optimized for:
|
|
83
|
+
- **Lightweight operations** - Direct script execution for speed
|
|
84
|
+
- **Extended thinking** - Complex deployment planning with "think" triggers
|
|
85
|
+
- **Subagent delegation** - Parallel deployments for multi-component apps
|
|
86
|
+
- **Security** - Permission-scoped operations with credential safety
|
|
87
|
+
|
|
88
|
+
## Required Environment Variables
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
COOLIFY_URL=https://coolify.myai1.ai
|
|
92
|
+
COOLIFY_API_KEY=your_api_key_here
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Create API token in Coolify: Settings → Keys & Tokens → Create API Token
|
|
96
|
+
|
|
97
|
+
## Examples with Context
|
|
98
|
+
|
|
99
|
+
### Example 1: Deploy Current Directory
|
|
100
|
+
```bash
|
|
101
|
+
# User has Next.js app in current directory
|
|
102
|
+
/myai-coolify-deploy deploy .
|
|
103
|
+
|
|
104
|
+
# Agent workflow:
|
|
105
|
+
# 1. Detects Next.js app (reads package.json)
|
|
106
|
+
# 2. Lists available servers
|
|
107
|
+
# 3. Prompts for server selection
|
|
108
|
+
# 4. Deploys with Nixpacks
|
|
109
|
+
# 5. Provides deployment URL
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Example 2: Deploy with GitHub Repo
|
|
113
|
+
```bash
|
|
114
|
+
/myai-coolify-deploy deploy --repo https://github.com/user/api --name api-prod
|
|
115
|
+
|
|
116
|
+
# Agent workflow:
|
|
117
|
+
# 1. Validates repository accessibility
|
|
118
|
+
# 2. Selects optimal server
|
|
119
|
+
# 3. Creates Coolify application
|
|
120
|
+
# 4. Triggers deployment
|
|
121
|
+
# 5. Monitors until complete
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Example 3: Deploy Full Stack
|
|
125
|
+
```bash
|
|
126
|
+
/myai-coolify-deploy deploy-stack
|
|
127
|
+
|
|
128
|
+
# Agent workflow:
|
|
129
|
+
# 1. Reads stack configuration (stack.json or prompts)
|
|
130
|
+
# 2. Uses Task tool to parallelize:
|
|
131
|
+
# - Deploy PostgreSQL database
|
|
132
|
+
# - Deploy Redis cache
|
|
133
|
+
# - Deploy API backend
|
|
134
|
+
# - Deploy frontend
|
|
135
|
+
# 3. Configures connections between components
|
|
136
|
+
# 4. Runs health checks
|
|
137
|
+
# 5. Reports complete stack status
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Safety Features
|
|
141
|
+
|
|
142
|
+
- **Confirmation gates** - Prompts for production deployments
|
|
143
|
+
- **Rollback support** - Can revert failed deployments
|
|
144
|
+
- **Credential safety** - API keys never logged or exposed
|
|
145
|
+
- **Resource validation** - Verifies server capacity before deployment
|
|
146
|
+
- **Error recovery** - Auto-retry with exponential backoff
|
|
147
|
+
|
|
148
|
+
## Output Format
|
|
149
|
+
|
|
150
|
+
The agent provides structured output:
|
|
151
|
+
- **Status updates**: Real-time deployment progress
|
|
152
|
+
- **Success confirmation**: Deployment URL and access info
|
|
153
|
+
- **Error details**: Clear error messages with troubleshooting steps
|
|
154
|
+
- **Next actions**: Suggested follow-up commands
|
|
155
|
+
|
|
156
|
+
## Integration with Other Agents
|
|
157
|
+
|
|
158
|
+
Works seamlessly with:
|
|
159
|
+
- **content-writer** - Deploy WordPress for published content
|
|
160
|
+
- **wordpress-admin** - Manage deployed WordPress instances
|
|
161
|
+
- Custom agents for CI/CD pipeline integration
|
|
162
|
+
|
|
163
|
+
## Performance Notes
|
|
164
|
+
|
|
165
|
+
- Typical deployment: 2-5 minutes (depends on build complexity)
|
|
166
|
+
- Script execution: <1 second for status/list operations
|
|
167
|
+
- Agent initialization: <3k tokens (lightweight pattern)
|
|
168
|
+
- Extended thinking available for complex decisions
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
Always run `/myai-coolify-deploy status` first to verify connectivity before deployment operations.
|