Practical guides to AI, computing, modelling, simulation, optimization and quantum computing, featuring hands-on tutorials, experiments and research.

Homebrew Cask Explained: Install macOS Apps from Terminal

Homebrew Cask is a command-line extension of Homebrew, the macOS package manager, that installs, updates, and removes full graphical (GUI) applications, things like Chrome, Slack, or VS Code, using a single terminal command instead of downloading a disk image and dragging an icon into Applications.

Homebrew Cask quick answer: use brew install --cask app-name to install a macOS GUI application from Terminal.
brew search --cask chrome
brew install --cask google-chrome
brew upgrade --cask
brew uninstall --cask google-chrome

macOS users frequently face the challenge of efficiently managing application installations across multiple machines. The traditional approach involves manually downloading disk images, navigating installation wizards, and maintaining applications across systems. Homebrew Cask offers a command-line solution that significantly streamlines this process.

What Is Homebrew Cask?

Homebrew installs command-line tools and libraries, called formulae, while Homebrew Cask installs complete macOS applications with graphical interfaces. For example, brew install wget installs a terminal utility, whereas brew install --cask visual-studio-code installs the Visual Studio Code app in macOS. Cask functionality is built into modern Homebrew, so no separate tap or extension needs to be installed.

The conventional installation workflow requires multiple steps:

  1. Locating the official download source
  2. Downloading the disk image file
  3. Opening and mounting the disk image
  4. Transferring the application to the Applications folder
  5. Ejecting the disk image
  6. Managing the downloaded installer file
  7. Repeating this process for each required application

Homebrew Cask reduces this to a single command:

brew install --cask google-chrome

The application is then installed automatically with no further user interaction required.

Key Advantages for Professional Workflows

1. Accelerated System Provisioning

Organizations and individual users can maintain installation scripts containing all required applications. A typical enterprise development environment setup might include:

brew install --cask visual-studio-code
brew install --cask docker
brew install --cask slack
brew install --cask zoom
brew install --cask rectangle
brew install --cask iterm2
brew install --cask spotify
brew install --cask vlc

This approach reduces new machine setup time from several hours to approximately 15-20 minutes, depending on network bandwidth and the number of applications being installed.

2. Simplified Update Management

Maintaining current software versions is essential for security compliance and feature availability. Run the following command to upgrade outdated Cask-managed applications:

brew upgrade --cask

This upgrades outdated managed casks. Casks marked version :latest or auto_updates true normally require the --greedy option:

brew upgrade --cask --greedy

3. Complete Application Removal

Plain brew uninstall --cask removes the managed application:

brew uninstall --cask docker

To also attempt removal of associated preferences and caches, use --zap:

brew uninstall --cask --zap docker

Use --zap carefully because it may remove files shared with other applications.

4. Automation and Standardization

Homebrew Cask’s command-line interface enables scripting and automation. Development teams can create standardized setup scripts ensuring consistent development environments. IT departments can implement automated workstation provisioning workflows. System configurations can be version-controlled in dotfiles repositories, enabling rapid deployment and rollback capabilities.

Recommended Applications by Category

The following applications represent commonly deployed tools across professional environments:

Development Tools

brew install --cask visual-studio-code
brew install --cask iterm2
brew install --cask docker
brew install --cask postman
brew install --cask dbeaver-community

Productivity Applications

brew install --cask rectangle        # Window management
brew install --cask alfred           # Enhanced search functionality
brew install --cask obsidian         # Knowledge management
brew install --cask notion           # Collaborative workspace

Communication Platforms

brew install --cask slack
brew install --cask zoom
brew install --cask discord

System Utilities

brew install --cask the-unarchiver
brew install --cask appcleaner
brew install --cask vlc

Implementation Guide

Organizations and users without an existing Homebrew installation can deploy it with a single command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Once Homebrew is installed, Cask functionality is built right in. Just start using brew install --cask commands.

Useful Commands to Know

# Search for an app
brew search --cask chrome

# Get information about an app
brew info --cask visual-studio-code

# List all installed cask apps
brew list --cask

# Update all apps
brew upgrade --cask

# Uninstall an app
brew uninstall --cask slack

How to Install Homebrew Casks in ~/Applications

By default, Homebrew Cask installs applications in /Applications. Use --appdir to target the per-user ~/Applications directory instead:

brew install --cask --appdir="$HOME/Applications" visual-studio-code

To use that location by default, set HOMEBREW_CASK_OPTS:

export HOMEBREW_CASK_OPTS="--appdir=${HOME}/Applications"

Add the export command to your shell profile to persist it across terminal sessions.

A Few Gotchas

Cask isn’t perfect. Here are some things to be aware of:

  • Not every app is available – Popular apps are well-covered, but niche or very new applications might not be in the repository yet
  • App Store apps aren’t included – Apps distributed exclusively through the Mac App Store can’t be installed via Cask
  • Some apps require manual steps – Occasionally, an app needs additional configuration or permissions that Cask can’t automate
  • Updates might lag slightly – Cask maintainers need to update formulas when new versions release, so there can be a brief delay

These are minor inconveniences compared to the time saved.

Frequently Asked Questions

What is a cask in Homebrew?

A “cask” is Homebrew’s term for a pre-packaged macOS GUI application, as opposed to a “formula,” which is Homebrew’s term for a command-line tool or library. When you run brew install --cask app-name, Homebrew downloads the official installer for that app and places it in Applications automatically, skipping the manual disk-image and drag-and-drop steps entirely.

What is the difference between Homebrew and Homebrew Cask?

Homebrew installs command-line tools and libraries (things like git or wget). Homebrew Cask is the same package manager extended to install full graphical applications (things like Chrome or Slack). Since 2018 they’ve shipped as a single unified brew command — you don’t need to install Cask separately, just add the --cask flag.

Is Homebrew Cask free?

Yes. Homebrew and Homebrew Cask are both free, open-source projects. There’s no cost to install or use them — you’re simply automating the download of each app’s own installer, which may itself be free or paid depending on the app.

How do I install an app with Homebrew Cask?

Run brew install --cask app-name in Terminal, replacing app-name with the app’s Cask identifier (for example, brew install --cask visual-studio-code). Use brew search --cask keyword first if you’re not sure of the exact name.

The Bottom Line

Homebrew Cask has fundamentally changed how I interact with my Mac. What started as a way to avoid repetitive downloads has become an essential part of my workflow. The ability to script, automate, and version-control my application setup means I’m never more than a few commands away from a productive environment.

If you spend any significant time on macOS, especially as a developer or power user, Homebrew Cask is worth learning. Your future self—the one setting up that next new machine—will thank you.

Try It Yourself

Pick three applications you use regularly and install them via Cask. I bet you’ll be hooked by the simplicity. Start with something like:

brew install --cask visual-studio-code
brew install --cask google-chrome  
brew install --cask rectangle

Welcome to a more efficient way of managing your Mac applications.


What’s your favorite Homebrew Cask application? Have you automated your Mac setup? Share your experiences in the comments below!

Try a Cask-managed Mac utility: Marta is a free dual-pane file manager for macOS, and it installs with brew install --cask marta.

Comments

One response to “Homebrew Cask Explained: Install macOS Apps from Terminal”

  1. Marta for macOS: A Fast Dual-Pane Finder Alternative – Techucation Avatar

    […] app to Applications and open it. Homebrew users can run brew install –cask marta; see the site’s Homebrew Cask guide for app-management commands. Learn about updates and configuration in the official Marta file […]

    Like

Leave a comment