ima-claude 2.16.0 → 2.20.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.
Files changed (41) hide show
  1. package/README.md +16 -1
  2. package/dist/cli.js +9 -1
  3. package/package.json +1 -1
  4. package/plugins/ima-claude/.claude-plugin/plugin.json +2 -2
  5. package/plugins/ima-claude/agents/wp-developer.md +2 -1
  6. package/plugins/ima-claude/hooks/prompt_coach_digest.md +1 -1
  7. package/plugins/ima-claude/skills/agentic-workflows/SKILL.md +133 -0
  8. package/plugins/ima-claude/skills/agentic-workflows/references/phases/deliver.md +181 -0
  9. package/plugins/ima-claude/skills/agentic-workflows/references/phases/draft.md +99 -0
  10. package/plugins/ima-claude/skills/agentic-workflows/references/phases/gather.md +130 -0
  11. package/plugins/ima-claude/skills/agentic-workflows/references/phases/outline.md +106 -0
  12. package/plugins/ima-claude/skills/agentic-workflows/references/phases/review.md +137 -0
  13. package/plugins/ima-claude/skills/agentic-workflows/references/standards/draft-format.md +159 -0
  14. package/plugins/ima-claude/skills/agentic-workflows/references/standards/editorial-standards.md +160 -0
  15. package/plugins/ima-claude/skills/agentic-workflows/references/standards/outline-format.md +110 -0
  16. package/plugins/ima-claude/skills/agentic-workflows/references/templates/avada-construction-guide.md +263 -0
  17. package/plugins/ima-claude/skills/agentic-workflows/references/templates/avada-webinar-example.txt +275 -0
  18. package/plugins/ima-claude/skills/agentic-workflows/references/templates/cta-block-catalog.md +169 -0
  19. package/plugins/ima-claude/skills/agentic-workflows/references/templates/espo-email-preparation.md +241 -0
  20. package/plugins/ima-claude/skills/agentic-workflows/references/templates/webinar-recap-email-espo.html +339 -0
  21. package/plugins/ima-claude/skills/agentic-workflows/references/templates/webinar-reminder-email-espo.html +458 -0
  22. package/plugins/ima-claude/skills/agentic-workflows/references/workflows/editorial/webinar-summary.md +81 -0
  23. package/plugins/ima-claude/skills/design-to-code/SKILL.md +126 -0
  24. package/plugins/ima-claude/skills/design-to-code/references/guardrails.md +46 -0
  25. package/plugins/ima-claude/skills/design-to-code/references/phase-a-design-to-prompt.md +141 -0
  26. package/plugins/ima-claude/skills/design-to-code/references/phase-b-prompt-to-code.md +155 -0
  27. package/plugins/ima-claude/skills/design-to-code/references/prompt-template.md +95 -0
  28. package/plugins/ima-claude/skills/espocrm/SKILL.md +79 -0
  29. package/plugins/ima-claude/skills/espocrm-api/SKILL.md +360 -0
  30. package/plugins/ima-claude/skills/espocrm-api/references/where-operators.md +84 -0
  31. package/plugins/ima-claude/skills/functional-programmer/SKILL.md +15 -0
  32. package/plugins/ima-claude/skills/mcp-atlassian/SKILL.md +94 -14
  33. package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-attachments.md +115 -0
  34. package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-auth.md +103 -0
  35. package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-bulk.md +149 -0
  36. package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-misc.md +195 -0
  37. package/plugins/ima-claude/skills/mcp-atlassian/references/direct-api-sprints.md +158 -0
  38. package/plugins/ima-claude/skills/prompt-starter/SKILL.md +9 -6
  39. package/plugins/ima-claude/skills/wp-ddev/SKILL.md +264 -0
  40. package/plugins/ima-claude/skills/wp-ddev/references/ddev-commands.md +232 -0
  41. package/plugins/ima-claude/skills/wp-ddev/references/wp-cli-reference.md +406 -0
