-
Notifications
You must be signed in to change notification settings - Fork 372
Open
Description
Add an interactive start command that simplifies the low-level interface of the new CLI.
npx @wp-playground/cli start opens a 6-item menu on the terminal
serve-wp- Ask for the folder where the site is saved. Default to
./if it seems like a site - Ask for the PHP version; the default is the latest version
- Alias of
@wp-playground/cli server --mount-before-install=__CHOSEN_FOLDER__:/wordpress --skip-wordpress-setup --skip-sqlite-setup --php=__PHP_VERSION__ - wp-now alias of
npx @wp-now/wp-now start --path=__CHOSEN_FOLDER__ --skip-browser
- Ask for the folder where the site is saved. Default to
plugin- Ask for the folder where the plugin is saved. Default to
./if it seems like a plugin - Alias of
@wp-playground/cli server --mount-before-install=__FOLDER__:/wordpress/wp-content/plugins - wp-now alias of
npx @wp-now/wp-now start --path=__CHOSEN_FOLDER__ --skip-browser
- Ask for the folder where the plugin is saved. Default to
theme- Ask for the folder where the plugin is saved. Default to
./if it seems like a theme - Alias of
@wp-playground/cli server --mount-before-install=__FOLDER__:/wordpress/wp-content/themes - wp-now alias of
npx @wp-now/wp-now start --path=__CHOSEN_FOLDER__ --skip-browser
- Ask for the folder where the plugin is saved. Default to
blueprint- Ask for the blueprint file name
- Alias for
@wp-playground/cli run-blueprint --blueprint=__FILENAME__ - wp-now alias of
npx @wp-now/wp-now start --blueprint=__FILENAME__
create-site- Ask for the folder where the site is saved
- Ask for WordPress version, the default is the latest version
- Ask for the PHP version; the default is the latest version
- Alias of
@wp-playground/cli server --mount-before-install=__CHOSEN_FOLDER__:/wordpress --wp=__WP_VERSION__ --php=__PHP_VERSION__
build-snapshot- Ask for the blueprint file name
- Alias for
@wp-playground/cli build-snapshot --blueprint=__CHOSEN_FILENAME__
This way, if the user is always pressing Enter on the keyboard, it will serve the current folder as a site. This is what happens when you run npx @wp-now/wp-now start inside a WordPress folder.
Additional proposals
- If the CLI is run in a terminal with
TERM_DEV="dumb"environment variable, it's an alias of@wp-playground/cli server __ARGS__ - We can potentially select 1, 2, or 3 if the resolution logic of
expandAutoMountsreturns site, plugin, and others. However, it may appear as a bug. - We can set
createandinitas aliases - The CLI can ask for additional advanced properties like "Want to specify other advanced options? [yN]" or similar to let the user pass what it has not passed already by arguments in the initial call.