WPXen · Case study Local WordPress on Homebrew, with AI agents beside every site.
A native macOS menu-bar app that supervises Homebrew nginx, PHP-FPM, MySQL and Mailpit for .test sites. Beside each site it hosts agent terminals, a live chat view, a file editor, a git diff pane and a browser.
Week 15 · 65 commitsPer-site PHP and HTTPS without sudo, the Projects sidebar, agent status, keep-awake, the Floating Workspace and GitHub Tasks.
02 — Platform
Two processes, one strict bridge.
Homebrew, no bundled binaries
Services stop when the app quits
The renderer kept out of Node
Agent sessions with no daemon
Data kept across two renames
Electron main: Node access lives here: wrappers for brew, mysql, wp, mkcert, git and gh, the service supervisor, and each agent’s node-pty with an in-memory ring buffer. Sessions survive the window hiding to the tray, with no daemon left behind after quit.03 — Key decisions
Four pieces of work that made the app.
The first two weeks
Supervised services, magic login, .wpress imports
I replaced brew services with procman.cjs, a supervisor with crash restart, backoff and orphan clean-up after a hard crash. A must-use plugin gives one-click admin, and a pure-Node reader imports All-in-One WP Migration backups.
procman.cjs · mu-plugin · .wpress
git log · the first two weeks
Day 1Electron app, CLAUDE.md, MySQL root passwordDay 7PHP 7.4 and 8.0, per-site HTTPS, phpMyAdminDay 7Mailpit and app-managed servicesDay 10Onboarding, magic login, export, import, blueprintsDay 12.wpress reader, plugins and themes restored✓ nginx, PHP-FPM, MySQL and Mailpit under one supervisor
The agent workspace
Agent sessions in the main process, no daemon
Each site runs several AI CLI sessions on node-pty, beside a file tree, a CodeMirror 6 editor, a git Changes pane and an in-app browser. A decision record keeps the ptys in Electron’s main process rather than a background daemon.
node-pty · xterm.js · CodeMirror 6
A background daemon
Superset-style daemon hosts the ptys
Left running after the app quits
Written down as a decision record ↓
Electron’s main process
A node-pty per session, keyed by its id
Survives the window hiding to the tray
Replays an in-memory ring buffer on reopen
Quitting confirms, then tears sessions down
Five point releases
Projects, GitHub Tasks and split panes
A Projects sidebar, keep-awake, an always-on-top Floating Workspace, GitHub Tasks over the gh CLI, and recursive split panes with session handoff. A status parser reads title glyphs, bells and exit codes from the pty to flag agents that need you.
gh CLI · split panes · handoff
Start → checks out an issue or pull request branch and launches an agent on it.
The last stretch
Live transcripts for three agents
A per-pane toggle swaps the terminal for a chat view that tails the agent’s own transcript file while typing back into its TUI. Subagents drafted it against invented fixtures, so I checked every ticket against real transcripts and fixed what broke.
Row IDs from byte offsets, duplicate events dropped
Antigravity
antigravity-cli/brain
Result steps, paired tool calls, diffs
04 — Setup
An evening of installs, turned into one app.
On a new Mac, a working WordPress site usually means a list of installs, or MAMP, XAMPP, Herd or Valet on top. Flip the switch to see what onboarding does instead.
Step 01Open WPXenMissing Homebrew? It opens the official installer and carries on once it’s done.
Step 02Let onboarding install the stacknginx, PHP, MySQL, WP-CLI and .test domains, in one pass with a progress log.
Step 03Click Add SiteWordPress, its database and yoursite.test are ready; phpMyAdmin, mail and HTTPS set themselves up on first use.
Both lists come from the WPXen product page and its onboarding. Nothing here was timed.
Onboarding, sites, PHP versions, mail, the agent workspace and GitHub Tasks.
06 — Behind the build
One developer, Claude Code as pair.
264 / 292commits carry a Claude co-author trailer. CLAUDE.md, AGENTS.md and CONTEXT.md set the process split and a four-step CI gate.
With Claude Code (264)Solo (28)
I directed and reviewed
Product scope, the two renames and the architecture decisions, the UI migration and the Electron and React upgrades, spec-versus-code reviews, the security fixes and every release.
Claude Code and subagents drafted
The service wrappers, ticket implementations, renderer components and pure helpers, the Vitest suites, and research comparing WPXen with similar tools.
Checked against real transcripts
Two review rounds on the chat view closed an arbitrary-file read in the image IPC and fixed decoders that left every Claude user turn blank or showed no Codex rows. A test now runs every decoder over the machine’s real transcripts, taking the suite from 1,168 to 1,229 passing tests.
PHP and HTTPS per site, without sudo
A Finder-launched app has no terminal for sudo, so mkcert trusts its root CA in the login keychain. One supervised php-fpm per installed version listens on its own socket, and the agent terminals get the site’s PHP on their PATH.
Vitest without Electron
Loading electron at module scope under plain Node triggers a ~100 MB binary download, so a ratchet test forbids it outside five entry files. Main-process services take their dependencies through __setDeps() seams instead.
One way out of the app
Every external link goes through one function that refuses anything but http: and https:. In-app webviews apply the same check when a page navigates or redirects.
Two renames, nothing lost
The app shipped as WPHerd, then WPDevPilot, then WPXen. First launch migrates app data and blueprints, and replaces the old ini, mu-plugin and sudoers files in place.
Next on a branch: the 3D Agent Office
A native port of my Agent Verse project, on React 19 and React Three Fiber, with its scanner and tailers in the main process. It swaps localhost bearer tokens for an owner-only Unix socket, and its branch passes 1,458 tests.
Next on a branch: remote access and a phone app
A localhost server behind a supervised cloudflared tunnel, QR pairing over an end-to-end encrypted WebSocket, and an Expo React Native companion. Two review rounds fixed reconnects, a replayable handshake and sockets that outlived a revoked device.
Electron 43ReactViteTailwind CSSnode-ptyxterm.jsCodeMirror 6Three.js / R3FHomebrewVitestClaude Code
Non-merge commits on develop. Claude Code commits were made in my sessions and count as mine; test counts are passing Vitest tests. Commit counts measure activity, not effort.