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.
- package/LICENSE +21 -0
- package/README.md +463 -0
- package/dist/cli.js +1064 -0
- package/package.json +49 -0
- package/platforms/claude/adapter.ts +115 -0
- package/platforms/junie/adapter.ts +254 -0
- package/platforms/junie/agents-template.md +113 -0
- package/platforms/junie/hook-translations.md +84 -0
- package/platforms/shared/detector.ts +27 -0
- package/platforms/shared/installer.ts +202 -0
- package/platforms/shared/types.ts +78 -0
- package/plugins/ima-claude/.claude-plugin/plugin.json +25 -0
- package/plugins/ima-claude/agents/explorer.md +30 -0
- package/plugins/ima-claude/agents/implementer.md +30 -0
- package/plugins/ima-claude/agents/memory.md +42 -0
- package/plugins/ima-claude/agents/reviewer.md +53 -0
- package/plugins/ima-claude/agents/tester.md +33 -0
- package/plugins/ima-claude/agents/wp-developer.md +46 -0
- package/plugins/ima-claude/hooks/README.md +145 -0
- package/plugins/ima-claude/hooks/atlassian_prereqs.py +112 -0
- package/plugins/ima-claude/hooks/block_sed_edits.py +59 -0
- package/plugins/ima-claude/hooks/bootstrap.sh +90 -0
- package/plugins/ima-claude/hooks/bootstrap_utility_check.py +94 -0
- package/plugins/ima-claude/hooks/composer_autoload_check.py +70 -0
- package/plugins/ima-claude/hooks/docs_organization.py +104 -0
- package/plugins/ima-claude/hooks/enforce_rg_over_grep.py +56 -0
- package/plugins/ima-claude/hooks/fp_utility_check.py +90 -0
- package/plugins/ima-claude/hooks/hook_logger.py +69 -0
- package/plugins/ima-claude/hooks/hooks.json +239 -0
- package/plugins/ima-claude/hooks/jira_issue_fetch.py +79 -0
- package/plugins/ima-claude/hooks/jquery_in_wordpress.py +92 -0
- package/plugins/ima-claude/hooks/memory_bootstrap.py +79 -0
- package/plugins/ima-claude/hooks/memory_store_reminder.py +75 -0
- package/plugins/ima-claude/hooks/prompt_coach.py +125 -0
- package/plugins/ima-claude/hooks/prompt_coach_digest.md +48 -0
- package/plugins/ima-claude/hooks/prompt_coach_system.md +30 -0
- package/plugins/ima-claude/hooks/sequential_thinking_check.py +81 -0
- package/plugins/ima-claude/hooks/serena_over_grep.py +96 -0
- package/plugins/ima-claude/hooks/serena_over_read.py +66 -0
- package/plugins/ima-claude/hooks/serena_project_check.py +133 -0
- package/plugins/ima-claude/hooks/sql_injection_check.py +73 -0
- package/plugins/ima-claude/hooks/task_master_after_plan.py +31 -0
- package/plugins/ima-claude/hooks/task_master_before_impl.py +93 -0
- package/plugins/ima-claude/hooks/tavily_extract_advanced.py +48 -0
- package/plugins/ima-claude/hooks/vestige_before_external.py +86 -0
- package/plugins/ima-claude/hooks/webfetch_to_tavily.py +42 -0
- package/plugins/ima-claude/hooks/websearch_to_tavily.py +41 -0
- package/plugins/ima-claude/hooks/wp_security_check.py +150 -0
- package/plugins/ima-claude/personalities/README.md +45 -0
- package/plugins/ima-claude/personalities/enable-40k.md +69 -0
- package/plugins/ima-claude/personalities/enable-templars.md +69 -0
- package/plugins/ima-claude/skills/.research-summary.md +340 -0
- package/plugins/ima-claude/skills/architect/SKILL.md +304 -0
- package/plugins/ima-claude/skills/compound-bridge/SKILL.md +200 -0
- package/plugins/ima-claude/skills/discourse/SKILL.md +440 -0
- package/plugins/ima-claude/skills/discourse-admin/SKILL.md +192 -0
- package/plugins/ima-claude/skills/discourse-admin/references/api-endpoints.md +441 -0
- package/plugins/ima-claude/skills/discourse-admin/references/gotchas.md +107 -0
- package/plugins/ima-claude/skills/discourse-admin/references/staging-defaults.md +98 -0
- package/plugins/ima-claude/skills/discourse-admin/scripts/discourse-admin.py +319 -0
- package/plugins/ima-claude/skills/docs-organize/SKILL.md +254 -0
- package/plugins/ima-claude/skills/docs-organize/templates/active-README.md +50 -0
- package/plugins/ima-claude/skills/docs-organize/templates/archive-README.md +57 -0
- package/plugins/ima-claude/skills/docs-organize/templates/docs-README.md +43 -0
- package/plugins/ima-claude/skills/docs-organize/templates/phase-archive-README.md +83 -0
- package/plugins/ima-claude/skills/docs-organize/templates/section-README.md +48 -0
- package/plugins/ima-claude/skills/docs-organize/templates/transient-README.md +79 -0
- package/plugins/ima-claude/skills/docs-organize/templates/transient-gitignore +9 -0
- package/plugins/ima-claude/skills/ember-discourse/SKILL.md +496 -0
- package/plugins/ima-claude/skills/functional-programmer/SKILL.md +258 -0
- package/plugins/ima-claude/skills/ima-bootstrap/SKILL.md +278 -0
- package/plugins/ima-claude/skills/ima-bootstrap/references/bootstrap-patterns.md +356 -0
- package/plugins/ima-claude/skills/ima-bootstrap/references/ima-brand.md +273 -0
- package/plugins/ima-claude/skills/ima-bootstrap/references/theme-integration.md +212 -0
- package/plugins/ima-claude/skills/ima-brand/SKILL.md +108 -0
- package/plugins/ima-claude/skills/ima-brand/references/brand-identity.md +140 -0
- package/plugins/ima-claude/skills/ima-brand/references/digital-standards.md +180 -0
- package/plugins/ima-claude/skills/ima-brand/references/visual-system.md +173 -0
- package/plugins/ima-claude/skills/ima-forms-expert/SKILL.md +175 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/container-components.md +154 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/examples.md +328 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/field-components.md +298 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/form-factory.md +193 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/quick-reference.md +153 -0
- package/plugins/ima-claude/skills/ima-forms-expert/references/validation-engine.md +336 -0
- package/plugins/ima-claude/skills/jira-checkpoint/SKILL.md +178 -0
- package/plugins/ima-claude/skills/jquery/SKILL.md +413 -0
- package/plugins/ima-claude/skills/js-fp/SKILL.md +463 -0
- package/plugins/ima-claude/skills/js-fp/core-principles.md +487 -0
- package/plugins/ima-claude/skills/js-fp/examples/pure-functions.js +260 -0
- package/plugins/ima-claude/skills/js-fp/examples/tests/pure-functions.test.js +262 -0
- package/plugins/ima-claude/skills/js-fp/references/anti-patterns.md +120 -0
- package/plugins/ima-claude/skills/js-fp/references/performance-patterns.md +116 -0
- package/plugins/ima-claude/skills/js-fp/references/testing-patterns.md +134 -0
- package/plugins/ima-claude/skills/js-fp-api/SKILL.md +280 -0
- package/plugins/ima-claude/skills/js-fp-api/examples/crud-endpoint.js +258 -0
- package/plugins/ima-claude/skills/js-fp-api/references/middleware-patterns.md +134 -0
- package/plugins/ima-claude/skills/js-fp-api/references/security-sql.md +110 -0
- package/plugins/ima-claude/skills/js-fp-api/references/validation-patterns.md +165 -0
- package/plugins/ima-claude/skills/js-fp-react/SKILL.md +447 -0
- package/plugins/ima-claude/skills/js-fp-react/examples/ProductCard.tsx +65 -0
- package/plugins/ima-claude/skills/js-fp-react/references/hooks-advanced.md +136 -0
- package/plugins/ima-claude/skills/js-fp-react/references/performance-patterns.md +175 -0
- package/plugins/ima-claude/skills/js-fp-vue/SKILL.md +322 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/complete-examples.md +397 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/composables-advanced.md +282 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/reactivity-patterns.md +348 -0
- package/plugins/ima-claude/skills/js-fp-vue/references/testing.md +314 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/SKILL.md +301 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/references/ajax-patterns.md +192 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/references/event-patterns.md +136 -0
- package/plugins/ima-claude/skills/js-fp-wordpress/references/wp-integration.md +248 -0
- package/plugins/ima-claude/skills/livecanvas/SKILL.md +209 -0
- package/plugins/ima-claude/skills/livecanvas/references/livecanvas-features.md +311 -0
- package/plugins/ima-claude/skills/livecanvas/references/loops-and-logic.md +730 -0
- package/plugins/ima-claude/skills/livecanvas/references/picostrap.md +227 -0
- package/plugins/ima-claude/skills/mcp-atlassian/SKILL.md +339 -0
- package/plugins/ima-claude/skills/mcp-context7/SKILL.md +109 -0
- package/plugins/ima-claude/skills/mcp-memory/SKILL.md +182 -0
- package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +233 -0
- package/plugins/ima-claude/skills/mcp-sequential/SKILL.md +149 -0
- package/plugins/ima-claude/skills/mcp-serena/SKILL.md +174 -0
- package/plugins/ima-claude/skills/mcp-tavily/SKILL.md +118 -0
- package/plugins/ima-claude/skills/mcp-vestige/SKILL.md +259 -0
- package/plugins/ima-claude/skills/php-authnet/SKILL.md +275 -0
- package/plugins/ima-claude/skills/php-authnet/references/api-reference.md +624 -0
- package/plugins/ima-claude/skills/php-authnet/references/sandbox-testing.md +424 -0
- package/plugins/ima-claude/skills/php-fp/SKILL.md +333 -0
- package/plugins/ima-claude/skills/php-fp/examples/pure-functions.php +403 -0
- package/plugins/ima-claude/skills/php-fp/examples/tests/PureFunctionsTest.php +515 -0
- package/plugins/ima-claude/skills/php-fp/references/core-principles.md +277 -0
- package/plugins/ima-claude/skills/php-fp/references/testing-patterns.md +374 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/SKILL.md +216 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/fp-patterns.md +275 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/plugin-architecture.md +295 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/security-examples.md +203 -0
- package/plugins/ima-claude/skills/php-fp-wordpress/references/testing-strategy.md +259 -0
- package/plugins/ima-claude/skills/phpunit-wp/SKILL.md +716 -0
- package/plugins/ima-claude/skills/playwright/SKILL.md +434 -0
- package/plugins/ima-claude/skills/playwright/references/accessibility-testing.md +153 -0
- package/plugins/ima-claude/skills/playwright/references/ci-cd.md +268 -0
- package/plugins/ima-claude/skills/playwright/references/network-mocking.md +270 -0
- package/plugins/ima-claude/skills/playwright/references/visual-regression.md +215 -0
- package/plugins/ima-claude/skills/py-fp/SKILL.md +663 -0
- package/plugins/ima-claude/skills/py-fp/examples/pure-functions.py +185 -0
- package/plugins/ima-claude/skills/py-fp/examples/tests/test_pure_functions.py +244 -0
- package/plugins/ima-claude/skills/py-fp/references/core-principles.md +381 -0
- package/plugins/ima-claude/skills/py-fp/references/testing-patterns.md +283 -0
- package/plugins/ima-claude/skills/quasar-fp/SKILL.md +327 -0
- package/plugins/ima-claude/skills/quasar-fp/metadata.json +85 -0
- package/plugins/ima-claude/skills/quasar-fp/references/component-patterns.md +257 -0
- package/plugins/ima-claude/skills/quasar-fp/references/theme-integration.md +233 -0
- package/plugins/ima-claude/skills/quasar-fp/references/utility-classes.md +237 -0
- package/plugins/ima-claude/skills/quickstart/SKILL.md +129 -0
- package/plugins/ima-claude/skills/rails/SKILL.md +359 -0
- package/plugins/ima-claude/skills/resume-session/SKILL.md +68 -0
- package/plugins/ima-claude/skills/rg/SKILL.md +205 -0
- package/plugins/ima-claude/skills/ruby-fp/SKILL.md +336 -0
- package/plugins/ima-claude/skills/save-session/SKILL.md +81 -0
- package/plugins/ima-claude/skills/scorecard/SKILL.md +96 -0
- package/plugins/ima-claude/skills/skill-analyzer/SKILL.md +127 -0
- package/plugins/ima-claude/skills/skill-analyzer/references/advanced-checklist.md +44 -0
- package/plugins/ima-claude/skills/skill-analyzer/references/core-checklist.md +60 -0
- package/plugins/ima-claude/skills/skill-analyzer/scripts/analyze_skill.py +418 -0
- package/plugins/ima-claude/skills/skill-creator/LICENSE.txt +202 -0
- package/plugins/ima-claude/skills/skill-creator/SKILL.md +343 -0
- package/plugins/ima-claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/plugins/ima-claude/skills/skill-creator/references/workflows.md +28 -0
- package/plugins/ima-claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/plugins/ima-claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/plugins/ima-claude/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/plugins/ima-claude/skills/task-master/SKILL.md +51 -0
- package/plugins/ima-claude/skills/task-planner/SKILL.md +228 -0
- package/plugins/ima-claude/skills/task-runner/SKILL.md +192 -0
- package/plugins/ima-claude/skills/unit-testing/SKILL.md +198 -0
- package/plugins/ima-claude/skills/unit-testing/references/mock-patterns.md +181 -0
- package/plugins/ima-claude/skills/unit-testing/references/tdd-workflow.md +177 -0
- package/plugins/ima-claude/skills/unit-testing/references/test-strategy.md +126 -0
- package/plugins/ima-claude/skills/wp-local/SKILL.md +246 -0
- package/plugins/ima-claude/skills/wp-local/references/configuration.md +198 -0
- package/plugins/ima-claude/skills/wp-local/references/wp-cli-reference.md +406 -0
- package/plugins/ima-claude/skills/wp-local/scripts/wp-local.sh +61 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "wp-local"
|
|
3
|
+
description: "Run WordPress WP-CLI commands in Flywheel Local WP environments. Use for database queries, plugin management, user operations, theme operations, cache clearing, cron jobs. Auto-configures environment without affecting main Claude session. Triggers on: wp plugin, wp db, wp user, wp option, wp-cli, Local WP, Flywheel."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WordPress WP-Local
|
|
7
|
+
|
|
8
|
+
Execute WP-CLI commands in Flywheel Local WP environments without disrupting Claude Code's main session.
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
**Prerequisites**:
|
|
13
|
+
- **Recommended**: Use Kitty terminal with `$WP_LOCAL_SITE` configured (see Configuration)
|
|
14
|
+
- **Alternative**: Create `.wp-local` file in project root: `echo "19efkkzWB" > .wp-local`
|
|
15
|
+
|
|
16
|
+
**Run wp commands**:
|
|
17
|
+
```bash
|
|
18
|
+
bash ~/.claude/skills/wp-local/scripts/wp-local.sh plugin list
|
|
19
|
+
bash ~/.claude/skills/wp-local/scripts/wp-local.sh db query "SELECT * FROM wp_posts LIMIT 5"
|
|
20
|
+
bash ~/.claude/skills/wp-local/scripts/wp-local.sh user list
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**With shell alias** (recommended, see Configuration):
|
|
24
|
+
```bash
|
|
25
|
+
wpl plugin list
|
|
26
|
+
wpl db query "SELECT * FROM wp_users"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Verify configuration**:
|
|
30
|
+
```bash
|
|
31
|
+
echo $WP_LOCAL_SITE # Should show UUID like: -hJRW0lQL
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## How It Works
|
|
35
|
+
|
|
36
|
+
1. **Kitty integration**: `$WP_LOCAL_SITE` env var set by Kitty config (or `.wp-local` file fallback)
|
|
37
|
+
2. **Isolated execution**: Each wp command runs in subprocess with Local WP environment sourced
|
|
38
|
+
3. **Clean main session**: Claude Code tab environment unaffected (MCPs work normally)
|
|
39
|
+
4. **Friendly names**: Optional mapping via `~/.claude/wp-local-sites.json`
|
|
40
|
+
|
|
41
|
+
**Priority order:**
|
|
42
|
+
1. `$WP_LOCAL_SITE` environment variable (Kitty terminal integration)
|
|
43
|
+
2. `.wp-local` file (project-specific override)
|
|
44
|
+
3. Error if neither configured
|
|
45
|
+
|
|
46
|
+
## Common Commands
|
|
47
|
+
|
|
48
|
+
### Database Operations
|
|
49
|
+
`wp db query <sql>` · `wp db export [file]` · `wp db import <file>` · `wp search-replace <old> <new> [table...]`
|
|
50
|
+
```bash
|
|
51
|
+
wpl db query "SELECT * FROM wp_users"
|
|
52
|
+
wpl db export dump.sql
|
|
53
|
+
wpl db import dump.sql
|
|
54
|
+
wpl search-replace 'old.com' 'new.com' --dry-run
|
|
55
|
+
wpl search-replace 'old.com' 'new.com' --all-tables
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Plugin Management
|
|
59
|
+
`wp plugin list` · `wp plugin activate <plugin>` · `wp plugin deactivate <plugin>` · `wp plugin install <plugin> [--activate]`
|
|
60
|
+
```bash
|
|
61
|
+
wpl plugin list
|
|
62
|
+
wpl plugin list --status=active --format=json
|
|
63
|
+
wpl plugin activate my-plugin
|
|
64
|
+
wpl plugin deactivate my-plugin
|
|
65
|
+
wpl plugin install contact-form-7 --activate
|
|
66
|
+
wpl plugin is-installed woocommerce && echo "yes"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### User Operations
|
|
70
|
+
`wp user list` · `wp user create <login> <email> [--role=<role>]` · `wp user update <user> [--field=value]`
|
|
71
|
+
```bash
|
|
72
|
+
wpl user list
|
|
73
|
+
wpl user list --role=administrator --format=table
|
|
74
|
+
wpl user create testuser test@example.com --role=editor
|
|
75
|
+
wpl user update 1 --display_name="Admin User"
|
|
76
|
+
wpl user add-role 2 editor
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Theme Operations
|
|
80
|
+
`wp theme list` · `wp theme activate <theme>` · `wp theme install <theme>`
|
|
81
|
+
```bash
|
|
82
|
+
wpl theme list
|
|
83
|
+
wpl theme activate twentytwentyfour
|
|
84
|
+
wpl theme status flavor
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Cache & Transients
|
|
88
|
+
`wp cache flush` · `wp transient delete --all` · `wp transient get <key>`
|
|
89
|
+
```bash
|
|
90
|
+
wpl cache flush
|
|
91
|
+
wpl transient delete --all
|
|
92
|
+
wpl transient get my_transient_key
|
|
93
|
+
wpl transient list --format=table
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Options
|
|
97
|
+
`wp option get <key>` · `wp option update <key> <value>` · `wp option list [--search=<pattern>]`
|
|
98
|
+
```bash
|
|
99
|
+
wpl option get siteurl
|
|
100
|
+
wpl option update blogname "New Site Name"
|
|
101
|
+
wpl option list --search="woocommerce_*" --format=table
|
|
102
|
+
wpl option delete my_old_option
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Post & Content
|
|
106
|
+
`wp post list [--post_type=<type>]` · `wp post create` · `wp post update <id>` · `wp post delete <id>`
|
|
107
|
+
```bash
|
|
108
|
+
wpl post list --post_type=page --format=table
|
|
109
|
+
wpl post list --post_status=draft --fields=ID,post_title
|
|
110
|
+
wpl post create --post_type=post --post_title="Test" --post_status=publish
|
|
111
|
+
wpl post update 42 --post_title="Updated Title"
|
|
112
|
+
wpl post delete 42 --force
|
|
113
|
+
wpl post meta get 42 _thumbnail_id
|
|
114
|
+
wpl post meta update 42 custom_field "new value"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Taxonomy & Terms
|
|
118
|
+
`wp term list <taxonomy>` · `wp term create <taxonomy> <term>` · `wp term update <taxonomy> <term-id>`
|
|
119
|
+
```bash
|
|
120
|
+
wpl term list category --format=table
|
|
121
|
+
wpl term create category "New Category" --slug=new-category
|
|
122
|
+
wpl term update category 5 --name="Renamed"
|
|
123
|
+
wpl term delete category 5
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Menu
|
|
127
|
+
`wp menu list` · `wp menu item list <menu>` · `wp menu item add-post <menu> <post-id>`
|
|
128
|
+
```bash
|
|
129
|
+
wpl menu list --format=table
|
|
130
|
+
wpl menu item list primary-menu
|
|
131
|
+
wpl menu item add-post primary-menu 42
|
|
132
|
+
wpl menu item add-custom primary-menu "Link" https://example.com
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Rewrite Rules
|
|
136
|
+
`wp rewrite flush` · `wp rewrite list` · `wp rewrite structure <structure>`
|
|
137
|
+
```bash
|
|
138
|
+
wpl rewrite flush
|
|
139
|
+
wpl rewrite list --format=csv
|
|
140
|
+
wpl rewrite structure '/%postname%/'
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Scaffold
|
|
144
|
+
`wp scaffold plugin <slug>` · `wp scaffold child-theme <slug>` · `wp scaffold post-type <slug>`
|
|
145
|
+
```bash
|
|
146
|
+
wpl scaffold plugin my-plugin --plugin_name="My Plugin"
|
|
147
|
+
wpl scaffold post-type product --plugin=my-plugin
|
|
148
|
+
wpl scaffold taxonomy genre --post_types=product --plugin=my-plugin
|
|
149
|
+
wpl scaffold child-theme flavor-child --parent_theme=flavor
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Eval & Shell
|
|
153
|
+
`wp eval <code>` · `wp eval-file <file>` · `wp shell`
|
|
154
|
+
```bash
|
|
155
|
+
wpl eval "echo home_url();"
|
|
156
|
+
wpl eval "var_dump(wp_get_current_user());"
|
|
157
|
+
wpl eval "echo get_option('active_plugins') | print_r;"
|
|
158
|
+
wpl eval-file test-script.php
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Global Flags
|
|
162
|
+
|
|
163
|
+
These flags work with most WP-CLI commands:
|
|
164
|
+
|
|
165
|
+
| Flag | Description |
|
|
166
|
+
|---|---|
|
|
167
|
+
| `--format=<format>` | Output: `table`, `csv`, `json`, `yaml`, `count`, `ids` |
|
|
168
|
+
| `--fields=<fields>` | Comma-separated columns to display |
|
|
169
|
+
| `--quiet` | Suppress informational messages |
|
|
170
|
+
| `--skip-themes` | Skip loading themes (faster execution) |
|
|
171
|
+
| `--skip-plugins` | Skip loading all plugins (debug conflicts) |
|
|
172
|
+
| `--skip-plugins=<plugin>` | Skip loading specific plugin |
|
|
173
|
+
| `--debug` | Show debug output |
|
|
174
|
+
| `--user=<id\|login>` | Run command as specific user |
|
|
175
|
+
|
|
176
|
+
## Finding More Commands
|
|
177
|
+
|
|
178
|
+
The 12 categories above cover ~90% of daily local dev usage. For everything else:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Browse all available commands
|
|
182
|
+
wpl help
|
|
183
|
+
|
|
184
|
+
# Get detailed help for a command group
|
|
185
|
+
wpl help plugin
|
|
186
|
+
wpl help post
|
|
187
|
+
|
|
188
|
+
# Get help for a specific subcommand
|
|
189
|
+
wpl help plugin install
|
|
190
|
+
wpl help post list
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
See [`references/wp-cli-reference.md`](references/wp-cli-reference.md) for a comprehensive reference covering 20+ command groups including core, cron, media, comment, role/cap, config, widget, sidebar, i18n, import/export, and more.
|
|
194
|
+
|
|
195
|
+
## Configuration
|
|
196
|
+
|
|
197
|
+
See [`references/configuration.md`](references/configuration.md) for:
|
|
198
|
+
- **Recommended**: Kitty terminal integration with `$WP_LOCAL_SITE`
|
|
199
|
+
- **Alternative**: Creating `.wp-local` file for project-specific override
|
|
200
|
+
- Finding site UUIDs
|
|
201
|
+
- Setting up friendly name mapping
|
|
202
|
+
- Shell alias setup
|
|
203
|
+
- Troubleshooting
|
|
204
|
+
|
|
205
|
+
**Quick Kitty Config**:
|
|
206
|
+
Modify Claude Code tab in `/home/eric/kitty/configs/[site].conf`:
|
|
207
|
+
```conf
|
|
208
|
+
launch bash -c "export WP_LOCAL_SITE='UUID'; exec bash"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Integration
|
|
212
|
+
|
|
213
|
+
**With php-fp-wordpress**:
|
|
214
|
+
- Test plugins during development
|
|
215
|
+
- Verify security functions
|
|
216
|
+
- Check database operations
|
|
217
|
+
|
|
218
|
+
**With js-fp-wordpress**:
|
|
219
|
+
- Test script enqueuing
|
|
220
|
+
- Verify AJAX endpoints
|
|
221
|
+
- Check jQuery availability
|
|
222
|
+
|
|
223
|
+
Example workflow:
|
|
224
|
+
```bash
|
|
225
|
+
# 1. Develop plugin with php-fp-wordpress patterns
|
|
226
|
+
# 2. Test with wp-local
|
|
227
|
+
wpl plugin activate my-new-plugin
|
|
228
|
+
wpl eval "var_dump(current_user_can('edit_posts'));"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Why This Approach?
|
|
232
|
+
|
|
233
|
+
**Problem**: Local WP environment breaks MCP servers when sourced in main session.
|
|
234
|
+
|
|
235
|
+
**Solution**: Bash subprocess isolation:
|
|
236
|
+
- Main session stays clean → MCPs work
|
|
237
|
+
- Each wp command gets proper environment → wp works
|
|
238
|
+
- No persistent environment pollution
|
|
239
|
+
- Simple, native Unix pattern
|
|
240
|
+
|
|
241
|
+
## Quality Gates
|
|
242
|
+
|
|
243
|
+
Before running destructive commands:
|
|
244
|
+
- ✅ Correct site (.wp-local points to intended site)
|
|
245
|
+
- ✅ Backup if needed (database modifications)
|
|
246
|
+
- ✅ Site running (Local WP app)
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# WP-Local Configuration Guide
|
|
2
|
+
|
|
3
|
+
## Recommended: Kitty Terminal Integration
|
|
4
|
+
|
|
5
|
+
### 1. Modify Kitty Configs
|
|
6
|
+
|
|
7
|
+
Update your site-specific Kitty configs to set `$WP_LOCAL_SITE` for Claude Code tab.
|
|
8
|
+
|
|
9
|
+
**File**: `/home/eric/kitty/configs/imanetwork.conf`
|
|
10
|
+
|
|
11
|
+
**Before**:
|
|
12
|
+
```conf
|
|
13
|
+
# Claude Code tab (PRIMARY)
|
|
14
|
+
new_tab "Claude Code"
|
|
15
|
+
cd /home/eric/Local Sites/imanetwork/app/public
|
|
16
|
+
layout tall
|
|
17
|
+
launch bash -c "source ~/kitty/load-localwp-env.sh imanetwork; exec bash"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**After**:
|
|
21
|
+
```conf
|
|
22
|
+
# Claude Code tab (PRIMARY) - Clean env for MCPs + WP_LOCAL_SITE for wp-local
|
|
23
|
+
new_tab "Claude Code"
|
|
24
|
+
cd /home/eric/Local Sites/imanetwork/app/public
|
|
25
|
+
layout tall
|
|
26
|
+
launch bash -c "export WP_LOCAL_SITE='-hJRW0lQL'; exec bash"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Why this works:**
|
|
30
|
+
- Claude Code tab has clean environment → MCP servers work
|
|
31
|
+
- Claude Code tab has `$WP_LOCAL_SITE` set → wp-local skill finds the site
|
|
32
|
+
- Other tabs (WP CLI, Development, etc.) keep full Local WP environment → direct wp works
|
|
33
|
+
|
|
34
|
+
### 2. Site UUID Mapping
|
|
35
|
+
|
|
36
|
+
Your existing sites:
|
|
37
|
+
```
|
|
38
|
+
-hJRW0lQL → imanetwork
|
|
39
|
+
JfZ8r8eL0 → imabloglc
|
|
40
|
+
kHOz3MCik → flcccjournal
|
|
41
|
+
klZPACFw2 → kornfeld-backup-2025-10-13
|
|
42
|
+
VpVdumzlE → kornfeld2-prod
|
|
43
|
+
19efkkzWB → journal-back-2025-10-13
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Update each Kitty config accordingly.
|
|
47
|
+
|
|
48
|
+
### 3. Reload Kitty
|
|
49
|
+
|
|
50
|
+
After updating configs:
|
|
51
|
+
1. Close all Kitty windows
|
|
52
|
+
2. Reopen Kitty with site-specific config: `kitty --session ~/kitty/configs/imanetwork.conf`
|
|
53
|
+
3. Claude Code tab should have `$WP_LOCAL_SITE` set, verify with: `echo $WP_LOCAL_SITE`
|
|
54
|
+
|
|
55
|
+
## Alternative: `.wp-local` File (Project-Specific)
|
|
56
|
+
|
|
57
|
+
### 1. Create `.wp-local` File
|
|
58
|
+
|
|
59
|
+
In your WordPress project root:
|
|
60
|
+
```bash
|
|
61
|
+
echo "19efkkzWB" > .wp-local
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Add to `.gitignore`:
|
|
65
|
+
```bash
|
|
66
|
+
echo ".wp-local" >> .gitignore
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 2. Finding Site UUIDs
|
|
70
|
+
|
|
71
|
+
**List all sites**:
|
|
72
|
+
```bash
|
|
73
|
+
ls ~/.config/Local/ssh-entry/*.sh
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Map UUIDs to site names**:
|
|
77
|
+
```bash
|
|
78
|
+
for f in ~/.config/Local/ssh-entry/*.sh; do
|
|
79
|
+
uuid=$(basename "$f" .sh)
|
|
80
|
+
site=$(grep "echo -n -e" "$f" | sed 's/.*0;//' | sed 's/ Shell.*//')
|
|
81
|
+
echo "$uuid -> $site"
|
|
82
|
+
done
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Output** (your sites):
|
|
86
|
+
```
|
|
87
|
+
19efkkzWB -> journal-back-2025-10-13
|
|
88
|
+
-hJRW0lQL -> imanetwork
|
|
89
|
+
JfZ8r8eL0 -> imabloglc
|
|
90
|
+
kHOz3MCik -> flcccjournal
|
|
91
|
+
klZPACFw2 -> kornfeld-backup-2025-10-13
|
|
92
|
+
VpVdumzlE -> kornfeld2-prod
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 3. Optional: Friendly Name Mapping
|
|
96
|
+
|
|
97
|
+
Create `~/.claude/wp-local-sites.json`:
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"journal-back": "19efkkzWB",
|
|
101
|
+
"imanetwork": "-hJRW0lQL",
|
|
102
|
+
"imabloglc": "JfZ8r8eL0",
|
|
103
|
+
"flcccjournal": "kHOz3MCik",
|
|
104
|
+
"kornfeld-backup": "klZPACFw2",
|
|
105
|
+
"kornfeld2-prod": "VpVdumzlE"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Then use friendly names in `.wp-local`:
|
|
110
|
+
```bash
|
|
111
|
+
echo "journal-back" > .wp-local
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 4. Shell Alias Setup
|
|
115
|
+
|
|
116
|
+
Add to `~/.bashrc` or `~/.zshrc`:
|
|
117
|
+
```bash
|
|
118
|
+
alias wpl='bash ~/.claude/skills/wp-local/scripts/wp-local.sh'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Reload shell:
|
|
122
|
+
```bash
|
|
123
|
+
source ~/.bashrc # or source ~/.zshrc
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Usage**:
|
|
127
|
+
```bash
|
|
128
|
+
wpl plugin list
|
|
129
|
+
wpl db query "SELECT * FROM wp_posts LIMIT 5"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Environment Variable Fallback
|
|
133
|
+
|
|
134
|
+
Alternative to `.wp-local` file:
|
|
135
|
+
```bash
|
|
136
|
+
export WP_LOCAL_SITE="19efkkzWB"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Or per-command:
|
|
140
|
+
```bash
|
|
141
|
+
WP_LOCAL_SITE="19efkkzWB" wpl plugin list
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Multi-Project Workflow
|
|
145
|
+
|
|
146
|
+
Each project has its own `.wp-local`:
|
|
147
|
+
```
|
|
148
|
+
~/projects/client-a/
|
|
149
|
+
.wp-local (contains: imanetwork)
|
|
150
|
+
|
|
151
|
+
~/projects/client-b/
|
|
152
|
+
.wp-local (contains: kornfeld2-prod)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
wp-local automatically finds correct `.wp-local` by searching upward from current directory.
|
|
156
|
+
|
|
157
|
+
## Troubleshooting
|
|
158
|
+
|
|
159
|
+
### Error: "No site configured"
|
|
160
|
+
|
|
161
|
+
**Cause**: No `.wp-local` file found and `$WP_LOCAL_SITE` not set.
|
|
162
|
+
|
|
163
|
+
**Fix**: Create `.wp-local` in project root:
|
|
164
|
+
```bash
|
|
165
|
+
echo "19efkkzWB" > .wp-local
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Error: "Local WP environment not found"
|
|
169
|
+
|
|
170
|
+
**Cause**: UUID in `.wp-local` doesn't match any script in `~/.config/Local/ssh-entry/`.
|
|
171
|
+
|
|
172
|
+
**Fix**:
|
|
173
|
+
1. Check available UUIDs:
|
|
174
|
+
```bash
|
|
175
|
+
ls ~/.config/Local/ssh-entry/*.sh
|
|
176
|
+
```
|
|
177
|
+
2. Update `.wp-local` with correct UUID
|
|
178
|
+
|
|
179
|
+
### Error: "wp: command not found"
|
|
180
|
+
|
|
181
|
+
**Cause**: Local WP environment not sourcing correctly, or site not running.
|
|
182
|
+
|
|
183
|
+
**Fix**:
|
|
184
|
+
1. Verify site is running in Local WP app
|
|
185
|
+
2. Test manual source:
|
|
186
|
+
```bash
|
|
187
|
+
source ~/.config/Local/ssh-entry/19efkkzWB.sh
|
|
188
|
+
wp --version
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Wrong site being used
|
|
192
|
+
|
|
193
|
+
**Cause**: `.wp-local` file in parent directory overriding.
|
|
194
|
+
|
|
195
|
+
**Fix**: Check for `.wp-local` files in parent directories:
|
|
196
|
+
```bash
|
|
197
|
+
find ~ -name ".wp-local" -type f
|
|
198
|
+
```
|