What is a Homebrew Cask?
A Homebrew Cask is a package definition for installing a graphical macOS app — running brew install --cask <app> downloads the app and moves it into your Applications folder automatically, instead of dragging it from a .dmg.
Install a GUI app via cask:
brew install --cask visual-studio-codeCask vs. formula
Homebrew has two package types. Formulae are command-line tools and libraries (brew install git). Casks are desktop GUI apps (brew install --cask visual-studio-code). The --cask flag tells Homebrew to fetch a pre-built app bundle and install it like a normal Mac app, handling the download, mount, copy, and cleanup that you would otherwise do by hand with a DMG.
What casks automate
Installing a cask replaces the usual "download .dmg → open → drag to Applications → eject" dance with one command. Casks can also install fonts, drivers, and quick-look plugins. Uninstalling is just as clean: brew uninstall --cask <app> removes the app and its support files.