Convert Figma logo to code with AI

Homebrew logobrew

🍺 The missing package manager for macOS (or Linux)

40,745
9,551
40,745
63

Top Related Projects

2,656

:beer::penguin: The Homebrew package manager for Linux

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).

10,205

Chocolatey - the package manager for Windows

6,333

A system-level, binary package and environment manager running on all major operating systems and platforms.

Manage a user environment using Nix [maintainer=@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

2,656

: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.

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
10,205

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.

6,333

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=@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 Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Homebrew

GitHub release

Features, usage and installation instructions are summarised on the homepage. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is explained here.

What Packages Are Available?

  1. Type brew formulae for a list.
  2. Or visit formulae.brew.sh to browse packages online.

More Documentation

brew help, man brew or check our documentation.

Troubleshooting

First, please run brew update and 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.

Donations

Homebrew is a non-profit project run entirely by unpaid volunteers. 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.

For questions about donations, including corporate giving, please email the Homebrew PLC at plc@brew.sh.

Community

Contributing

We'd love you to contribute to Homebrew. First, please read our Contribution Guide and Code of Conduct.

We explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once! We can help build on a partially working pull request with the aim of getting it merged. We are also actively seeking to diversify our contributors and especially welcome contributions from women from all backgrounds and people of colour.

A good starting point for contributing is to first tap homebrew/core, then run brew audit --strict with some of the packages you use (e.g. brew audit --strict wget if you use wget) and read through the warnings. Try to fix them until brew audit --strict shows no results and submit a pull request. If no formulae you use have warnings you can run brew audit --strict without arguments to have it run on all packages and pick one.

Alternatively, for something more substantial, check out one of the issues labelled help wanted in Homebrew/brew or Homebrew/homebrew-core.

Good luck!

Security

Please report security issues by filling in the security advisory form.

Who We Are

Homebrew's Project Leader is Mike McQuaid.

Homebrew's Project Leadership Committee is Colin Dean, Issy Long, Mike McQuaid, Patrick Linnane and Vanessa Gennarelli.

Homebrew's Technical Steering Committee is Bo Anderson, FX Coudert, Michka Popoff, Mike McQuaid and Rylan Polster.

Homebrew's maintainers are Alexander Bayandin, Bevan Kay, Bo Anderson, Branch Vincent, Caleb Xu, Carlo Cabrera, Douglas Eichelberger, Dustin Rodrigues, Eric Knibbe, FX Coudert, Issy Long, Justin Krehel, Klaus Hipp, Markus Reiter, Michael Cho, Michka Popoff, Mike McQuaid, Nanda H Krishna, Patrick Linnane, Rui Chen, Ruoyu Zhong, Rylan Polster, Sam Ford, Sean Molenaar, Thierry Moisan, Timothy Sutton, William Woodruff and Å tefan Baebler.

Former maintainers with significant contributions include Miccal Matthews, Misty De Méo, Shaun Jackman, Vítor Galvão, Claudia Pellegrino, Seeker, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew's creator: 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.

Powered by MacStadium

Secure password storage and syncing is provided by 1Password for Teams.

1Password

Flaky test detection and tracking is provided by BuildPulse.

BuildPulse

https://brew.sh's DNS is resolving with DNSimple.

DNSimple DNSimple

Homebrew is generously supported by GitHub, Custom Ink, Randy Reddig, Codecademy, MacPaw Inc., fly.io, GitKraken, Workbrew and many other users and organisations via GitHub Sponsors.

GitHubfly.io