brew install
Packages and runtimes
Usage
brew install [--cask] <formula>Installs a prebuilt bottle on macOS and Linux; GUI applications need --cask, and moving to a newer version is the job of brew update and brew upgrade, not of install.
Common flags
| Flag | Meaning |
|---|---|
| --cask | install a GUI application instead of a formula |
| --formula | force the formula when a cask has the same name |
| --HEAD | build from the latest source instead of a release |
| --build-from-source | compile locally instead of using the bottle |
Examples
brew install ripgrepinstalls a prebuilt bottle in seconds
brew install --cask visual-studio-codeinstalls an app into /Applications
brew install node@22a versioned formula, keg-only until you brew link it
The question is always what goes where: inside this project, or on the whole machine.
How to read this
- Square brackets [ ] mark a part you may leave out.
- An ellipsis … means you can list more than one.
- Flags are case-sensitive — in some commands -r and -R do different things.
Questions
Q. What does brew install do?
Installs a prebuilt bottle on macOS and Linux; GUI applications need --cask, and moving to a newer version is the job of brew update and brew upgrade, not of install.
Q. How do I type it?
brew install [--cask] <formula> — square brackets mark the parts you can leave out.
Q. How many flags are worth knowing?
4 are listed here; the full set is in man brew. This command sits under Packages and runtimes.
Related commands
man page: man brew-install