Homebrew Cask: additional benefits to your homebrew
Probably the most popular and widely used CLI package manager for macOS is Homebrew, although most of the people still prefers the traditional 'GUI' way of installing packages. But CLI package management has it's own charm, users who previously used any Linux distro before coming to macOS environment will know it's importance. However, homebrew works while installing mostly command line packages; development tools, CLI downloading packages etc. (i.e. aria2, wget, python, node and so on) - many people will still miss the good old Linux way of installing GUI packages too using command line. Here comes the elegant and feature rich Homebrew Cask, a sub-project which builds upon homebrew with intention of installing GUI applications using command line package manager. By using it installation of GUI applications - Google Chrome, Firefox, VLC media player, Skype and even commercial office suit like- Microsoft Office for Mac has become easy as 1-2-3.
Lets see how we can install this handy tool along with existing homebrew environment. Simply fire up terminal and give following command:
brew tap caskroom/cask
it may take some time depending on your internet speed, but wait and have a cup of coffee. After finish installation, you can get any (there are 3374 casks being maintained so far) of your favourite GUI application with only a single command:
brew cask install package-name
replace package-name with your desired application name, like- google-chrome or firefox. You can keep some useful commands in your mind, like --
brew cask uninstall package-name
brew cask search package-name
brew cask info package-name
in case you want to remove any package, give first command, second command will search for specific package name in repository and third command will show related information with a package. If you want to check list of applications you have installed using homebrew cask, following command will help:
ls /usr/local/Caskroom
one more thing - you don't have to worry which version of a package is installing, this tool is quite straightforward as it always gets the latest available version of an application for you, install it in common location (/Applications) and create necessary symlinks as homebrew does. So, you can use GUI applications just like you used to be when install those in traditional method, i mean "Drag & Drop" way.
This project is community driven, so if you are a developer and interested in improving homebrew cask, then dive into the codebase and create your own cask. You will get more information from it's GitHub repository.