I do love the simplicity when it comes to macOS. It has a nice smooth and intuitive user interface. And when power user experience is required, you can jump into a Unix-style terminal. However, you will quickly notice it misses one thing - a package manager.
A package manager is a software tool that automates the process of installing, updating, configuring, and removing software packages on a computer system. It simplifies the management of software dependencies and ensures that the necessary components are installed correctly.
The community has already found the remedy - Homebrew.
Homebrew
Homebrew is a package manager for macOS, which allows users to easily install, update, and manage various software packages and libraries on their Mac computers. It provides a convenient command-line interface for installing open-source software that is not typically included in the default macOS installation.
To install homebrew, you have to paste the following into your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once installation is finished, you can use the brew command to interact with the package manager.
❯ brew
Example usage:
brew search TEXT|/REGEX/
brew info [FORMULA|CASK...]
brew install FORMULA|CASK...
brew update
brew upgrade [FORMULA|CASK...]
brew uninstall FORMULA|CASK...
brew list [FORMULA|CASK...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA|CASK
Contributing:
brew create URL [--no-fetch]
brew edit [FORMULA|CASK...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
The Homebrew community maintains a vast collection of packages that can be installed with Homebrew. These packages include software such as programming languages, development tools, text editors, database systems, multimedia applications, and much more.
For instance, we can simply install midnight commander using brew.
❯ brew install mc
==> Fetching midnight-commander
==> Downloading https://ghcr.io/v2/homebrew/core/midnight-commander/manifests/4.8.29_2
Already downloaded: /Users/slysj/Library/Caches/Homebrew/downloads/190d250bca5b00a2f28dba4f9455aa7a4e7a5ae60d9638931aa815ce49f85f85--midnight-commander-4.8.29_2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/midnight-commander/blobs/sha256:c8ce411cb9c92f791b2e2b516e782369196ecc75541991ca6a4c8dc66d485cdd
Already downloaded: /Users/slysj/Library/Caches/Homebrew/downloads/188994f13cd93f0b229d8657bef538652fa2363ff4e61119080426d778277be5--midnight-commander--4.8.29_2.ventura.bottle.tar.gz
==> Installing midnight-commander
==> Pouring midnight-commander--4.8.29_2.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/midnight-commander/4.8.29_2: 336 files, 7.7MB
==> Running `brew cleanup midnight-commander`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Homebrew has gained popularity among developers and power users as it provides an efficient way to manage software installations on macOS, making it easier to set up development environments and install additional tools and libraries as needed.
Conclusion
Homebrew is a popular package manager for macOS that simplifies the process of installing, updating, and managing software packages on Mac computers. It provides a command-line interface for installing open-source software not included in the default macOS installation. Homebrew automates the handling of dependencies and manages versioning, making it easy for users to install a wide range of applications, utilities, and development tools.