Skip to main content

Command Reference

Run these commands from the devkit root unless noted otherwise.

Project Setup​

/new-project​

Starts the agent-guided onboarding flow. Use it when creating or binding a LocalWP-backed project.

/new-project

The flow matches a Local site, infers a project slug, creates projects/<slug> when needed, binds it, checks it, syncs it, runs readiness checks, and records project notes.

localwp:list​

Lists LocalWP sites visible on the machine. It reads Local's own site list on macOS, Linux, and Windows; no settings are needed.

bun run localwp:list

Each line shows the site ID, name, status, domain, web root, and PHP and MySQL versions. Use this before binding when you need the exact Local site name, domain, or path.

project:create​

Creates a project from the devkit project template.

bun run project:create -- my-site

The slug must use lowercase letters, numbers, and dashes. The command fails if the project already exists.

localwp:bind​

Binds a project to one Local site.

bun run localwp:bind -- --project my-site --site "My Site"

You can also bind by site ID or web root when needed:

bun run localwp:bind -- --project my-site --site-id <local-site-id>
bun run localwp:bind -- --project my-site --web-root "/Users/me/Local Sites/my-site/app/public"

Binding writes the Local web root and target plugin path into projects/my-site/project.json.

Build and Sync​

project:check​

Checks the project runtime source before sync or packaging.

bun run project:check -- --project my-site

