myaidev-method 0.0.8 → 0.2.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/.env.example +20 -0
- package/COOLIFY_DEPLOYMENT.md +750 -0
- package/PUBLISHING_GUIDE.md +521 -0
- package/README.md +125 -27
- package/WORDPRESS_ADMIN_SCRIPTS.md +474 -0
- package/package.json +36 -3
- package/src/lib/coolify-utils.js +380 -0
- package/src/lib/payloadcms-utils.js +394 -0
- package/src/lib/report-synthesizer.js +504 -0
- package/src/lib/static-site-utils.js +377 -0
- package/src/lib/wordpress-admin-utils.js +703 -0
- package/src/scripts/astro-publish.js +209 -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/docusaurus-publish.js +209 -0
- package/src/scripts/init-project.js +91 -0
- package/src/scripts/mintlify-publish.js +205 -0
- package/src/scripts/payloadcms-publish.js +202 -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/astro-publish.md +43 -0
- package/src/templates/claude/agents/coolify-deploy.md +563 -0
- package/src/templates/claude/agents/docusaurus-publish.md +42 -0
- package/src/templates/claude/agents/mintlify-publish.md +42 -0
- package/src/templates/claude/agents/payloadcms-publish.md +134 -0
- package/src/templates/claude/commands/myai-astro-publish.md +54 -0
- package/src/templates/claude/commands/myai-coolify-deploy.md +172 -0
- package/src/templates/claude/commands/myai-docusaurus-publish.md +45 -0
- package/src/templates/claude/commands/myai-mintlify-publish.md +45 -0
- package/src/templates/claude/commands/myai-payloadcms-publish.md +45 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: PayloadCMS Publisher
|
|
3
|
+
description: Professional PayloadCMS publishing agent for automated content deployment
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
capabilities:
|
|
6
|
+
- Convert markdown to Lexical rich text
|
|
7
|
+
- Publish to PayloadCMS collections
|
|
8
|
+
- Handle draft and published statuses
|
|
9
|
+
- JWT authentication management
|
|
10
|
+
- Update existing documents
|
|
11
|
+
- Media upload coordination
|
|
12
|
+
agent_type: publishing
|
|
13
|
+
token_target: 2800
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# PayloadCMS Publishing Agent
|
|
17
|
+
|
|
18
|
+
**Purpose**: Convert markdown content to Lexical format and publish to PayloadCMS collections with full authentication and status management.
|
|
19
|
+
|
|
20
|
+
## Core Responsibilities
|
|
21
|
+
|
|
22
|
+
1. **Authentication**: Manage JWT tokens for PayloadCMS API access
|
|
23
|
+
2. **Content Conversion**: Transform markdown to Lexical rich text format
|
|
24
|
+
3. **Publishing**: Create or update documents in PayloadCMS collections
|
|
25
|
+
4. **Status Management**: Handle draft/published workflow states
|
|
26
|
+
5. **Error Recovery**: Provide actionable feedback for publishing issues
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
### Step 1: Configuration Validation
|
|
31
|
+
```
|
|
32
|
+
1. Check PayloadCMS credentials in environment or config
|
|
33
|
+
2. Verify required fields:
|
|
34
|
+
- PAYLOAD_URL: API endpoint
|
|
35
|
+
- PAYLOAD_EMAIL: user email
|
|
36
|
+
- PAYLOAD_PASSWORD: user password
|
|
37
|
+
- PAYLOAD_COLLECTION: default collection name (optional)
|
|
38
|
+
3. If missing → prompt user to run /myai-configure payloadcms
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Authentication
|
|
42
|
+
```
|
|
43
|
+
1. Call authenticatePayload(url, email, password)
|
|
44
|
+
2. Receive JWT token for API requests
|
|
45
|
+
3. Handle auth errors:
|
|
46
|
+
- Invalid credentials → verify config
|
|
47
|
+
- Network errors → check URL accessibility
|
|
48
|
+
- Server errors → verify PayloadCMS instance health
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Step 3: Content Processing
|
|
52
|
+
```
|
|
53
|
+
1. Read markdown file with Read tool
|
|
54
|
+
2. Parse frontmatter for metadata:
|
|
55
|
+
- title, description, status, collection, slug
|
|
56
|
+
3. Convert markdown body to Lexical rich text:
|
|
57
|
+
- markdownToLexical(content)
|
|
58
|
+
4. Prepare document payload with metadata + rich text
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 4: Publishing
|
|
62
|
+
```
|
|
63
|
+
For NEW documents:
|
|
64
|
+
1. POST to /api/{collection}
|
|
65
|
+
2. Include rich text content + metadata
|
|
66
|
+
3. Set status: 'draft' or 'published'
|
|
67
|
+
4. Return document ID and URL
|
|
68
|
+
|
|
69
|
+
For UPDATES (with --id flag):
|
|
70
|
+
1. PATCH to /api/{collection}/{id}
|
|
71
|
+
2. Update content and metadata
|
|
72
|
+
3. Maintain or change status
|
|
73
|
+
4. Return updated document URL
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 5: Verification
|
|
77
|
+
```
|
|
78
|
+
1. Confirm successful API response (200/201)
|
|
79
|
+
2. Extract document ID and slug
|
|
80
|
+
3. Construct preview/admin URL
|
|
81
|
+
4. Report success with access links
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Usage Examples
|
|
85
|
+
|
|
86
|
+
### Publish as Draft (Default Collection)
|
|
87
|
+
```
|
|
88
|
+
User: "Publish article.md to PayloadCMS as draft"
|
|
89
|
+
|
|
90
|
+
Agent:
|
|
91
|
+
1. Read article.md
|
|
92
|
+
2. Authenticate with PayloadCMS
|
|
93
|
+
3. Convert to Lexical format
|
|
94
|
+
4. POST to /api/posts with status: 'draft'
|
|
95
|
+
5. Report: "Published as draft: {admin_url}"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Publish to Production
|
|
99
|
+
```
|
|
100
|
+
User: "Publish article.md to PayloadCMS collection 'articles' as published"
|
|
101
|
+
|
|
102
|
+
Agent:
|
|
103
|
+
1. Process article.md
|
|
104
|
+
2. Authenticate
|
|
105
|
+
3. Convert markdown to Lexical
|
|
106
|
+
4. POST to /api/articles with status: 'published'
|
|
107
|
+
5. Report: "Published live: {public_url}"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Update Existing Document
|
|
111
|
+
```
|
|
112
|
+
User: "Update PayloadCMS document 67890 with updated-article.md"
|
|
113
|
+
|
|
114
|
+
Agent:
|
|
115
|
+
1. Read updated-article.md
|
|
116
|
+
2. Authenticate
|
|
117
|
+
3. Convert to Lexical
|
|
118
|
+
4. PATCH to /api/{collection}/67890
|
|
119
|
+
5. Report: "Updated document: {admin_url}"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Tool Usage Pattern
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
1. Read(markdown_file) → Extract content
|
|
126
|
+
2. authenticatePayload() → Get JWT token
|
|
127
|
+
3. markdownToLexical() → Convert format
|
|
128
|
+
4. publishToPayload() → Create/update document
|
|
129
|
+
5. Report success with URLs
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Configuration Integration
|
|
133
|
+
|
|
134
|
+
Use `/myai-configure` to set up PayloadCMS credentials before publishing.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myai-astro-publish
|
|
3
|
+
description: Publish markdown content to Astro site
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Publish markdown content to Astro static site with content collections support and git workflow.
|
|
7
|
+
|
|
8
|
+
Invoke the Astro publishing agent to transform frontmatter, validate schemas, and deploy via git.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/myai-astro-publish "article.md"
|
|
14
|
+
/myai-astro-publish "post.md" --collection blog
|
|
15
|
+
/myai-astro-publish "page.md" --pages
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
- `--collection <name>` - Target content collection (default: blog)
|
|
21
|
+
- `--pages` - Publish to pages directory instead
|
|
22
|
+
- `--project <path>` - Astro project path
|
|
23
|
+
- `--branch <name>` - Git branch (default: main)
|
|
24
|
+
- `--no-push` - Commit but don't push
|
|
25
|
+
- `--dry-run` - Validate without publishing
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
Astro project with astro.config.mjs and git repository.
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
Publish to content collection:
|
|
34
|
+
```
|
|
35
|
+
/myai-astro-publish "my-article.md" --collection blog
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Publish to pages:
|
|
39
|
+
```
|
|
40
|
+
/myai-astro-publish "about.md" --pages
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Custom project:
|
|
44
|
+
```
|
|
45
|
+
/myai-astro-publish "post.md" --project ~/my-site --branch staging
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Frontmatter Transformation
|
|
49
|
+
|
|
50
|
+
Automatically converts:
|
|
51
|
+
- `date` → `pubDate` (ISO 8601 format)
|
|
52
|
+
- `status: published` → `draft: false`
|
|
53
|
+
- `excerpt` → `description`
|
|
54
|
+
- `image` → `heroImage`
|
|
@@ -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.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myai-docusaurus-publish
|
|
3
|
+
description: Publish markdown content to Docusaurus site
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Publish markdown content to Docusaurus static site generator with automatic git workflow.
|
|
7
|
+
|
|
8
|
+
Invoke the Docusaurus publishing agent to transform content and deploy via git.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/myai-docusaurus-publish "guide.md"
|
|
14
|
+
/myai-docusaurus-publish "post.md" --type blog
|
|
15
|
+
/myai-docusaurus-publish "api.md" --project ./docs-site --branch develop
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
- `--type docs|blog|pages` - Content type (default: docs)
|
|
21
|
+
- `--project <path>` - Docusaurus project path
|
|
22
|
+
- `--branch <name>` - Git branch (default: main)
|
|
23
|
+
- `--no-push` - Commit but don't push
|
|
24
|
+
- `--dry-run` - Validate without publishing
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
Docusaurus project with docusaurus.config.js and git repository.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Publish documentation:
|
|
33
|
+
```
|
|
34
|
+
/myai-docusaurus-publish "getting-started.md"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Publish blog post:
|
|
38
|
+
```
|
|
39
|
+
/myai-docusaurus-publish "my-story.md" --type blog
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Custom project:
|
|
43
|
+
```
|
|
44
|
+
/myai-docusaurus-publish "guide.md" --project ~/my-docs --branch staging
|
|
45
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myai-mintlify-publish
|
|
3
|
+
description: Publish markdown content to Mintlify documentation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Publish markdown/MDX content to Mintlify documentation site with automatic navigation updates.
|
|
7
|
+
|
|
8
|
+
Invoke the Mintlify publishing agent to transform content, update mint.json, and deploy via git.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/myai-mintlify-publish "guide.mdx"
|
|
14
|
+
/myai-mintlify-publish "api-ref.md" --nav-section "API Reference"
|
|
15
|
+
/myai-mintlify-publish "tutorial.md" --project ./docs --branch main
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
- `--nav-section <name>` - Add to navigation section
|
|
21
|
+
- `--project <path>` - Mintlify project path
|
|
22
|
+
- `--branch <name>` - Git branch (default: main)
|
|
23
|
+
- `--no-push` - Commit but don't push
|
|
24
|
+
- `--dry-run` - Validate without publishing
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
Mintlify project with mint.json and git repository.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Basic publish:
|
|
33
|
+
```
|
|
34
|
+
/myai-mintlify-publish "getting-started.mdx"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
With navigation:
|
|
38
|
+
```
|
|
39
|
+
/myai-mintlify-publish "api-users.md" --nav-section "API Reference"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Custom project:
|
|
43
|
+
```
|
|
44
|
+
/myai-mintlify-publish "guide.md" --project ~/docs --branch develop
|
|
45
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: myai-payloadcms-publish
|
|
3
|
+
description: Publish markdown content to PayloadCMS
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Publish markdown content to PayloadCMS headless CMS.
|
|
7
|
+
|
|
8
|
+
Invoke the PayloadCMS publishing agent to convert markdown to Lexical format and publish to your PayloadCMS instance.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/myai-payloadcms-publish "article.md"
|
|
14
|
+
/myai-payloadcms-publish "article.md" --status published
|
|
15
|
+
/myai-payloadcms-publish "article.md" --collection articles --id 12345
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Options
|
|
19
|
+
|
|
20
|
+
- `--status draft|published` - Set publish status (default: draft)
|
|
21
|
+
- `--collection <name>` - Target collection (default: posts)
|
|
22
|
+
- `--id <doc-id>` - Update existing document
|
|
23
|
+
- `--dry-run` - Validate without publishing
|
|
24
|
+
- `--verbose` - Show detailed progress
|
|
25
|
+
|
|
26
|
+
## Prerequisites
|
|
27
|
+
|
|
28
|
+
Configure PayloadCMS credentials: `/myai-configure`
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
Publish as draft:
|
|
33
|
+
```
|
|
34
|
+
/myai-payloadcms-publish "my-article.md"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Publish to production:
|
|
38
|
+
```
|
|
39
|
+
/myai-payloadcms-publish "article.md" --status published --collection blog-posts
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Update existing:
|
|
43
|
+
```
|
|
44
|
+
/myai-payloadcms-publish "updated.md" --id 67890
|
|
45
|
+
```
|