README

Project Status

Current Status: Came up with a solid list of requirements and nice-to-haves

Next Steps: Plan out implementation


Background

I currently use WSL on my work laptop as a development environment and a place to run local versions of client-sites. Since we have dozens, I typically won’t keep them all installed at once, but the setup process is not super efficient.

While I have some automation for most of individual steps, I don’t have anything tying it together. I also don’t have any automation when it comes to clearing out local sites that I no longer need so there’s traces of several left behind.

Basically what I want is a simple command-line tool that allows me to manage:

  1. Apache virtual hosts and their associated files / database
  2. The hosts file on both Linux and Windows side
  3. My custom “bookmark” list

Ideally it won’t require any additional storage and can be run by just ingesting the relevant files.

Requirements

The tool should facilitate:

  • CRUD of virtual hosts
    • Automatically create relevant directory + database
    • Allow for imports from a backup (just a public_html.tar.gz + db.sql)
    • Automatically grant my user write-permissions
    • Automatically enable / disable virtual hosts where applicable
  • CRUD of hosts file entries (synced between linux and windows side)
  • Automatically add and remove relevant bookmarks so I can quickly access the files

Nice to Haves

  • Worpress shortcuts
    • Automatically update site url in wp_options (and wp-config.php if specified there)
    • Automatically update db creds in wp-config.php
    • Automatically install and run db migrate
    • Remove any “prod-only” plugins (e.g. Offload SES, WP Rocket, etc.)
  • Generate new keypairs for SSH access
  • If we can automatically generate the backups that can be imported as well that would be amazing
    • Even better if they could be taken straight from stdout rather than using storage

Final Thoughts

TBD