Run this before every sync after changing src/** or cms/**.

It also warns with OMIDE_LOOP_PRESET_ID_KEY_MISMATCH when a loop preset is stored under an ID that differs from its key, which breaks copying and re-picking the loop in the Etch builder. The migrate-legacy-project skill has the safe steps to fix it on an existing site.

localwp:sync​

Copies checked runtime plugin files into the bound Local site.

bun run localwp:sync -- --project my-site

Sync output goes to the Local site plugin path:

wp-content/plugins/oh-my-idetch

Sync reruns the project check, copies the plugin, and applies the site in WordPress. It prints how many items changed and stayed unchanged, then the site notices, such as content removed from code. Notices never fail the sync. See Daily Workflow for the output.

Move content removed from code to draft on the LocalWP site:

bun run localwp:sync -- --project my-site --retire-orphans
bun run localwp:sync -- --project my-site --retire-orphans page:slug:old-offer,post:post:launch-news

The bare flag retires every listed orphan; a comma-separated list retires only those. --retire-orphans=<list> works the same way. If any name in the list is not content removed from code, the whole selection is refused and nothing is retired. See Content Ownership.

LocalWP and WordPress Inspection​

localwp:wp​

Runs WP-CLI through Local's Site Shell environment when available.

bun run localwp:wp -- --project my-site -- plugin list
bun run localwp:wp -- --project my-site -- plugin is-active oh-my-idetch
bun run localwp:wp -- --project my-site -- option get home

If Local has not generated the shell entry, open Local, select the site, choose Open Site Shell, and run the printed fallback command manually.

localwp:doctor​

Reports project and Local site readiness.

bun run localwp:doctor -- --project my-site

It checks binding, web root availability, WP-CLI availability, WordPress environment type, synced plugin state, plugin activation, and runtime plugin status when WP-CLI works. It also reports:

  • whether the synced plugin loads, separately from WP-CLI, so a plugin that fails to load is not reported as "WP-CLI unavailable";
  • whether Etch is installed and active;
  • content on the site that the project would collide with before the first sync, an existing static front page, and a posts page;
  • duplicate plugin folders such as oh-my-idetch 2 (doctor fails when such a copy is active) and leftovers from an interrupted sync;
  • a Local site folder inside iCloud, Dropbox, OneDrive, Google Drive, or a synced Desktop or Documents folder;
  • project files that are older than the current project template, a project still on an older etch-builders version, and a missing wpml-config.xml, each pointing to the matching step of the migrate-legacy-project skill;
  • loop presets stored under an ID that differs from their key.

Doctor fails on blockers and prints the other findings as warnings.

localwp:capabilities​

Prints JSON describing active runtime capabilities.

bun run localwp:capabilities -- --project my-site

Use it before assuming Etch, OhMyEtch, AutomaticCSS, CMS fields, or WooCommerce support exists in the bound Local site.

localwp:verify​

Runs the fast read-only runtime verification after sync.

bun run localwp:verify -- --project my-site

It checks the compiled entity/resource digests, recorded ownership, required active capabilities, and the installed Builder contract, without browser E2E. Add one lightweight frontend availability check only when it is part of the task:

bun run localwp:verify -- --project my-site --path /

The path is checked against the address WordPress itself uses (its home URL), which also works with Local's "localhost" router mode. --url <full-url> checks a full address on the same origin instead. Verify prints the same site notices as sync; notices never fail it.

Devkit Updates​

devkit:update​

Plans and applies updates from a newer devkit ZIP. Always dry-run first:

bun run devkit:update -- --zip /path/to/oh-my-idetch-localwp-devkit-<version>.zip

Apply the update after reviewing the plan:

bun run devkit:update -- --zip /path/to/oh-my-idetch-localwp-devkit-<version>.zip --apply

The updater never changes projects/**, .git/**, .env*, node_modules/**, dist/**, or var/**. It updates only the devkit commands, generated agent skills and instructions, and the project template. Add --json to print the plan as JSON.

Existing projects are not updated by this command. Run localwp:doctor on each project and use the migrate-legacy-project skill; see Update Existing Projects.

Builder Authoring Queries​

Offline queries against the verified authoring knowledge of the pinned honestlydesign/etch-builders package. Use them to confirm the real builder API surface instead of guessing it.

builder:help​

Shows what an authoring capability allows:

bun run builder:help -- --intent <capability-id>

builder:component​

Looks up a component contract:

bun run builder:component -- --key <component-key>

builder:explain​

Explains a builder diagnostic code:

bun run builder:explain <diagnostic-code>

builder:escape​

Checks whether an intent has a sanctioned checked-escape path and prints its guidance:

bun run builder:escape -- --intent <capability-id>

CMS Commands​

CMS operations for the bound Local site. The project directory cms/acf-json/** is the source of truth for field groups.

cms:acf:status, cms:acf:sync, cms:acf:import, cms:acf:export​

bun run cms:acf:status -- --project my-site
bun run cms:acf:sync -- --project my-site
bun run cms:acf:import -- --project my-site
bun run cms:acf:export -- --project my-site

Report, sync, import, and export ACF field group JSON between the project and WordPress.

cms:rewrite​

Flushes WordPress rewrite rules through the checked wrapper:

bun run cms:rewrite -- --project my-site

cms:post:generate and cms:term:generate​

Generate posts and taxonomy terms for content modeling:

bun run cms:post:generate -- --project my-site
bun run cms:term:generate -- --project my-site

cms:media:import and cms:media:featured​

Import media files into WordPress and attach featured images to posts:

bun run cms:media:featured -- --project my-site -- --file=<path> --post_id=<id> [--title=<title>]

Browser Automation​

Optional. agent-browser is an open-source tool from Vercel Labs; the /new-project flow asks before installing it.

bun run browser:install
bun run browser:skills
bun run browser:skills:full

browser:install sets up the browser (it may download Chrome for Testing). browser:skills and browser:skills:full print agent-browser's own usage guide for agents.

Packaging​

build:zip -- --project​

Checks and packages one project as a production plugin ZIP.

bun run build:zip -- --project my-site

The ZIP is written under:

projects/my-site/dist/oh-my-idetch-<version>.zip

The command prints the ZIP path and its deploy digest. Use this ZIP as the deployable project plugin artifact. Add --check-only to run only the project check without writing a ZIP.

See Ship a Plugin ZIP for what the ZIP contains and how to take it live.

On a Live Site​

The project plugin adds a WP-CLI command on the staging or production server. Run it with that server's own wp, not through localwp:wp.

wp oh-my-idetch registration status​

Shows whether the deployed build is registered.

wp oh-my-idetch registration status

current: true means the uploaded build is registered. backing_off: true means the last attempt failed and the site waits 15 minutes before trying again; last_failure lists the failing items. last_notices lists the notices of the last registration, such as content removed from code.

wp oh-my-idetch registration retry​

Registers the deployed build again right away instead of waiting for the 15-minute back-off. Use it after you fixed the cause on the site, for example by removing a conflicting page.

wp oh-my-idetch registration retry