October 9th, 2024, posted in for_founders
by Miruna
When I first started working with Laravel Homestead, I had a lot of issues when trying to add a new site. These were caused by the wrong syntax, wrong folder paths, wrong site address, not finding the right files etc. Also, after repeting the same steps multiple times, I noticed that for each new project I was just copy-pasting the same lines and only changing the name of the site.
Around the same time, I started a course on operating systems at University and learned how to build small scripts to automatize tasks, for example to copy some data from a file to another or run other processes from a program. So it hit me. Why not build a script to automatize the process of adding sites to Laravel Homestead? And I did. Meet Homestead Grasshopper, the open source script for all you lazy Laravel developers.
Homestead Grasshopper is a script that automatically adds sites in the Laravel Homestead (Vagrant) environment and “hosts” file. More precisely, it adds the site name and address in the “hosts” file and file paths in Homestead.yaml.
How does it work
You can just add your site name when running the script and you are done. Or, if you are the control freak type, you can manually configure the site address, hosts file path and more. See a complete User Manual on GitHub or acces it within your console.
The program was created using Python programming language, so it will work on most popular operating systems. That includes Windows, macOS and Linux (Python is pre-installed on most Linux distributions).
Who is it for
The program is useful for beginners that struggle with the same problems I had when adding new sites in Homestead environment, as well as for programmers who have more experience using Homestead, but want to save time when adding a site in Homestead.
Get Homestead Grasshopper script free on GitHub. And don’t forget, this is an open source software. We at UPDIVISION encourage everyone to contribute. Help us spread the love in the Laravel community.