@local-labs-jpollock/local-cli 0.0.3 → 0.0.5
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/addon-dist/lib/main/index.js +12 -10
- package/addon-dist/lib/main/mcp/tools/exportDatabase.js +1 -1
- package/addon-dist/lib/main/mcp/tools/helpers.js +2 -7
- package/addon-dist/lib/main/mcp/tools/importDatabase.js +1 -1
- package/addon-dist/lib/main/mcp/tools/renameSite.js +1 -1
- package/addon-dist/lib/main/mcp/tools/wpCli.js +1 -1
- package/addon-dist/lib/renderer/index.js +3 -2
- package/addon-dist/package.json +1 -1
- package/lib/bootstrap/index.js +1 -1
- package/lib/client/GraphQLClient.js +1 -1
- package/lib/index.js +69 -26
- package/package.json +1 -1
- package/skill/SKILL.md +40 -2
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lwp
|
|
3
|
-
description: Manage Local WordPress development sites using the lwp CLI. Use when the user asks about WordPress sites, Local development, starting/stopping sites, running WP-CLI commands, or managing local WordPress environments.
|
|
3
|
+
description: Manage Local WordPress development sites using the lwp CLI. Use when the user asks about WordPress sites, Local development, starting/stopping sites, running WP-CLI commands, or managing local WordPress environments. Local is a free development tool built and supported by WP Engine.
|
|
4
4
|
allowed-tools: Bash(lwp *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Local CLI (lwp)
|
|
8
8
|
|
|
9
|
-
The `lwp` command manages WordPress sites in [Local](https://localwp.com), a local WordPress development environment.
|
|
9
|
+
The `lwp` command manages WordPress sites in [Local](https://localwp.com), a local WordPress development environment built and supported by WP Engine.
|
|
10
10
|
|
|
11
11
|
## Prerequisites
|
|
12
12
|
|
|
@@ -45,6 +45,21 @@ lwp wp <site> cache flush
|
|
|
45
45
|
lwp wp <site> search-replace 'old' 'new' --dry-run
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
**Plugin-provided CLI commands** (e.g., `wp migrate`):
|
|
49
|
+
|
|
50
|
+
By default, plugins are skipped for safety. Use `--with-plugins` to load them.
|
|
51
|
+
|
|
52
|
+
**Important:** Options must come BEFORE the site name:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Correct - option before site:
|
|
56
|
+
lwp wp --with-plugins <site> migrate push <target>
|
|
57
|
+
lwp wp --with-plugins <site> migrate pull <source>
|
|
58
|
+
|
|
59
|
+
# Wrong - option will be passed to WP-CLI:
|
|
60
|
+
lwp wp <site> --with-plugins migrate push # DON'T DO THIS
|
|
61
|
+
```
|
|
62
|
+
|
|
48
63
|
### Database Operations
|
|
49
64
|
|
|
50
65
|
```bash
|
|
@@ -129,6 +144,29 @@ lwp sites list --json | jq '.[].name'
|
|
|
129
144
|
| "Timed out waiting for Local" | Start the Local application |
|
|
130
145
|
| "Site not found" | Check site name with `lwp sites list` |
|
|
131
146
|
|
|
147
|
+
## Destructive Commands - Confirm First
|
|
148
|
+
|
|
149
|
+
**Always confirm with the user before running these commands:**
|
|
150
|
+
|
|
151
|
+
| Command | Risk |
|
|
152
|
+
|---------|------|
|
|
153
|
+
| `lwp sites delete <site>` | Permanently deletes site and files |
|
|
154
|
+
| `lwp db import <site> <file>` | Overwrites entire database |
|
|
155
|
+
| `lwp wpe push <site>` | Pushes to production WP Engine site |
|
|
156
|
+
| `lwp backups restore <site>` | Overwrites site from backup |
|
|
157
|
+
| `lwp wp <site> db reset` | Drops all database tables |
|
|
158
|
+
| `lwp wp <site> search-replace` | Modifies database content |
|
|
159
|
+
|
|
160
|
+
**Safe practices:**
|
|
161
|
+
|
|
162
|
+
1. **Export first** - Always run `lwp db export <site>` before destructive operations
|
|
163
|
+
2. **Dry run** - Use `--dry-run` when available to preview changes:
|
|
164
|
+
```bash
|
|
165
|
+
lwp wp <site> search-replace 'old' 'new' --dry-run
|
|
166
|
+
```
|
|
167
|
+
3. **Confirm intent** - Ask "Are you sure you want to delete/overwrite X?" before proceeding
|
|
168
|
+
4. **Never auto-confirm** - Do not add `-y` or `--yes` flags without explicit user approval
|
|
169
|
+
|
|
132
170
|
## Tips
|
|
133
171
|
|
|
134
172
|
1. Always check site status before running WP-CLI commands
|