While following the directions on how to set up 10up’s wonderful dev environment for WordPress, I noticed that Vagrant was using a
Now there’s nothing wrong with installing software that way. Hell, doing things via a graphical installer is easier for most end users. But Vagrant isn’t really something that was made for “end users”. It’s a command line utility to create and manage development environments.
So I did a quick check to see if I could install Vagrant via my favorite package manager, Homebrew. And while there’s nothing in the vanilla install of Homebrew, I stumbled onto an independently maintained add-on called
brew-cask that allows you to install Mac applications on your computer via the command line.
Using it is as easy as loading up your terminal and typing:
brew tap phinze/homebrew-cask && brew install brew-cask
Then, to get Vagrant installed, just run this command:
brew cask install vagrant
Hell, you can even install VirtualBox if you’d like:
brew cask install virtualbox
Pretty nice, right?
Oh, and if you’ve been holding out on using Vagrant in your dev environment, consider giving it a try. It’s way more flexible than MAMP and nowhere near as quirky.
2 responses to “Vagrant, Casked”
Hi Jason – thanks for the post! I came across another read which recommended using
gemto install Vagrant. Do you have any thoughts on whether to use
brew cask(or just how the two differ)?
The official Vagrant documentation only suggests using the
gemmethod if you can’t find a package for your install. Since a
brewpackage exists for OS X, I’ll take that as a sign that it’s the better option. ;)