First Project
Start a LocalWP-backed project from the devkit root. The easiest path is to let your agent run the built-in onboarding workflow.
Recommended Agent Flow
Open the devkit root in your agent and send:
/new-project
The agent should ask for only the missing setup details:
| Input | How it is used |
|---|---|
| Local site name | The agent matches it against LocalWP sites. |
| Build brief | The agent records what the site should become. |
| Project slug | Usually inferred from the Local site name. The agent asks only if the inferred slug is invalid, already exists, ambiguous, or you want a custom one. |
| Fresh or populated site | Whether the Local site already has pages, templates, a static front page, or a posts page. A populated site needs the extra steps below before the first sync. |
| Browser automation choice | Optional. Used for page previews and screenshots after sync when not already installed. |
If the Local site does not exist, create it in Local first. The devkit does not create Local sites, ship premium plugins, provide licenses, or generate Local Blueprints for you.
What /new-project Does
The workflow creates and binds a project, checks it, looks for content collisions before the first sync, then syncs, activates, and verifies:
bun run localwp:list
bun run project:create -- <slug>
bun run localwp:bind -- --project <slug> --site "<Local site name>"
bun run project:check -- --project <slug>
bun run localwp:doctor -- --project <slug>
bun run localwp:sync -- --project <slug>
bun run localwp:wp -- --project <slug> -- plugin activate oh-my-idetch
bun run localwp:verify -- --project <slug>
bun run localwp:doctor -- --project <slug>
bun run localwp:capabilities -- --project <slug>
If the project's PHPStan dependencies are not installed yet, the agent runs composer install --working-dir=projects/<slug> before the first check.
If WP-CLI is unavailable because Local has not generated a Site Shell entry, open Local, choose the site, select Open Site Shell, and rerun the command or activate the plugin in WordPress admin.
Manual Setup
Use the manual commands when you do not want the agent onboarding flow:
bun run localwp:list
Create the project:
bun run project:create -- my-site
Bind it to a Local site:
bun run localwp:bind -- --project my-site --site "My Site"
Run the first check, then let doctor look for content the project would collide with:
bun run project:check -- --project my-site
bun run localwp:doctor -- --project my-site
On a fresh site, doctor prints Content collisions: none. Any collision or front page warning means the site already has content: follow Binding a Site That Already Has Content before you sync.
Sync, activate the plugin, and verify:
bun run localwp:sync -- --project my-site
bun run localwp:wp -- --project my-site -- plugin activate oh-my-idetch
bun run localwp:verify -- --project my-site
Inspect readiness and installed capabilities:
bun run localwp:doctor -- --project my-site
bun run localwp:capabilities -- --project my-site
Binding a Site That Already Has Content
project:create scaffolds a starter demo: home and blog pages, index and single-post templates, a site header and other starter components, and starter patterns. The first sync creates those on the bound site. On a site that already has content, some of them can match pages or templates that exist:
- Export the site in the Local app before the first sync.
- Run
bun run localwp:doctor -- --project <slug>. Each collision line names the project entry (for examplepage:slug:homeortemplate:slug:index) and the existing post it matches. - Decide per collision:
- Keep the existing content as the site's own. Remove that starter entry from the project's site registry, or give the project page or template a slug the site does not use yet.
- Bring it under code. Add
adopt_existing()to that page or template. Addhand_over_after_create()as well when its current content must stay as it is. See Content Ownership.
- Front page and posts page. If doctor warns that the site already has a static front page, remove the home page from the registry when that front page must stay; otherwise the first sync points the front page at the project home page. If doctor warns about a posts page, change the project's reading settings before syncing; otherwise every sync clears that setting.
- Rerun
project:checkandlocalwp:doctoruntil doctor printsContent collisions: none, then sync.
Sync never overwrites content it did not create. Without adopt_existing(), a matching page stops the sync with ETCH_SITE_PERSISTENCE_CONFLICT and nothing is overwritten.
Project Files
After setup, use the project directory as the site source:
projects/my-site/
project.json
AGENTS.project.md
oh-my-idetch.php
src/
cms/
examples/
tests/
tools/
var/
wpml-config.xml
The template also ships composer.json and composer.lock (pinned to etch-builders 2.1.1), phpstan.neon.dist, and phpunit.xml.dist for project-local PHP tooling, plus runnable typed-builder examples under examples/builders/. wpml-config.xml keeps WPML from copying the Builder's ownership details to translations; it ships in the plugin.
Keep project-specific brief notes, constraints, runtime expectations, and Local binding notes in projects/my-site/AGENTS.project.md so future agent sessions start with the right context.