Top Related Projects
:beer::penguin: The Homebrew package manager for Linux
The MacPorts command-line client
WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
Chocolatey - the package manager for Windows
A system-level, binary package and environment manager running on all major operating systems and platforms.
Manage a user environment using Nix [maintainer=@khaneliman, @rycee]
Quick Overview
Homebrew is a popular package management system for macOS and Linux. It simplifies the installation and management of software packages, allowing users to easily install, update, and remove applications and tools from the command line.
Pros
- Easy to use with simple commands for installing and managing packages
- Large community-maintained repository of packages (formulae)
- Installs packages in their own directories, avoiding conflicts with system files
- Supports custom taps (repositories) for additional packages
Cons
- Can occasionally conflict with system-installed software or other package managers
- Some packages may not be as up-to-date as their official releases
- Limited support for GUI applications (though Homebrew Cask exists for this purpose)
- May require frequent updates to maintain package consistency
Getting Started
To install Homebrew on macOS or Linux, run the following command in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After installation, you can use Homebrew with these basic commands:
# Install a package
brew install package_name
# Update Homebrew and its packages
brew update
# Upgrade installed packages
brew upgrade
# Search for available packages
brew search package_name
# Remove a package
brew uninstall package_name
For more information and advanced usage, visit the official Homebrew documentation at https://docs.brew.sh/.
Competitor Comparisons
:beer::penguin: The Homebrew package manager for Linux
Pros of Linuxbrew
- Allows Linux users to access Homebrew's package ecosystem
- Provides a consistent package management experience across macOS and Linux
- Enables installation of some macOS-specific tools on Linux systems
Cons of Linuxbrew
- Smaller user base and community compared to Homebrew
- May have compatibility issues with some Linux-specific packages
- Requires additional setup and dependencies on Linux systems
Code Comparison
Homebrew (macOS):
class Formula < Formulary
def install
system "make", "install"
end
end
Linuxbrew (Linux):
class Formula < Formulary
def install
ENV.append_path "PATH", "#{HOMEBREW_PREFIX}/bin"
system "make", "install"
end
end
The main difference in the code is that Linuxbrew often needs to modify the PATH environment variable to ensure proper installation on Linux systems.
Both projects share a significant portion of their codebase, as Linuxbrew is essentially an adaptation of Homebrew for Linux. The core functionality and package management principles remain largely the same, with Linuxbrew making necessary adjustments to work on Linux environments.
While Homebrew is the more established and widely-used project, Linuxbrew offers a valuable alternative for Linux users who want to leverage the Homebrew ecosystem. However, Linux users may find native package managers like apt or yum more suitable for their needs in many cases.
The MacPorts command-line client
Pros of MacPorts
- More comprehensive package management system with a larger selection of ports
- Supports multiple architectures and OS versions, including older macOS releases
- Stricter isolation of installed packages from the base system
Cons of MacPorts
- Generally slower installation process compared to Homebrew
- Requires more disk space due to its self-contained nature
- Steeper learning curve for beginners
Code Comparison
MacPorts:
PortSystem 1.0
name example
version 1.0
categories devel
maintainers example@example.com
description An example port
long_description ${description}
Homebrew:
class Example < Formula
desc "An example formula"
homepage "https://example.com"
url "https://example.com/example-1.0.tar.gz"
sha256 "abcdef1234567890abcdef1234567890"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
end
Both MacPorts and Homebrew are popular package managers for macOS, each with its own strengths and weaknesses. MacPorts offers a more comprehensive system with stricter isolation, while Homebrew provides a simpler, faster experience that integrates more closely with the macOS environment. The choice between the two often depends on individual needs and preferences.
WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
Pros of winget-cli
- Native Windows integration and support
- Lightweight and fast installation process
- Centralized package management through Microsoft's repository
Cons of winget-cli
- Smaller package repository compared to Homebrew
- Less mature ecosystem and community support
- Limited cross-platform compatibility
Code Comparison
winget-cli:
winget install package-name
winget uninstall package-name
winget upgrade package-name
brew:
brew install package-name
brew uninstall package-name
brew upgrade package-name
Key Differences
- Homebrew is primarily designed for macOS and Linux, while winget-cli is Windows-centric
- Homebrew has a larger package repository and longer history in the open-source community
- winget-cli leverages Windows-specific features and integrations
- Homebrew offers more advanced features like tap repositories and formula customization
Use Cases
- Choose winget-cli for Windows-focused development and system management
- Opt for Homebrew when working in macOS or Linux environments, or requiring a wider range of packages
- Consider using both tools in cross-platform development scenarios to cover all bases
Chocolatey - the package manager for Windows
Pros of Choco
- Windows-native package manager, designed specifically for the Windows ecosystem
- Supports multiple installation methods (CLI, PowerShell, GUI)
- Integrates well with Windows security features and group policies
Cons of Choco
- Smaller package repository compared to Homebrew
- Less frequent updates for some packages
- Requires elevated privileges for most operations
Code Comparison
Choco installation command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Homebrew installation command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Package installation:
Choco:
choco install <package-name>
Homebrew:
brew install <package-name>
Both Choco and Homebrew are popular package managers for their respective operating systems. While Homebrew is primarily designed for macOS and Linux, Choco focuses on Windows. Homebrew generally offers a larger package repository and more frequent updates, but Choco provides better integration with Windows-specific features and security policies.
A system-level, binary package and environment manager running on all major operating systems and platforms.
Pros of conda
- Cross-platform compatibility (Windows, macOS, Linux)
- Better support for Python-specific environments and packages
- Ability to create isolated environments for different projects
Cons of conda
- Slower package installation and environment creation
- Larger disk space usage due to package duplication across environments
- More complex configuration and usage compared to Homebrew
Code comparison
conda:
conda create -n myenv python=3.8
conda activate myenv
conda install numpy pandas
Homebrew:
brew install python@3.8
pip3 install numpy pandas
The code comparison shows that conda requires creating and activating an environment before installing packages, while Homebrew allows direct installation of Python and packages using pip. This highlights conda's focus on isolated environments and Homebrew's simpler approach for system-wide package management.
Both conda and Homebrew are popular package managers, but they serve different purposes. conda is more specialized for Python and data science workflows, offering better isolation and cross-platform support. Homebrew, on the other hand, is a more general-purpose package manager for macOS and Linux, providing a simpler interface for installing various software packages beyond just Python.
Manage a user environment using Nix [maintainer=@khaneliman, @rycee]
Pros of home-manager
- Declarative configuration for entire user environment, not just package management
- Cross-platform support (Linux, macOS, NixOS) with consistent behavior
- Reproducible and version-controlled user environments
Cons of home-manager
- Steeper learning curve due to Nix language and concepts
- Smaller package ecosystem compared to Homebrew
- Less intuitive for users accustomed to imperative package managers
Code Comparison
home-manager configuration example:
{ pkgs, ... }:
{
home.packages = [ pkgs.git pkgs.vim ];
programs.bash.enable = true;
}
Homebrew usage example:
brew install git vim
Key Differences
- home-manager uses a declarative approach with Nix language
- Homebrew follows a more traditional imperative package management style
- home-manager manages the entire user environment, while Homebrew focuses primarily on package installation
Conclusion
home-manager offers a more comprehensive and reproducible approach to managing user environments, but with a steeper learning curve. Homebrew provides a simpler, more familiar experience for package management on macOS, with a larger package ecosystem. The choice between the two depends on the user's needs, expertise, and desired level of control over their system configuration.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ðº Homebrew
See Homebrew's homepage at brew.sh for installation instructions, what homebrew does, packages, brew bundle and more.
ð¸ Donations
Homebrew is a non-profit project run entirely by volunteers, not employees. We need your funds to pay for software, hardware and hosting around continuous integration and future improvements to the project. Every donation will be spent on making Homebrew better for our users.
Please consider a regular donation through GitHub Sponsors, Open Collective or Patreon. Homebrew is fiscally hosted by the Open Source Collective.
ð Documentation
Read the Homebrew manual with man brew.
Read installation,
troubleshooting,
contribution
including the FAQ on docs.brew.sh.
Read the Homebrew Blog for release notes, project updates and announcements.
ð¦ Packages
Find formulae, casks, dependencies, versions and package metadata on formulae.brew.sh.
View anonymised install, build and operating system usage data at formulae.brew.sh/analytics.
Read how Homebrew uses Anonymous Analytics.
ð§ Get Help
First, please run brew update and run (and read) brew doctor.
Second, read the Troubleshooting Checklist.
If you don't read these it will take us far longer to help you with your problem.
After this, if you still need help, please ask in Homebrew/discussions or follow (and read) the Homebrew/brew new issue chooser.
ð¬ Social
Follow Homebrew on Mastodon, Bluesky, ð (Twitter) or subscribe to the newsletter.
ð¤ Contributing
We'd love you to join us and >10,000 others by contributing to Homebrew!
First, please read our Contribution Guide and Code of Conduct.
A good starting point for contributing is:
brew tap --force homebrew/coreorbrew tap --force homebrew/cask(depending on whether you'd rather work on formulae or casks)- perform a strict audit on a package you use e.g.
brew audit --strict ffmpegfor FFmpeg - if no warnings, run
brew audit --strictto run on all packages and pick one to fix - read through the warnings and fix them until
brew audit --strict <package>shows no results - submit a pull request with your fixes
Alternatively, for something more substantial, check out one of the open issues in Homebrew/brew, Homebrew/homebrew-core or Homebrew/homebrew-cask.
If you've had inspiration for a new feature or bug fix: we don't need you to open an issue first, just open a pull request with your implementation and we'll review it.
Good luck!
ð Security
Please see our security policy for how to report security issues and what is in scope.
ð¥ Who We Are
Homebrew's Project Leader is Mike McQuaid.
Homebrew's Lead Maintainers are Bevan Kay, Carlo Cabrera, Issy Long, Justin Krehel, Michael Cho, Mike McQuaid, Nanda H Krishna, Patrick Linnane, Rui Chen, Ruoyu Zhong, Sam Ford and Sean Molenaar.
Homebrew's other Maintainers are Andrew Nesbitt, Anton Melnikov, Bo Anderson, Branch Vincent, Caleb Xu, Daeho Ro, Douglas Eichelberger, Dustin Rodrigues, FX Coudert, Klaus Hipp, Markus Reiter, Michka Popoff, Å tefan Baebler, Thierry Moisan and William Woodruff.
Homebrew was originally created by Max Howell.
ð License
Code is under the BSD 2-clause "Simplified" License. Documentation is under the Creative Commons Attribution license.
ð Sponsors
Our macOS continuous integration infrastructure is hosted by MacStadium's Orka.
Secure password storage and syncing is provided by 1Password for Teams.
https://brew.sh's DNS is resolving with DNSimple.
Homebrew is generously supported by Joshua Baer, Randy Reddig, Codecademy, b.well, Workbrew, GitHub, SAP and many other users and organisations via GitHub Sponsors.
Top Related Projects
:beer::penguin: The Homebrew package manager for Linux
The MacPorts command-line client
WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
Chocolatey - the package manager for Windows
A system-level, binary package and environment manager running on all major operating systems and platforms.
Manage a user environment using Nix [maintainer=@khaneliman, @rycee]
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot


