ima-claude 2.9.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 (182) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +463 -0
  3. package/dist/cli.js +1064 -0
  4. package/package.json +49 -0
  5. package/platforms/claude/adapter.ts +115 -0
  6. package/platforms/junie/adapter.ts +254 -0
  7. package/platforms/junie/agents-template.md +113 -0
  8. package/platforms/junie/hook-translations.md +84 -0
  9. package/platforms/shared/detector.ts +27 -0
  10. package/platforms/shared/installer.ts +202 -0
  11. package/platforms/shared/types.ts +78 -0
  12. package/plugins/ima-claude/.claude-plugin/plugin.json +25 -0
  13. package/plugins/ima-claude/agents/explorer.md +30 -0
  14. package/plugins/ima-claude/agents/implementer.md +30 -0
  15. package/plugins/ima-claude/agents/memory.md +42 -0
  16. package/plugins/ima-claude/agents/reviewer.md +53 -0
  17. package/plugins/ima-claude/agents/tester.md +33 -0
  18. package/plugins/ima-claude/agents/wp-developer.md +46 -0
  19. package/plugins/ima-claude/hooks/README.md +145 -0
  20. package/plugins/ima-claude/hooks/atlassian_prereqs.py +112 -0
  21. package/plugins/ima-claude/hooks/block_sed_edits.py +59 -0
  22. package/plugins/ima-claude/hooks/bootstrap.sh +90 -0
  23. package/plugins/ima-claude/hooks/bootstrap_utility_check.py +94 -0
  24. package/plugins/ima-claude/hooks/composer_autoload_check.py +70 -0
  25. package/plugins/ima-claude/hooks/docs_organization.py +104 -0
  26. package/plugins/ima-claude/hooks/enforce_rg_over_grep.py +56 -0
  27. package/plugins/ima-claude/hooks/fp_utility_check.py +90 -0
  28. package/plugins/ima-claude/hooks/hook_logger.py +69 -0
  29. package/plugins/ima-claude/hooks/hooks.json +239 -0
  30. package/plugins/ima-claude/hooks/jira_issue_fetch.py +79 -0
  31. package/plugins/ima-claude/hooks/jquery_in_wordpress.py +92 -0
  32. package/plugins/ima-claude/hooks/memory_bootstrap.py +79 -0
  33. package/plugins/ima-claude/hooks/memory_store_reminder.py +75 -0
  34. package/plugins/ima-claude/hooks/prompt_coach.py +125 -0
  35. package/plugins/ima-claude/hooks/prompt_coach_digest.md +48 -0
  36. package/plugins/ima-claude/hooks/prompt_coach_system.md +30 -0
  37. package/plugins/ima-claude/hooks/sequential_thinking_check.py +81 -0
  38. package/plugins/ima-claude/hooks/serena_over_grep.py +96 -0
  39. package/plugins/ima-claude/hooks/serena_over_read.py +66 -0
  40. package/plugins/ima-claude/hooks/serena_project_check.py +133 -0
  41. package/plugins/ima-claude/hooks/sql_injection_check.py +73 -0
  42. package/plugins/ima-claude/hooks/task_master_after_plan.py +31 -0
  43. package/plugins/ima-claude/hooks/task_master_before_impl.py +93 -0
  44. package/plugins/ima-claude/hooks/tavily_extract_advanced.py +48 -0
  45. package/plugins/ima-claude/hooks/vestige_before_external.py +86 -0
  46. package/plugins/ima-claude/hooks/webfetch_to_tavily.py +42 -0
  47. package/plugins/ima-claude/hooks/websearch_to_tavily.py +41 -0
  48. package/plugins/ima-claude/hooks/wp_security_check.py +150 -0
  49. package/plugins/ima-claude/personalities/README.md +45 -0
  50. package/plugins/ima-claude/personalities/enable-40k.md +69 -0
  51. package/plugins/ima-claude/personalities/enable-templars.md +69 -0
  52. package/plugins/ima-claude/skills/.research-summary.md +340 -0
  53. package/plugins/ima-claude/skills/architect/SKILL.md +304 -0
  54. package/plugins/ima-claude/skills/compound-bridge/SKILL.md +200 -0
  55. package/plugins/ima-claude/skills/discourse/SKILL.md +440 -0
  56. package/plugins/ima-claude/skills/discourse-admin/SKILL.md +192 -0
  57. package/plugins/ima-claude/skills/discourse-admin/references/api-endpoints.md +441 -0
  58. package/plugins/ima-claude/skills/discourse-admin/references/gotchas.md +107 -0
  59. package/plugins/ima-claude/skills/discourse-admin/references/staging-defaults.md +98 -0
  60. package/plugins/ima-claude/skills/discourse-admin/scripts/discourse-admin.py +319 -0
  61. package/plugins/ima-claude/skills/docs-organize/SKILL.md +254 -0
  62. package/plugins/ima-claude/skills/docs-organize/templates/active-README.md +50 -0
  63. package/plugins/ima-claude/skills/docs-organize/templates/archive-README.md +57 -0
  64. package/plugins/ima-claude/skills/docs-organize/templates/docs-README.md +43 -0
  65. package/plugins/ima-claude/skills/docs-organize/templates/phase-archive-README.md +83 -0
  66. package/plugins/ima-claude/skills/docs-organize/templates/section-README.md +48 -0
  67. package/plugins/ima-claude/skills/docs-organize/templates/transient-README.md +79 -0
  68. package/plugins/ima-claude/skills/docs-organize/templates/transient-gitignore +9 -0
  69. package/plugins/ima-claude/skills/ember-discourse/SKILL.md +496 -0
  70. package/plugins/ima-claude/skills/functional-programmer/SKILL.md +258 -0
  71. package/plugins/ima-claude/skills/ima-bootstrap/SKILL.md +278 -0
  72. package/plugins/ima-claude/skills/ima-bootstrap/references/bootstrap-patterns.md +356 -0
  73. package/plugins/ima-claude/skills/ima-bootstrap/references/ima-brand.md +273 -0
  74. package/plugins/ima-claude/skills/ima-bootstrap/references/theme-integration.md +212 -0
  75. package/plugins/ima-claude/skills/ima-brand/SKILL.md +108 -0
  76. package/plugins/ima-claude/skills/ima-brand/references/brand-identity.md +140 -0
  77. package/plugins/ima-claude/skills/ima-brand/references/digital-standards.md +180 -0
  78. package/plugins/ima-claude/skills/ima-brand/references/visual-system.md +173 -0
  79. package/plugins/ima-claude/skills/ima-forms-expert/SKILL.md +175 -0
  80. package/plugins/ima-claude/skills/ima-forms-expert/references/container-components.md +154 -0
  81. package/plugins/ima-claude/skills/ima-forms-expert/references/examples.md +328 -0
  82. package/plugins/ima-claude/skills/ima-forms-expert/references/field-components.md +298 -0
  83. package/plugins/ima-claude/skills/ima-forms-expert/references/form-factory.md +193 -0
  84. package/plugins/ima-claude/skills/ima-forms-expert/references/quick-reference.md +153 -0
  85. package/plugins/ima-claude/skills/ima-forms-expert/references/validation-engine.md +336 -0
  86. package/plugins/ima-claude/skills/jira-checkpoint/SKILL.md +178 -0
  87. package/plugins/ima-claude/skills/jquery/SKILL.md +413 -0
  88. package/plugins/ima-claude/skills/js-fp/SKILL.md +463 -0
  89. package/plugins/ima-claude/skills/js-fp/core-principles.md +487 -0
  90. package/plugins/ima-claude/skills/js-fp/examples/pure-functions.js +260 -0
  91. package/plugins/ima-claude/skills/js-fp/examples/tests/pure-functions.test.js +262 -0
  92. package/plugins/ima-claude/skills/js-fp/references/anti-patterns.md +120 -0
  93. package/plugins/ima-claude/skills/js-fp/references/performance-patterns.md +116 -0
  94. package/plugins/ima-claude/skills/js-fp/references/testing-patterns.md +134 -0
  95. package/plugins/ima-claude/skills/js-fp-api/SKILL.md +280 -0
  96. package/plugins/ima-claude/skills/js-fp-api/examples/crud-endpoint.js +258 -0
  97. package/plugins/ima-claude/skills/js-fp-api/references/middleware-patterns.md +134 -0
  98. package/plugins/ima-claude/skills/js-fp-api/references/security-sql.md +110 -0
  99. package/plugins/ima-claude/skills/js-fp-api/references/validation-patterns.md +165 -0
  100. package/plugins/ima-claude/skills/js-fp-react/SKILL.md +447 -0
  101. package/plugins/ima-claude/skills/js-fp-react/examples/ProductCard.tsx +65 -0
  102. package/plugins/ima-claude/skills/js-fp-react/references/hooks-advanced.md +136 -0
  103. package/plugins/ima-claude/skills/js-fp-react/references/performance-patterns.md +175 -0
  104. package/plugins/ima-claude/skills/js-fp-vue/SKILL.md +322 -0
  105. package/plugins/ima-claude/skills/js-fp-vue/references/complete-examples.md +397 -0
  106. package/plugins/ima-claude/skills/js-fp-vue/references/composables-advanced.md +282 -0
  107. package/plugins/ima-claude/skills/js-fp-vue/references/reactivity-patterns.md +348 -0
  108. package/plugins/ima-claude/skills/js-fp-vue/references/testing.md +314 -0
  109. package/plugins/ima-claude/skills/js-fp-wordpress/SKILL.md +301 -0
  110. package/plugins/ima-claude/skills/js-fp-wordpress/references/ajax-patterns.md +192 -0
  111. package/plugins/ima-claude/skills/js-fp-wordpress/references/event-patterns.md +136 -0
  112. package/plugins/ima-claude/skills/js-fp-wordpress/references/wp-integration.md +248 -0
  113. package/plugins/ima-claude/skills/livecanvas/SKILL.md +209 -0
  114. package/plugins/ima-claude/skills/livecanvas/references/livecanvas-features.md +311 -0
  115. package/plugins/ima-claude/skills/livecanvas/references/loops-and-logic.md +730 -0
  116. package/plugins/ima-claude/skills/livecanvas/references/picostrap.md +227 -0
  117. package/plugins/ima-claude/skills/mcp-atlassian/SKILL.md +339 -0
  118. package/plugins/ima-claude/skills/mcp-context7/SKILL.md +109 -0
  119. package/plugins/ima-claude/skills/mcp-memory/SKILL.md +182 -0
  120. package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +233 -0
  121. package/plugins/ima-claude/skills/mcp-sequential/SKILL.md +149 -0
  122. package/plugins/ima-claude/skills/mcp-serena/SKILL.md +174 -0
  123. package/plugins/ima-claude/skills/mcp-tavily/SKILL.md +118 -0
  124. package/plugins/ima-claude/skills/mcp-vestige/SKILL.md +259 -0
  125. package/plugins/ima-claude/skills/php-authnet/SKILL.md +275 -0
  126. package/plugins/ima-claude/skills/php-authnet/references/api-reference.md +624 -0
  127. package/plugins/ima-claude/skills/php-authnet/references/sandbox-testing.md +424 -0
  128. package/plugins/ima-claude/skills/php-fp/SKILL.md +333 -0
  129. package/plugins/ima-claude/skills/php-fp/examples/pure-functions.php +403 -0
  130. package/plugins/ima-claude/skills/php-fp/examples/tests/PureFunctionsTest.php +515 -0
  131. package/plugins/ima-claude/skills/php-fp/references/core-principles.md +277 -0
  132. package/plugins/ima-claude/skills/php-fp/references/testing-patterns.md +374 -0
  133. package/plugins/ima-claude/skills/php-fp-wordpress/SKILL.md +216 -0
  134. package/plugins/ima-claude/skills/php-fp-wordpress/references/fp-patterns.md +275 -0
  135. package/plugins/ima-claude/skills/php-fp-wordpress/references/plugin-architecture.md +295 -0
  136. package/plugins/ima-claude/skills/php-fp-wordpress/references/security-examples.md +203 -0
  137. package/plugins/ima-claude/skills/php-fp-wordpress/references/testing-strategy.md +259 -0
  138. package/plugins/ima-claude/skills/phpunit-wp/SKILL.md +716 -0
  139. package/plugins/ima-claude/skills/playwright/SKILL.md +434 -0
  140. package/plugins/ima-claude/skills/playwright/references/accessibility-testing.md +153 -0
  141. package/plugins/ima-claude/skills/playwright/references/ci-cd.md +268 -0
  142. package/plugins/ima-claude/skills/playwright/references/network-mocking.md +270 -0
  143. package/plugins/ima-claude/skills/playwright/references/visual-regression.md +215 -0
  144. package/plugins/ima-claude/skills/py-fp/SKILL.md +663 -0
  145. package/plugins/ima-claude/skills/py-fp/examples/pure-functions.py +185 -0
  146. package/plugins/ima-claude/skills/py-fp/examples/tests/test_pure_functions.py +244 -0
  147. package/plugins/ima-claude/skills/py-fp/references/core-principles.md +381 -0
  148. package/plugins/ima-claude/skills/py-fp/references/testing-patterns.md +283 -0
  149. package/plugins/ima-claude/skills/quasar-fp/SKILL.md +327 -0
  150. package/plugins/ima-claude/skills/quasar-fp/metadata.json +85 -0
  151. package/plugins/ima-claude/skills/quasar-fp/references/component-patterns.md +257 -0
  152. package/plugins/ima-claude/skills/quasar-fp/references/theme-integration.md +233 -0
  153. package/plugins/ima-claude/skills/quasar-fp/references/utility-classes.md +237 -0
  154. package/plugins/ima-claude/skills/quickstart/SKILL.md +129 -0
  155. package/plugins/ima-claude/skills/rails/SKILL.md +359 -0
  156. package/plugins/ima-claude/skills/resume-session/SKILL.md +68 -0
  157. package/plugins/ima-claude/skills/rg/SKILL.md +205 -0
  158. package/plugins/ima-claude/skills/ruby-fp/SKILL.md +336 -0
  159. package/plugins/ima-claude/skills/save-session/SKILL.md +81 -0
  160. package/plugins/ima-claude/skills/scorecard/SKILL.md +96 -0
  161. package/plugins/ima-claude/skills/skill-analyzer/SKILL.md +127 -0
  162. package/plugins/ima-claude/skills/skill-analyzer/references/advanced-checklist.md +44 -0
  163. package/plugins/ima-claude/skills/skill-analyzer/references/core-checklist.md +60 -0
  164. package/plugins/ima-claude/skills/skill-analyzer/scripts/analyze_skill.py +418 -0
  165. package/plugins/ima-claude/skills/skill-creator/LICENSE.txt +202 -0
  166. package/plugins/ima-claude/skills/skill-creator/SKILL.md +343 -0
  167. package/plugins/ima-claude/skills/skill-creator/references/output-patterns.md +82 -0
  168. package/plugins/ima-claude/skills/skill-creator/references/workflows.md +28 -0
  169. package/plugins/ima-claude/skills/skill-creator/scripts/init_skill.py +303 -0
  170. package/plugins/ima-claude/skills/skill-creator/scripts/package_skill.py +110 -0
  171. package/plugins/ima-claude/skills/skill-creator/scripts/quick_validate.py +103 -0
  172. package/plugins/ima-claude/skills/task-master/SKILL.md +51 -0
  173. package/plugins/ima-claude/skills/task-planner/SKILL.md +228 -0
  174. package/plugins/ima-claude/skills/task-runner/SKILL.md +192 -0
  175. package/plugins/ima-claude/skills/unit-testing/SKILL.md +198 -0
  176. package/plugins/ima-claude/skills/unit-testing/references/mock-patterns.md +181 -0
  177. package/plugins/ima-claude/skills/unit-testing/references/tdd-workflow.md +177 -0
  178. package/plugins/ima-claude/skills/unit-testing/references/test-strategy.md +126 -0
  179. package/plugins/ima-claude/skills/wp-local/SKILL.md +246 -0
  180. package/plugins/ima-claude/skills/wp-local/references/configuration.md +198 -0
  181. package/plugins/ima-claude/skills/wp-local/references/wp-cli-reference.md +406 -0
  182. package/plugins/ima-claude/skills/wp-local/scripts/wp-local.sh +61 -0
@@ -0,0 +1,406 @@
1
+ # WP-CLI Command Reference
2
+
3
+ Comprehensive reference for WP-CLI commands in local development. Organized for lookup — use the TOC to jump to what you need. All examples use the `wpl` alias.
4
+
5
+ For inline essentials (database, plugin, user, theme, cache, options, post, taxonomy, menu, rewrite, scaffold, eval), see [SKILL.md](../SKILL.md).
6
+
7
+ ## Table of Contents
8
+
9
+ - [Core](#core)
10
+ - [Config](#config)
11
+ - [Cron](#cron)
12
+ - [Media](#media)
13
+ - [Comment](#comment)
14
+ - [Role & Capability](#role--capability)
15
+ - [Widget](#widget)
16
+ - [Sidebar](#sidebar)
17
+ - [Site & Multisite](#site--multisite)
18
+ - [Language & i18n](#language--i18n)
19
+ - [Import & Export](#import--export)
20
+ - [Embed](#embed)
21
+ - [Package](#package)
22
+ - [Maintenance Mode](#maintenance-mode)
23
+ - [Server](#server)
24
+ - [Super Admin](#super-admin)
25
+ - [Network Meta](#network-meta)
26
+ - [Advanced Patterns](#advanced-patterns)
27
+
28
+ ---
29
+
30
+ ## Core
31
+
32
+ `wp core version` · `wp core check-update` · `wp core update` · `wp core download` · `wp core install`
33
+
34
+ ```bash
35
+ wpl core version
36
+ wpl core check-update
37
+ wpl core update
38
+ wpl core update --minor
39
+ wpl core verify-checksums
40
+ ```
41
+
42
+ **Gotchas**: `core update` in Local WP may conflict with Local's version management. Prefer updating through Local's UI for major versions.
43
+
44
+ ---
45
+
46
+ ## Config
47
+
48
+ `wp config list` · `wp config get <name>` · `wp config set <name> <value>` · `wp config path`
49
+
50
+ ```bash
51
+ wpl config path
52
+ wpl config list --format=table
53
+ wpl config get DB_NAME
54
+ wpl config set WP_DEBUG true --raw
55
+ wpl config set WP_DEBUG_LOG true --raw
56
+ wpl config set SCRIPT_DEBUG true --raw
57
+ wpl config set WP_DEBUG false --raw
58
+ ```
59
+
60
+ **Key flags**:
61
+ - `--raw` — Write value as a PHP constant (no quotes). Required for `true`/`false`/numbers.
62
+ - `--type=constant|variable` — Whether to set as `define()` or `$variable`.
63
+
64
+ **Gotchas**: Changes write to `wp-config.php` directly. Local WP may override on restart.
65
+
66
+ ---
67
+
68
+ ## Cron
69
+
70
+ `wp cron event list` · `wp cron event run <hook>` · `wp cron event schedule <hook> <next-run>` · `wp cron event delete <hook>`
71
+
72
+ ```bash
73
+ wpl cron event list --format=table
74
+ wpl cron event run wp_update_plugins
75
+ wpl cron event run --all
76
+ wpl cron event delete my_custom_hook
77
+ wpl cron schedule list
78
+ ```
79
+
80
+ **Key flags**:
81
+ - `--due-now` — List only events ready to run.
82
+ - `--format=json` — Useful for piping to jq.
83
+
84
+ **Gotchas**: Local WP sites don't have real cron. Events only fire on page load unless you configure `DISABLE_WP_CRON` + system cron.
85
+
86
+ ---
87
+
88
+ ## Media
89
+
90
+ `wp media import <file>` · `wp media regenerate` · `wp media image-size`
91
+
92
+ ```bash
93
+ wpl media import ~/images/photo.jpg --title="My Photo"
94
+ wpl media import https://example.com/image.jpg
95
+ wpl media regenerate --yes
96
+ wpl media regenerate 42 43 44
97
+ wpl media image-size --format=table
98
+ ```
99
+
100
+ **Key flags**:
101
+ - `--yes` — Skip confirmation on regenerate.
102
+ - `--only-missing` — Only regenerate missing sizes.
103
+ - `--skip-delete` — Don't delete old thumbnails during regenerate.
104
+
105
+ ---
106
+
107
+ ## Comment
108
+
109
+ `wp comment list` · `wp comment create` · `wp comment update <id>` · `wp comment delete <id>` · `wp comment approve <id>`
110
+
111
+ ```bash
112
+ wpl comment list --format=table
113
+ wpl comment list --status=hold --fields=comment_ID,comment_author,comment_content
114
+ wpl comment create --comment_post_ID=42 --comment_content="Test comment" --comment_author="Test"
115
+ wpl comment approve 5
116
+ wpl comment spam 5
117
+ wpl comment delete 5 --force
118
+ wpl comment recount
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Role & Capability
124
+
125
+ `wp role list` · `wp role create <role> <name>` · `wp cap list <role>` · `wp cap add <role> <cap>`
126
+
127
+ ```bash
128
+ wpl role list --format=table
129
+ wpl role create custom_role "Custom Role" --clone=editor
130
+ wpl cap list editor --format=table
131
+ wpl cap add editor manage_options
132
+ wpl cap remove editor manage_options
133
+ ```
134
+
135
+ **Gotchas**: Role/cap changes persist in the database (`wp_options` → `wp_user_roles`). Removing a role doesn't reassign users — they lose access.
136
+
137
+ ---
138
+
139
+ ## Widget
140
+
141
+ `wp widget list <sidebar-id>` · `wp widget add <widget> <sidebar-id>` · `wp widget delete <widget-id>` · `wp widget reset <sidebar-id>`
142
+
143
+ ```bash
144
+ wpl widget list sidebar-1 --format=table
145
+ wpl widget add text sidebar-1 --title="Hello" --text="World"
146
+ wpl widget update text-2 --title="Updated"
147
+ wpl widget delete text-2
148
+ wpl widget deactivate text-2
149
+ wpl widget reset sidebar-1
150
+ ```
151
+
152
+ **Gotchas**: Widget IDs are auto-generated (e.g., `text-2`). List first to find IDs.
153
+
154
+ ---
155
+
156
+ ## Sidebar
157
+
158
+ `wp sidebar list`
159
+
160
+ ```bash
161
+ wpl sidebar list --format=table
162
+ wpl sidebar list --fields=id,name,description
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Site & Multisite
168
+
169
+ `wp site list` · `wp site create` · `wp site activate <site-id>` · `wp site deactivate <site-id>`
170
+
171
+ ```bash
172
+ wpl site list --format=table
173
+ wpl site create --slug=newsite --title="New Site" --email=admin@example.com
174
+ wpl site activate 2
175
+ wpl site deactivate 2
176
+ wpl site delete 2 --yes
177
+ ```
178
+
179
+ **Key flags**:
180
+ - `--url=<url>` — Target a specific site in multisite. Use with any command.
181
+
182
+ **Gotchas**: Only works on multisite installs. Single-site installs will error.
183
+
184
+ ---
185
+
186
+ ## Language & i18n
187
+
188
+ `wp language core list` · `wp language core install <language>` · `wp language core activate <language>` · `wp i18n make-pot`
189
+
190
+ ```bash
191
+ wpl language core list --format=table
192
+ wpl language core install es_ES
193
+ wpl language core activate es_ES
194
+ wpl language plugin install hello-dolly es_ES
195
+ wpl language theme install flavor es_ES
196
+ wpl i18n make-pot . languages/my-plugin.pot
197
+ wpl i18n make-json languages/
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Import & Export
203
+
204
+ `wp export` · `wp import <file>`
205
+
206
+ ```bash
207
+ wpl export --dir=. --post_type=post
208
+ wpl export --dir=. --post_type=page --start_date=2024-01-01
209
+ wpl import export.xml --authors=mapping.csv
210
+ wpl import export.xml --authors=create
211
+ ```
212
+
213
+ **Key flags**:
214
+ - `--dir` — Export directory (defaults to current dir).
215
+ - `--post_type` — Limit export to specific post type.
216
+ - `--authors=create|mapping.csv|skip` — How to handle author mapping on import.
217
+
218
+ **Gotchas**: Import requires the WordPress Importer plugin. Install with `wpl plugin install wordpress-importer --activate`.
219
+
220
+ ---
221
+
222
+ ## Embed
223
+
224
+ `wp embed fetch <url>` · `wp embed provider list`
225
+
226
+ ```bash
227
+ wpl embed fetch "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
228
+ wpl embed provider list --format=table
229
+ wpl embed cache clear
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Package
235
+
236
+ `wp package list` · `wp package install <package>` · `wp package uninstall <package>`
237
+
238
+ ```bash
239
+ wpl package list
240
+ wpl package install wp-cli/doctor-command
241
+ wpl package install wp-cli/profile-command
242
+ wpl package uninstall wp-cli/doctor-command
243
+ ```
244
+
245
+ **Useful packages**:
246
+ - `wp-cli/doctor-command` — Diagnose WordPress issues
247
+ - `wp-cli/profile-command` — Profile command performance
248
+ - `wp-cli/dist-archive-command` — Create plugin/theme zip archives
249
+
250
+ ---
251
+
252
+ ## Maintenance Mode
253
+
254
+ `wp maintenance-mode activate` · `wp maintenance-mode deactivate` · `wp maintenance-mode status`
255
+
256
+ ```bash
257
+ wpl maintenance-mode activate
258
+ wpl maintenance-mode deactivate
259
+ wpl maintenance-mode status
260
+ ```
261
+
262
+ ---
263
+
264
+ ## Server
265
+
266
+ `wp server`
267
+
268
+ ```bash
269
+ wpl server --host=0.0.0.0 --port=8080
270
+ ```
271
+
272
+ **Gotchas**: Not useful with Local WP — Local manages its own server. Included for completeness.
273
+
274
+ ---
275
+
276
+ ## Super Admin
277
+
278
+ `wp super-admin list` · `wp super-admin add <user>` · `wp super-admin remove <user>`
279
+
280
+ ```bash
281
+ wpl super-admin list
282
+ wpl super-admin add admin
283
+ wpl super-admin remove admin
284
+ ```
285
+
286
+ **Gotchas**: Multisite only.
287
+
288
+ ---
289
+
290
+ ## Network Meta
291
+
292
+ `wp network meta get <id> <key>` · `wp network meta update <id> <key> <value>`
293
+
294
+ ```bash
295
+ wpl network meta list 1 --format=table
296
+ wpl network meta get 1 site_name
297
+ wpl network meta update 1 site_name "My Network"
298
+ ```
299
+
300
+ **Gotchas**: Multisite only. Network ID is usually `1`.
301
+
302
+ ---
303
+
304
+ ## Advanced Patterns
305
+
306
+ ### JSON output + jq
307
+
308
+ Pipe `--format=json` through jq for powerful filtering:
309
+
310
+ ```bash
311
+ # Get IDs of all active plugins
312
+ wpl plugin list --status=active --format=json | jq -r '.[].name'
313
+
314
+ # Get post titles containing "hello"
315
+ wpl post list --format=json | jq -r '.[] | select(.post_title | test("hello";"i")) | .post_title'
316
+
317
+ # Count posts by status
318
+ wpl post list --format=json | jq 'group_by(.post_status) | map({status: .[0].post_status, count: length})'
319
+
320
+ # Get all option names matching a pattern
321
+ wpl option list --search="woo*" --format=json | jq -r '.[].option_name'
322
+ ```
323
+
324
+ ### Bulk operations
325
+
326
+ ```bash
327
+ # Deactivate all plugins
328
+ wpl plugin deactivate --all
329
+
330
+ # Delete all transients
331
+ wpl transient delete --all
332
+
333
+ # Regenerate all thumbnails
334
+ wpl media regenerate --yes
335
+
336
+ # Delete all spam comments
337
+ wpl comment delete $(wpl comment list --status=spam --format=ids) --force
338
+
339
+ # Reset all user passwords
340
+ wpl user list --format=ids | xargs -I{} wpl user update {} --user_pass="changeme"
341
+ ```
342
+
343
+ ### Common eval snippets
344
+
345
+ ```bash
346
+ # Check current theme
347
+ wpl eval "echo get_template();"
348
+
349
+ # Get site health info
350
+ wpl eval "echo home_url(); echo ' | '; echo wp_get_theme()->get('Name');"
351
+
352
+ # Check if a function exists
353
+ wpl eval "echo function_exists('wc_get_products') ? 'yes' : 'no';"
354
+
355
+ # Get active plugin count
356
+ wpl eval "echo count(get_option('active_plugins'));"
357
+
358
+ # List registered post types
359
+ wpl eval "print_r(array_keys(get_post_types(['public' => true])));"
360
+
361
+ # List registered taxonomies
362
+ wpl eval "print_r(array_keys(get_taxonomies(['public' => true])));"
363
+
364
+ # Check PHP version and memory
365
+ wpl eval "echo 'PHP: ' . PHP_VERSION . ' | Memory: ' . WP_MEMORY_LIMIT;"
366
+
367
+ # Test a shortcode
368
+ wpl eval "echo do_shortcode('[my_shortcode]');"
369
+ ```
370
+
371
+ ### Chaining commands
372
+
373
+ ```bash
374
+ # Install, activate, and verify
375
+ wpl plugin install woocommerce --activate && wpl plugin list --status=active
376
+
377
+ # Export before destructive operation
378
+ wpl db export before-change.sql && wpl search-replace 'old.com' 'new.com'
379
+
380
+ # Create user and assign role
381
+ wpl user create testuser test@test.com --role=subscriber && wpl user add-role $(wpl user get testuser --field=ID) editor
382
+ ```
383
+
384
+ ### Debugging plugin conflicts
385
+
386
+ ```bash
387
+ # Run with all plugins disabled
388
+ wpl eval "echo home_url();" --skip-plugins
389
+
390
+ # Run with specific plugin disabled
391
+ wpl eval "echo home_url();" --skip-plugins=problematic-plugin
392
+
393
+ # Run with themes disabled
394
+ wpl eval "echo 'loaded';" --skip-themes
395
+ ```
396
+
397
+ ### Format reference
398
+
399
+ | Format | Use case |
400
+ |---|---|
401
+ | `table` | Human-readable terminal output (default) |
402
+ | `json` | Pipe to jq, programmatic processing |
403
+ | `csv` | Spreadsheet import, simple parsing |
404
+ | `yaml` | Config files, readable structured data |
405
+ | `ids` | Pipe to other commands (`xargs`) |
406
+ | `count` | Quick counts |
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env bash
2
+ # wp-local.sh - Run wp-cli in Flywheel Local WP environment
3
+ # Usage: wp-local.sh [wp-args...]
4
+
5
+ set -euo pipefail
6
+
7
+ SSH_ENTRY_DIR="$HOME/.config/Local/ssh-entry"
8
+ SITES_MAP="$HOME/.claude/wp-local-sites.json"
9
+
10
+ # Function to find .wp-local file by searching upward
11
+ find_wp_local_file() {
12
+ local dir="$PWD"
13
+ while [[ "$dir" != "/" ]]; do
14
+ if [[ -f "$dir/.wp-local" ]]; then
15
+ echo "$dir/.wp-local"
16
+ return 0
17
+ fi
18
+ dir=$(dirname "$dir")
19
+ done
20
+ return 1
21
+ }
22
+
23
+ # Determine site identifier (priority: $WP_LOCAL_SITE > .wp-local > error)
24
+ SITE_ID=""
25
+ if [[ -n "${WP_LOCAL_SITE:-}" ]]; then
26
+ SITE_ID="$WP_LOCAL_SITE"
27
+ elif WP_LOCAL_FILE=$(find_wp_local_file); then
28
+ SITE_ID=$(cat "$WP_LOCAL_FILE" | tr -d '[:space:]')
29
+ else
30
+ echo "Error: No site configured. Set WP_LOCAL_SITE env var or create .wp-local file" >&2
31
+ echo "See: ~/.claude/skills/wp-local/references/configuration.md" >&2
32
+ exit 1
33
+ fi
34
+
35
+ # Map friendly name to UUID if needed
36
+ SITE_UUID="$SITE_ID"
37
+ if [[ -f "$SITES_MAP" ]] && ! [[ -f "$SSH_ENTRY_DIR/${SITE_ID}.sh" ]]; then
38
+ SITE_UUID=$(jq -r ".\"$SITE_ID\" // \"$SITE_ID\"" "$SITES_MAP")
39
+ fi
40
+
41
+ # Verify environment script exists
42
+ ENV_SCRIPT="$SSH_ENTRY_DIR/${SITE_UUID}.sh"
43
+ if [[ ! -f "$ENV_SCRIPT" ]]; then
44
+ echo "Error: Local WP environment not found: $ENV_SCRIPT" >&2
45
+ echo "Available sites:" >&2
46
+ ls "$SSH_ENTRY_DIR"/*.sh 2>/dev/null | xargs -n1 basename | sed 's/.sh$//' >&2
47
+ exit 1
48
+ fi
49
+
50
+ # Source environment (suppress echo statements)
51
+ source <(grep -v "^echo" "$ENV_SCRIPT" | grep -v "^exec")
52
+
53
+ # WP-CLI 2.12+ passes --no-defaults to the mysql binary, which causes it to
54
+ # ignore MYSQL_HOME/my.cnf and fall back to /tmp/mysql.sock (wrong).
55
+ # MYSQL_UNIX_PORT is respected regardless of --no-defaults.
56
+ if [[ -n "${MYSQL_HOME:-}" && -f "$MYSQL_HOME/my.cnf" ]]; then
57
+ MYSQL_UNIX_PORT=$(grep "^socket" "$MYSQL_HOME/my.cnf" | head -1 | awk -F= '{print $2}' | tr -d ' ')
58
+ export MYSQL_UNIX_PORT
59
+ fi
60
+
61
+ exec wp "$@"