@@ -0,0 +1,158 @@
1
+ # Atlassian Direct API — Sprint & Board Management
2
+
3
+ MCP gap: no Scrum/Kanban board or sprint tools. The Agile API uses a different base path.
4
+
5
+ See [direct-api-auth.md](direct-api-auth.md) for auth setup.
6
+
7
+ All examples use Gateway (Bearer) auth. The Agile API base is:
8
+ ```
9
+ https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0
10
+ ```
11
+
12
+ ---
13
+
14
+ ### List Boards
15
+
16
+ **API:** `GET /rest/agile/1.0/board`
17
+ **When:** Finding the board ID for a project.
18
+
19
+ ```bash
20
+ curl -s \
21
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
22
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/board?projectKeyOrId=PROJ" \
23
+ | jq '.values[] | {id, name, type}'
24
+ ```
25
+
26
+ #### Notes
27
+ - Filter by project with `projectKeyOrId` param
28
+ - `type` is `scrum` or `kanban`
29
+ - Board ID is needed for all subsequent sprint operations
30
+
31
+ ---
32
+
33
+ ### Get Active Sprint
34
+
35
+ **API:** `GET /rest/agile/1.0/board/{boardId}/sprint?state=active`
36
+ **When:** Finding the current sprint to add issues to.
37
+
38
+ ```bash
39
+ curl -s \
40
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
41
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/board/42/sprint?state=active" \
42
+ | jq '.values[] | {id, name, state, startDate, endDate}'
43
+ ```
44
+
45
+ #### Notes
46
+ - `state` filter accepts: `future`, `active`, `closed`
47
+ - Multiple states: `state=active,future`
48
+ - Only Scrum boards have sprints — Kanban boards return empty
49
+
50
+ ---
51
+
52
+ ### Get Issues in a Sprint
53
+
54
+ **API:** `GET /rest/agile/1.0/sprint/{sprintId}/issue`
55
+ **When:** Reviewing what's in a sprint.
56
+
57
+ ```bash
58
+ curl -s \
59
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
60
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/sprint/100/issue?fields=summary,status,assignee" \
61
+ | jq '.issues[] | {key, summary: .fields.summary, status: .fields.status.name}'
62
+ ```
63
+
64
+ #### Notes
65
+ - Use `fields` param to limit response size (same as Jira REST API v3)
66
+ - Supports `jql` param for additional filtering within the sprint
67
+ - Paginated: use `startAt` and `maxResults` for large sprints
68
+
69
+ ---
70
+
71
+ ### Move Issues to a Sprint
72
+
73
+ **API:** `POST /rest/agile/1.0/sprint/{sprintId}/issue`
74
+ **When:** Adding issues to a sprint (sprint planning).
75
+
76
+ ```bash
77
+ curl -s -X POST \
78
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
79
+ -H "Content-Type: application/json" \
80
+ -d '{"issues": ["PROJ-101", "PROJ-102", "PROJ-103"]}' \
81
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/sprint/100/issue"
82
+ ```
83
+
84
+ #### Notes
85
+ - Accepts issue keys or issue IDs
86
+ - Issues are moved from their current sprint (or backlog) to the target sprint
87
+ - No response body on success (HTTP 204)
88
+ - To move to backlog: use `POST /rest/agile/1.0/backlog/issue` with same body
89
+
90
+ ---
91
+
92
+ ### Create a Sprint
93
+
94
+ **API:** `POST /rest/agile/1.0/sprint`
95
+ **When:** Setting up a new sprint.
96
+
97
+ ```bash
98
+ curl -s -X POST \
99
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
100
+ -H "Content-Type: application/json" \
101
+ -d '{
102
+ "name": "Sprint 42",
103
+ "originBoardId": 42,
104
+ "startDate": "2026-04-06T09:00:00.000Z",
105
+ "endDate": "2026-04-20T17:00:00.000Z",
106
+ "goal": "Complete auth migration"
107
+ }' \
108
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/sprint" \
109
+ | jq '{id, name, state}'
110
+ ```
111
+
112
+ #### Notes
113
+ - `originBoardId` is required — use the board ID from "List Boards"
114
+ - Dates are ISO 8601
115
+ - Sprint starts in `future` state
116
+
117
+ ---
118
+
119
+ ### Start or Close a Sprint
120
+
121
+ **API:** `PUT /rest/agile/1.0/sprint/{sprintId}`
122
+ **When:** Starting a planned sprint or closing a completed one.
123
+
124
+ ```bash
125
+ # Start a sprint
126
+ curl -s -X PUT \
127
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
128
+ -H "Content-Type: application/json" \
129
+ -d '{"state": "active"}' \
130
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/sprint/100"
131
+
132
+ # Close a sprint (must specify where incomplete issues go)
133
+ curl -s -X PUT \
134
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
135
+ -H "Content-Type: application/json" \
136
+ -d '{"state": "closed"}' \
137
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/sprint/100"
138
+ ```
139
+
140
+ #### Notes
141
+ - Only one sprint can be `active` per board at a time
142
+ - When closing, incomplete issues move to the backlog by default
143
+ - To move incomplete issues to a specific sprint, close the sprint via the Jira UI (API doesn't support the move-to-sprint parameter natively)
144
+
145
+ ---
146
+
147
+ ### Move Issues to Backlog
148
+
149
+ **API:** `POST /rest/agile/1.0/backlog/issue`
150
+ **When:** Removing issues from a sprint without deleting them.
151
+
152
+ ```bash
153
+ curl -s -X POST \
154
+ -H "Authorization: Bearer $ATLASSIAN_BEARER_TOKEN" \
155
+ -H "Content-Type: application/json" \
156
+ -d '{"issues": ["PROJ-101", "PROJ-102"]}' \
157
+ "https://api.atlassian.com/ex/jira/$ATLASSIAN_CLOUD_ID/rest/agile/1.0/backlog/issue"
158
+ ```
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  name: prompt-starter
3
- description: Zero-friction prompt templates (quick, brainstorm, plan-implement). Selects template, pre-fills from Jira, opens in GUI editor, reads back on close.
3
+ description: Build better prompts from rough ideas. Selects template, pre-fills from Jira, opens in GUI editor, returns refined prompt. Does NOT execute the work — only crafts the prompt.
4
4
  ---
5
5
 
6
6
  # Prompt Starter
7
7
 
8
- Load a structured prompt template, pre-fill it with Jira context, open it in the user's GUI editor, and execute the result when they close the file.
8
+ **You are a prompt builder, not an executor.** Your job is to take a rough idea and produce a well-structured, context-rich prompt. You NEVER execute the work described in the prompt — you only craft and return it.
9
+
10
+ Load a structured prompt template, pre-fill it with Jira context, open it in the user's GUI editor, and return the refined prompt for the user to run.
9
11
 
10
12
  **Trigger words:**
11
13
  - `brainstorm`, `research`, `explore` → `references/brainstorm.md`
@@ -103,12 +105,13 @@ When the background task completes (editor closed), read the file back:
103
105
  Read ~/.claude/prompts/{session-name}.md
104
106
  ```
105
107
 
106
- ### Step 7: Confirm and execute
108
+ ### Step 7: Present the finished prompt — STOP
109
+
110
+ Present the final prompt to the user. Your job is done.
107
111
 
108
- Present the final prompt to the user. Ask for confirmation:
109
- > Here's your prompt. Ready to execute, or want to adjust anything?
112
+ > Here's your refined prompt. You can paste it into a new conversation, adjust it further, or tell me to run it.
110
113
 
111
- On confirmation, treat the prompt content as working instructions and execute accordingly.
114
+ **CRITICAL: Do NOT execute the prompt.** The user decides when and where to run it. If the user explicitly says "run it" or "execute this", only then should you treat it as working instructions. Unsolicited execution defeats the entire purpose of this skill — the value is in the better prompt, not in skipping ahead to the work.
112
115
 
113
116
  ---
114
117
 
@@ -0,0 +1,264 @@
1
+ ---
2
+ name: "wp-ddev"
3
+ description: "Run WordPress WP-CLI commands in DDEV environments. Database queries, plugin management, user ops, themes, cache, cron. Zero config from any DDEV project dir. Supply chain isolated package management. Triggers on: ddev wp, ddev setup, ddev import, wp plugin, wp db, wp user, wp option, wp-cli, DDEV."
4
+ ---
5
+
6
+ # WordPress WP-DDEV
7
+
8
+ Execute WP-CLI commands in DDEV WordPress environments. Zero configuration — just be in a DDEV project directory.
9
+
10
+ ## Quick Start
11
+
12
+ **Prerequisites**: Docker + DDEV v1.25+ installed.
13
+
14
+ ```bash
15
+ # Start your DDEV project
16
+ ddev start
17
+
18
+ # Run WP-CLI commands directly
19
+ ddev wp plugin list
20
+ ddev wp user list
21
+ ddev wp db query "SELECT * FROM wp_posts LIMIT 5"
22
+
23
+ # View project info (URLs, ports, credentials)
24
+ ddev describe
25
+ ```
26
+
27
+ ## How It Works
28
+
29
+ 1. DDEV auto-detects `.ddev/config.yaml` in project directory
30
+ 2. WP-CLI runs inside the web container with correct PHP, MySQL, and WordPress paths
31
+ 3. No environment pollution — host session stays clean
32
+ 4. No UUIDs, no socket paths, no wrapper scripts
33
+
34
+ ## Common Commands
35
+
36
+ ### Database Operations
37
+ `ddev wp db query <sql>` · `ddev wp db export [file]` · `ddev wp db import <file>` · `ddev wp search-replace <old> <new>`
38
+ ```bash
39
+ ddev wp db query "SELECT * FROM wp_users"
40
+ ddev wp db export dump.sql
41
+ ddev wp db import dump.sql
42
+ ddev wp search-replace 'old.com' 'new.com' --dry-run
43
+ ddev wp search-replace 'old.com' 'new.com' --all-tables
44
+ ```
45
+
46
+ ### Plugin Management
47
+ `ddev wp plugin list` · `ddev wp plugin activate <plugin>` · `ddev wp plugin deactivate <plugin>` · `ddev wp plugin install <plugin> [--activate]`
48
+ ```bash
49
+ ddev wp plugin list
50
+ ddev wp plugin list --status=active --format=json
51
+ ddev wp plugin activate my-plugin
52
+ ddev wp plugin deactivate my-plugin
53
+ ddev wp plugin install contact-form-7 --activate
54
+ ddev wp plugin is-installed woocommerce && echo "yes"
55
+ ```
56
+
57
+ ### User Operations
58
+ `ddev wp user list` · `ddev wp user create <login> <email> [--role=<role>]` · `ddev wp user update <user> [--field=value]`
59
+ ```bash
60
+ ddev wp user list
61
+ ddev wp user list --role=administrator --format=table
62
+ ddev wp user create testuser test@example.com --role=editor
63
+ ddev wp user update 1 --display_name="Admin User"
64
+ ddev wp user add-role 2 editor
65
+ ```
66
+
67
+ ### Theme Operations
68
+ `ddev wp theme list` · `ddev wp theme activate <theme>` · `ddev wp theme status <theme>`
69
+ ```bash
70
+ ddev wp theme list
71
+ ddev wp theme activate twentytwentyfour
72
+ ddev wp theme status flavor
73
+ ```
74
+
75
+ ### Cache & Transients
76
+ `ddev wp cache flush` · `ddev wp transient delete --all` · `ddev wp transient get <key>`
77
+ ```bash
78
+ ddev wp cache flush
79
+ ddev wp transient delete --all
80
+ ddev wp transient get my_transient_key
81
+ ddev wp transient list --format=table
82
+ ```
83
+
84
+ ### Options
85
+ `ddev wp option get <key>` · `ddev wp option update <key> <value>` · `ddev wp option list [--search=<pattern>]`
86
+ ```bash
87
+ ddev wp option get siteurl
88
+ ddev wp option update blogname "New Site Name"
89
+ ddev wp option list --search="woocommerce_*" --format=table
90
+ ddev wp option delete my_old_option
91
+ ```
92
+
93
+ ### Post & Content
94
+ `ddev wp post list [--post_type=<type>]` · `ddev wp post create` · `ddev wp post update <id>` · `ddev wp post delete <id>`
95
+ ```bash
96
+ ddev wp post list --post_type=page --format=table
97
+ ddev wp post list --post_status=draft --fields=ID,post_title
98
+ ddev wp post create --post_type=post --post_title="Test" --post_status=publish
99
+ ddev wp post update 42 --post_title="Updated Title"
100
+ ddev wp post delete 42 --force
101
+ ddev wp post meta get 42 _thumbnail_id
102
+ ddev wp post meta update 42 custom_field "new value"
103
+ ```
104
+
105
+ ### Taxonomy & Terms
106
+ `ddev wp term list <taxonomy>` · `ddev wp term create <taxonomy> <term>` · `ddev wp term update <taxonomy> <term-id>`
107
+ ```bash
108
+ ddev wp term list category --format=table
109
+ ddev wp term create category "New Category" --slug=new-category
110
+ ddev wp term update category 5 --name="Renamed"
111
+ ddev wp term delete category 5
112
+ ```
113
+
114
+ ### Menu
115
+ `ddev wp menu list` · `ddev wp menu item list <menu>` · `ddev wp menu item add-post <menu> <post-id>`
116
+ ```bash
117
+ ddev wp menu list --format=table
118
+ ddev wp menu item list primary-menu
119
+ ddev wp menu item add-post primary-menu 42
120
+ ddev wp menu item add-custom primary-menu "Link" https://example.com
121
+ ```
122
+
123
+ ### Rewrite Rules
124
+ `ddev wp rewrite flush` · `ddev wp rewrite list` · `ddev wp rewrite structure <structure>`
125
+ ```bash
126
+ ddev wp rewrite flush
127
+ ddev wp rewrite list --format=csv
128
+ ddev wp rewrite structure '/%postname%/'
129
+ ```
130
+
131
+ ### Scaffold
132
+ `ddev wp scaffold plugin <slug>` · `ddev wp scaffold child-theme <slug>` · `ddev wp scaffold post-type <slug>`
133
+ ```bash
134
+ ddev wp scaffold plugin my-plugin --plugin_name="My Plugin"
135
+ ddev wp scaffold post-type product --plugin=my-plugin
136
+ ddev wp scaffold taxonomy genre --post_types=product --plugin=my-plugin
137
+ ddev wp scaffold child-theme flavor-child --parent_theme=flavor
138
+ ```
139
+
140
+ ### Eval & Shell
141
+ `ddev wp eval <code>` · `ddev wp eval-file <file>`
142
+ ```bash
143
+ ddev wp eval "echo home_url();"
144
+ ddev wp eval "var_dump(wp_get_current_user());"
145
+ ddev wp eval "echo get_option('active_plugins') | print_r;"
146
+ ddev wp eval-file test-script.php
147
+ ```
148
+
149
+ ## DDEV Project Commands
150
+
151
+ ```bash
152
+ # Lifecycle
153
+ ddev start # Start containers
154
+ ddev stop # Stop (preserves database)
155
+ ddev restart # Restart after config changes
156
+
157
+ # Information
158
+ ddev describe # URLs, ports, DB credentials, PHP version
159
+ ddev list # All DDEV projects on this machine
160
+
161
+ # Shell & Exec
162
+ ddev ssh # Interactive shell in web container
163
+ ddev exec ls -la # Run any command in web container
164
+
165
+ # Logs
166
+ ddev logs # Web server logs
167
+ ddev logs -s db # Database server logs
168
+
169
+ # Launch
170
+ ddev launch # Open site in browser
171
+ ddev launch wp-admin/ # Open WP admin
172
+ ```
173
+
174
+ ## IMA Addon Commands
175
+
176
+ Commands provided by the `ima-ddev-wordpress` addon:
177
+
178
+ ```bash
179
+ # First-time bootstrap (idempotent — safe to re-run)
180
+ ddev setup
181
+
182
+ # Import wp-content assets from WPE site archive
183
+ ddev import-assets ~/path/to/extracted-archive
184
+
185
+ # Import database dump
186
+ ddev import-db --file=~/path/to/dump.sql
187
+
188
+ # Update the addon
189
+ ddev add-on update ima-ddev-wordpress
190
+ ```
191
+
192
+ ## Supply Chain Security
193
+
194
+ Always use `ddev npm`, `ddev composer` instead of bare host commands. Container isolation prevents compromised dependencies from accessing host SSH keys, env vars, and other projects.
195
+
196
+ | Instead of | Use | Why |
197
+ |---|---|---|
198
+ | `npm install` | `ddev npm install` | Container-isolated |
199
+ | `composer install` | `ddev composer install` | Container-isolated |
200
+ | `npm run composer:dev` | `ddev npm run composer:dev` | Container-isolated |
201
+
202
+ **Exception:** `npm run deploy` stays on host — needs SSH access for WP Engine push.
203
+
204
+ ## Global Flags
205
+
206
+ These flags work with most WP-CLI commands:
207
+
208
+ | Flag | Description |
209
+ |---|---|
210
+ | `--format=<format>` | Output: `table`, `csv`, `json`, `yaml`, `count`, `ids` |
211
+ | `--fields=<fields>` | Comma-separated columns to display |
212
+ | `--quiet` | Suppress informational messages |
213
+ | `--skip-themes` | Skip loading themes (faster execution) |
214
+ | `--skip-plugins` | Skip loading all plugins (debug conflicts) |
215
+ | `--skip-plugins=<plugin>` | Skip loading specific plugin |
216
+ | `--debug` | Show debug output |
217
+ | `--user=<id\|login>` | Run command as specific user |
218
+
219
+ ## Finding More Commands
220
+
221
+ The 12 categories above cover ~90% of daily dev usage. For everything else:
222
+
223
+ ```bash
224
+ ddev wp help
225
+ ddev wp help plugin
226
+ ddev wp help post list
227
+ ```
228
+
229
+ See [`references/wp-cli-reference.md`](references/wp-cli-reference.md) for a comprehensive reference and [`references/ddev-commands.md`](references/ddev-commands.md) for DDEV-specific commands.
230
+
231
+ ## Daily Workflow
232
+
233
+ ```bash
234
+ # Start your day
235
+ ddev start
236
+
237
+ # Develop — code changes auto-reflected via bind mounts
238
+ # Test
239
+ ddev wp plugin activate my-plugin
240
+ ddev wp cache flush
241
+ ddev launch
242
+
243
+ # Stop when done
244
+ ddev stop
245
+ ```
246
+
247
+ ## Integration
248
+
249
+ **With php-fp-wordpress**: Test plugins during development, verify security functions, check database operations.
250
+
251
+ **With js-fp-wordpress**: Test script enqueuing, verify AJAX endpoints, check jQuery availability.
252
+
253
+ ```bash
254
+ # Develop plugin with php-fp-wordpress patterns, test with DDEV
255
+ ddev wp plugin activate my-new-plugin
256
+ ddev wp eval "var_dump(current_user_can('edit_posts'));"
257
+ ```
258
+
259
+ ## Quality Gates
260
+
261
+ Before running destructive commands:
262
+ - ✅ Correct project: `ddev describe` to verify you're in the right DDEV project
263
+ - ✅ Backup if needed: `ddev export-db --file=backup.sql.gz` for database modifications
264
+ - ✅ Containers running: `ddev start` (DDEV will tell you if already running)
@@ -0,0 +1,232 @@
1
+ # DDEV Commands Reference
2
+
3
+ DDEV-specific commands for WordPress local development. For WP-CLI commands, see [wp-cli-reference.md](wp-cli-reference.md).
4
+
5
+ ## Table of Contents
6
+
7
+ - [Project Lifecycle](#project-lifecycle)
8
+ - [Information](#information)
9
+ - [Database](#database)
10
+ - [Shell & Execution](#shell--execution)
11
+ - [Package Managers](#package-managers)
12
+ - [IMA Addon Commands](#ima-addon-commands)
13
+ - [Configuration Files](#configuration-files)
14
+ - [Logs & Debugging](#logs--debugging)
15
+ - [URLs & Networking](#urls--networking)
16
+ - [Snapshots](#snapshots)
17
+ - [Add-ons](#add-ons)
18
+ - [Troubleshooting](#troubleshooting)
19
+
20
+ ---
21
+
22
+ ## Project Lifecycle
23
+
24
+ ```bash
25
+ ddev start # Start containers (creates if first time)
26
+ ddev stop # Stop containers (preserves data)
27
+ ddev restart # Restart after config changes
28
+ ddev delete # Remove containers and database (destructive!)
29
+ ddev delete --omit-snapshot # Delete without creating snapshot first
30
+ ```
31
+
32
+ **Gotcha**: `ddev stop` preserves the database. `ddev delete` destroys it. When in doubt, snapshot first.
33
+
34
+ ---
35
+
36
+ ## Information
37
+
38
+ ```bash
39
+ ddev describe # URLs, ports, DB credentials, PHP version, container status
40
+ ddev list # All DDEV projects on this machine
41
+ ddev version # DDEV version
42
+ ```
43
+
44
+ `ddev describe` is your first stop — it shows everything: the HTTPS URL, database port, PHP version, and whether containers are healthy.
45
+
46
+ ---
47
+
48
+ ## Database
49
+
50
+ ```bash
51
+ ddev import-db --file=dump.sql # Import SQL dump
52
+ ddev import-db --file=dump.sql.gz # Import compressed dump
53
+ ddev export-db --file=backup.sql.gz # Export database (compressed)
54
+ ddev export-db # Export to stdout
55
+ ddev mysql # Interactive MySQL client (inside container)
56
+ ddev mysql -e "SHOW TABLES" # Run single query
57
+ ```
58
+
59
+ **Credentials**: database=`db`, user=`db`, password=`db`, host=`db` (inside container) or `127.0.0.1:<port>` from host — port shown by `ddev describe`.
60
+
61
+ ---
62
+
63
+ ## Shell & Execution
64
+
65
+ ```bash
66
+ ddev ssh # Interactive bash in web container
67
+ ddev ssh -s db # Shell into database container
68
+ ddev exec ls -la wp-content/plugins/ # Run command in web container
69
+ ddev exec cat wp-content/debug.log # Read a file inside the container
70
+ ```
71
+
72
+ `ddev exec` runs one-off commands. `ddev ssh` for interactive sessions.
73
+
74
+ ---
75
+
76
+ ## Package Managers
77
+
78
+ All package operations run inside the container:
79
+
80
+ ```bash
81
+ ddev npm install # npm in container
82
+ ddev npm run build # npm scripts in container
83
+ ddev npm run composer:dev # Composer via npm script
84
+ ddev composer install # Composer in container
85
+ ddev composer require vendor/package # Add dependency
86
+ ddev yarn install # Yarn alternative
87
+ ```
88
+
89
+ **Why**: Running on host exposes SSH keys, env vars, and other projects to postinstall scripts. Container isolation prevents supply chain attacks.
90
+
91
+ **Exception**: `npm run deploy` runs on host — it needs SSH access for WP Engine push.
92
+
93
+ ---
94
+
95
+ ## IMA Addon Commands
96
+
97
+ Provided by `ima-ddev-wordpress`:
98
+
99
+ ```bash
100
+ # First-time setup (idempotent — safe to re-run)
101
+ ddev setup
102
+ # - Downloads WordPress core
103
+ # - Creates wp-config.php with DDEV credentials
104
+ # - Rewrites URLs to match DDEV hostname
105
+ # - Installs free plugins from .ddev/ima-wordpress.yaml
106
+ # - Fixes known vendor issues (e.g., Mockery dev deps)
107
+
108
+ # Import wp-content from a WPE site archive
109
+ ddev import-assets ~/path/to/extracted-archive
110
+ # - Copies: PRO plugins, parent theme, compiled CSS, uploads, vendor deps
111
+ # - Never overwrites git-tracked files (rsync --ignore-existing)
112
+
113
+ # Install or update the addon itself
114
+ ddev add-on get https://gitea.theflccc.org/IMA/ima-ddev-wordpress
115
+ ddev add-on update ima-ddev-wordpress
116
+ ```
117
+
118
+ **Key flag**: `--ignore-existing` means `ddev import-assets` is safe to re-run — it won't clobber your local changes.
119
+
120
+ ---
121
+
122
+ ## Configuration Files
123
+
124
+ ```
125
+ .ddev/
126
+ ├── config.yaml # Project config (type, PHP version, DB)
127
+ ├── ima-wordpress.yaml # Free plugin list (site-specific)
128
+ ├── php/ # PHP overrides (upload_max_filesize, etc.)
129
+ ├── .env # Environment variables for containers
130
+ ├── commands/web/setup # Custom 'ddev setup' command
131
+ └── commands/host/import-assets # Custom 'ddev import-assets' command
132
+ ```
133
+
134
+ **Key `config.yaml` settings**: `type: wordpress`, `php_version`, `database`, `webserver_type`, `router_http_port`, `router_https_port`.
135
+
136
+ After editing `config.yaml`, run `ddev restart` to apply changes.
137
+
138
+ ---
139
+
140
+ ## Logs & Debugging
141
+
142
+ ```bash
143
+ ddev logs # Web server (nginx/Apache) logs
144
+ ddev logs -s db # MySQL server logs
145
+ ddev logs -f # Follow logs (tail -f style)
146
+ ddev exec cat wp-content/debug.log | tail -50 # WordPress debug log
147
+ ddev xdebug on # Enable Xdebug (for PHPStorm/VS Code)
148
+ ddev xdebug off # Disable Xdebug (faster execution)
149
+ ```
150
+
151
+ **Gotcha**: Xdebug significantly slows PHP execution. Toggle it off when not actively stepping through code.
152
+
153
+ ---
154
+
155
+ ## URLs & Networking
156
+
157
+ ```bash
158
+ ddev launch # Open site in default browser
159
+ ddev launch wp-admin/ # Open WP admin
160
+ ddev share # Create ngrok tunnel for external access
161
+ ```
162
+
163
+ **Port conflicts**: If 80/443 are in use (e.g., another web server), DDEV auto-assigns alternate ports. Check with `ddev describe`. The `ddev setup` command configures WordPress URLs accordingly — no manual search-replace needed.
164
+
165
+ ---
166
+
167
+ ## Snapshots
168
+
169
+ ```bash
170
+ ddev snapshot # Create database snapshot
171
+ ddev snapshot --name=before-migration # Named snapshot
172
+ ddev snapshot restore # Restore latest snapshot
173
+ ddev snapshot restore --latest # Same as above
174
+ ddev snapshot restore --name=before-migration # Restore specific
175
+ ddev snapshot list # List all snapshots
176
+ ```
177
+
178
+ Snapshots are fast database checkpoints. Take one before any risky operation (migrations, plugin updates, data imports).
179
+
180
+ ---
181
+
182
+ ## Add-ons
183
+
184
+ ```bash
185
+ ddev add-on list # List installed add-ons
186
+ ddev add-on get ddev/ddev-redis # Install from DDEV registry
187
+ ddev add-on get https://gitea.theflccc.org/IMA/ima-ddev-wordpress # Install from URL
188
+ ddev add-on update ima-ddev-wordpress # Update specific add-on
189
+ ddev add-on remove redis # Remove add-on
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Troubleshooting
195
+
196
+ **"Critical error" on page load:**
197
+ Missing plugin or broken dependency. Check the debug log first:
198
+ ```bash
199
+ ddev exec cat wp-content/debug.log | tail -20
200
+ ddev wp plugin activate --all
201
+ ```
202
+
203
+ **ima-payments fatal error (Mockery not found):**
204
+ WPE archives include dev dependencies. Re-run setup (it auto-fixes this) or fix manually:
205
+ ```bash
206
+ ddev exec bash -c "cd wp-content/plugins/ima-payments && composer install --no-dev"
207
+ ```
208
+
209
+ **No CSS / unstyled site:**
210
+ Compiled CSS is a build artifact not tracked in git. Re-import from the WPE archive:
211
+ ```bash
212
+ ddev import-assets ~/path/to/extracted-archive
213
+ ```
214
+
215
+ **Can't connect to database:**
216
+ ```bash
217
+ ddev describe # Check container status
218
+ ddev restart # Restart containers
219
+ ```
220
+
221
+ **Port conflict:**
222
+ ```bash
223
+ ddev describe # Shows actual assigned ports
224
+ # DDEV auto-handles conflicts; ddev setup rewrites WordPress URLs to match
225
+ ```
226
+
227
+ **Docker not running:**
228
+ ```bash
229
+ docker info # Check Docker daemon status
230
+ # Start Docker Desktop, or: sudo systemctl start docker
231
+ ddev start
232
+ ```