Create
agent-local create NAME [--domain d] [--php v] [--repo url]
# a WordPress 8.4 site on a custom domain
agent-local create mysite --domain mysite.example --php 8.4
# create from a fresh git repo, ready for a theme checkout
agent-local create mysite --repo git@github.com:me/mytheme.gitDownloads WordPress, provisions the database, writes wp-config.php, registers the hosts entry, issues and trusts the certificate, installs wp-cli caches. Prints the URL and admin credentials.
Attach
agent-local attach ~/Sites/existing --name existing
# a Laravel checkout: public/ is found and served
agent-local attach ~/Sites/shop --domain shop.testServes a directory that already exists. Your files are never touched, and the site gets its own domain, certificate and empty database. The app is detected from what is in the docroot and shown in the site record as its kind:
| Kind | Detected by | What attach does |
|---|---|---|
| WordPress | wp-load.php | keeps an existing wp-config.php; writes one only when core is there with none |
| Joomla | administrator/ + configuration.php | prints the database credentials to paste into configuration.php |
| Laravel | artisan | serves public/; prints credentials for .env |
| Drupal | core/lib/Drupal.php | serves the docroot; prints credentials for settings.php |
| PHP | an index.php, nothing else recognised | serves it front-controller style: real files first, then index.php |
| empty | nothing yet | registers the site; re-detected the moment files arrive |
The serving layer is the same for every kind. What differs is the toolkit: wp, wpdebug, wpconst, login, wp_info and the URL-pin checks in doctor are WordPress-only and say so for another kind rather than failing on a missing wp-config.php. checkpoint on a non-WordPress site saves the whole docroot rather than wp-content. The media fallback watches the app's own uploads path — /images/ for Joomla, /sites/default/files/ for Drupal.
create and import are WordPress-only. For another app, attach the directory and load its database with agent-local db SLUG import dump.sql — the WordPress URL rewrite is skipped for other kinds, so the dump lands as-is.
Lifecycle
| Command | What it does |
|---|---|
agent-local list | every site, its PHP version, state and URL |
agent-local open SLUG | the site (or open admin SLUG — wp-admin) |
agent-local start · stop · restart SLUG | control one site; starting a running site is a no-op |
agent-local delete SLUG --yes | remove it — a database snapshot is saved first; --keep-files / --keep-db opt out of either |
agent-local resolve [PATH] | which site owns a path (default: the working directory) |
PHP versions
agent-local php SLUG 8.3 # live switch, pool restarted
agent-local install php 8.2 # or install a runtime by handEach site runs its own pool, so versions are per-site and switching is live. Installing a version agent-local does not have yet reaches Homebrew for it — including releases Homebrew has since dropped, via a versioned tap.
Deleting an imported site never touches files outside ~/.agent-local: in-place imports are detached and the original wp-config.php restored from the .bak.