231

So, what is the difference between brew and brew cask?

I know that homebrew is a package management software. But what kind of software can I get there? Is it open source software and commercial software?

193

Homebrew

brew is the core command for the Homebrew project.

The missing package manager for OS X

Homebrew installs the stuff you need that Apple didn’t.

Homebrew typically deals with command line software. Most of the software is distributed under an open source licence. See the Formulas for a list of available installs.

Cask

brew cask is an extension to brew that allows management of graphical applications through the Cask project.

Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike.

Cask deals with a mixture of software and licences. The software I work on is covered by a commercial licence and available via cask.

Cask offers a way to command line manage the installation of graphical applications.

Licensing

Availability through brew or cask does not imply any specific licence.

  • 6
    Ideally duplication between brew and brew cask should be avoided. Graphical applications are suited to brew cask with everything else going through brew. – Graham Miln Oct 27 '14 at 6:52
  • 9
    macvim is available on both. There's even a warning about it in the cask package -- and yet they keep it available. I'm confused why cask exists. – Isaac Nov 18 '14 at 3:39
  • 34
    I am afraid answer from @GrahamMiln is misleading... The key answer is in the linked discussion (#7002): The difference isn’t between binary and app, but between downloaded as source code that will be compiled, or as an already compiled package. The distinction is important because the result is different. brew install macvim takes (possibly way) longer to install then brew cask install macvim. The former provides flexibility, while the later provides speed. – snooze92 Jun 7 '16 at 6:06
  • 4
    Misleading or incorrect? My understanding is that brew can download precompiled or source versions of an application. Which depends on the recipe involved. However, please add your answer to this question – more than one answer is welcome! – Graham Miln Jun 7 '16 at 11:23
  • 2
    Homebrew actually publically prefers recompiled binaries (called "bottles) when possible also. See github.com/Homebrew/brew/blob/master/docs/…. So the distinction is even less clear, the reality is they do overlap. – studgeek Jun 26 '17 at 4:09
11

brew cask install foo appears to be a shortcut for brew install caskroom/cask/foo:

ct@MBA45:~$ brew tap
caskroom/cask
homebrew/core
homebrew/php
ct@MBA45:~$ brew install meld
Error: No available formula with the name "meld" 
It was migrated from homebrew/core to caskroom/cask.
You can access it again by running:
  brew tap caskroom/cask
ct@MBA45:~$ brew tap caskroom/cask
ct@MBA45:~$ brew install meld
Error: No available formula with the name "meld" 
It was migrated from homebrew/core to caskroom/cask.
You can access it again by running:
  brew tap caskroom/cask
ct@MBA45:~$ brew install caskroom/cask/meld
==> brew cask install caskroom/cask/meld 
==> Satisfying dependencies
==> Downloading https://github.com/yousseb/meld/releases/download/osx-9/meldmerge.dmg
######################################################################## 100,0%
==> Verifying checksum for Cask meld
==> Installing Cask meld
==> Moving App 'Meld.app' to '/Applications/Meld.app'.
==> Linking Binary 'Meld' to '/usr/local/bin/meld'.
🍺  meld was successfully installed!
ct@MBA45:~$ brew cask install meld
Warning: Cask 'meld' is already installed.

To re-install meld, run:
  brew cask reinstall meld

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .