# LocalWP Devkit

> Build code-owned Etch sites in LocalWP with a reusable Oh My IDEtch workspace.

# LocalWP Devkit

The Oh My IDEtch LocalWP Devkit is a reusable workspace for building code-owned Etch sites against LocalWP. Local owns WordPress, PHP, MySQL, routing, SSL, Mailpit, and Site Shell. The devkit owns project source, agent instructions, verification commands, sync, WP-CLI wrappers, and deployable plugin ZIPs.

Start by downloading the LocalWP devkit ZIP from your [OhMyEtch account](https://ohmyetch.com/my-account/):

```text
oh-my-idetch-localwp-devkit-<version>.zip
```

Extract it once, keep it as a long-lived workspace, and create one project folder per LocalWP site.

## Mental Model

The devkit has two surfaces:

| Surface | Purpose |
| --- | --- |
| Devkit root | Shared commands, generated agent instructions, project templates, and package scripts. Open this folder in your agent. |
| `projects/<slug>` | The source of truth for one website: PHP site builders, CMS JSON, project notes, tests, reports, and project ZIP output. |

The Local site receives only a synced runtime plugin copy at:

```text
wp-content/plugins/oh-my-idetch
```

Do not edit that synced plugin copy as your source. Edit the project under `projects/<slug>`, check it, sync it, then verify in LocalWP.

## What Is Not Bundled

The devkit does not include premium or user-owned runtime files. Install these in your own Local site when your project needs them:

| Dependency | Ownership |
| --- | --- |
| Etch | User-owned runtime plugin. |
| Etch Theme | User-owned theme/runtime dependency. |
| OhMyEtch | User-owned component plugin. |
| AutomaticCSS | User-owned styling system. |
| ACF Pro or other CMS field plugins | User-owned CMS dependency. |
| Local Blueprints | Private user-created Local artifacts, not Oh My IDEtch release artifacts. |

Use `bun run localwp:doctor -- --project <slug>` and `bun run localwp:capabilities -- --project <slug>` before assuming those runtime capabilities are available.

## The Core Loop

Every project change follows the same order:

```sh
bun run project:check -- --project <slug>
bun run localwp:sync -- --project <slug>
```

After sync, verify against the bound LocalWP site with the browser, WordPress admin, or WP-CLI:

```sh
bun run localwp:wp -- --project <slug> -- plugin list
```

The check must run before sync. This keeps the Local site from receiving unchecked project source.

## Start Here

1. [Install and Prepare](/oh-my-idetch/localwp-devkit/install-and-prepare) explains what to install before opening the devkit in an agent.
2. [First Project](/oh-my-idetch/localwp-devkit/first-project) walks through `/new-project` and manual setup commands.
3. [Daily Workflow](/oh-my-idetch/localwp-devkit/daily-workflow) covers the build, check, sync, and verify loop.
4. [Command Reference](/oh-my-idetch/localwp-devkit/command-reference) lists every devkit command.
5. [Troubleshooting](/oh-my-idetch/localwp-devkit/troubleshooting) covers the common blockers.
6. [Ship a Plugin ZIP](/oh-my-idetch/localwp-devkit/ship-plugin-zip) explains the production ZIP path.
