Based on puPHPet, tweaked for my needs and workflow.