This package is abandoned and no longer maintained. No replacement package was suggested.

A project management en configuration CLI for laravel/homestead

1.0.0 2017-07-23 18:58 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:50:33 UTC


README

Ranch

Homestead sitemanagement made easy.

Total Downloads Latest Stable Version License 68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c697175696470696e656170706c652f72616e63682f6261646765732f6770612e737667 68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c697175696470696e656170706c652f72616e63682f6261646765732f69737375655f636f756e742e737667

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