svandragt / wmm

Sane WordPress local environment
0 stars 0 forks source link

cli wrapper? #21

Open svandragt opened 1 year ago

svandragt commented 1 year ago

If your usecase is to create a project base instead of working on a plugin/theme inside this generalised environment then we would benefit from a cli wrapper.

something like

wmm launch [mysite]
wmm reset [mysite]
cameronterry commented 1 year ago

Treat this comment as a brain dump of possible options for a CLI tool for WMM. Some may apply and others may not.


Basics for spinning up environments and then turning them on and off.

wmm create
wmm launch
wmm reset
wmm halt
wmm destroy

Update the instance to a new version. Not sure of the ins and outs here, but presumably the instance will require some equivalent or running sudo apt update; sudo apt upgrade to ensure it gets the latest security updates.

wmm update

Not sure with Caddy this is needed ... but if the tool is married with something like mkcert, then I suspect something along these lines will be needed to ensure the certs between instance and host stay in-line.

wmm cert add [domain]
wmm cert remove [domain]
wmm cert renew

Retrieve one or all logs for an environment. Here it could be useful to split it by the service/software, so you can choose to view all or just Caddy or PHP.

wmm logs [service]

The ability to toggle XDebug is very useful, especially as during development of say migration code, it's handy to disable it to do a more meaningful test.

wmm xdebug enable
wmm xdebug disable

Depends how the CLI is built, but for the sake of security and continual improvement, I think it is beneficial that the tool itself has the option to upgrade itself.

wmm self upgrade