liquidpineapple / ranch
A project management en configuration CLI for laravel/homestead
Requires
- symfony/console: ^3.2
- symfony/yaml: ^3.3
- tightenco/collect: ^5.4
This package is not auto-updated.
Last update: 2020-01-24 16:50:33 UTC
README
Ranch
Homestead sitemanagement made easy.
Ranch is a command line tool that helps you manage your sites in Homestead. Ranch has support for MacOS and Linux.
Features
Installation
You can install ranch on your machine using composer:
$ composer global require liquidpineapple/ranch
Note: Make sure both your own user and the sudo user can access the ranch executable.
Documentation
Configuration
To create your configuration file use:
$ ranch init
After executing this, your config file will have been created: ~/.ranchcfg
. You can overwrite a couple of default values using your ranchconfig:
HOMESTEAD_DIR=/home/johndoe/Homestead
HOSTS_FILE=/etc/hosts
Note: The Homestead IP is not configurable in the .ranchcfg
because it is already set in your Homestead.yaml
List all sites
A good way to validate your ranch installation is to run the following command:
$ ranch sites
This will return a result like this:
Configured sites
================
* laravel.dev
* lumen.laravel.dev
* forge.laravel.dev
The "sites" command will only list sites that are configured in both the hosts file and homestead.yaml. So this is a great way to see if your ranch installation is pointed at the correct files.
Add sites
Add a site to your configuration without hassle:
$ ranch add helloworld.dev
You will then be prompted with a couple of questions for where you wish to point the entries to. (Ranch can suggest these locations pretty well 😏).
Remove sites
Removing sites is just as easy as adding them:
$ ranch remove helloworld.dev
Warning: This command will not prompt you with a confirmation question!
Validate
What I think is one of coolest commands in this package:
$ ranch validate
This validates your entire configuration. If paths are missing or you have some old entries in one of your files this command will tell you. It will give back a list of imperfections in your current configuration.
Contributing
To contribute to this repository, follow our contribute guide