LLMpediaThe first transparent, open encyclopedia generated by LLMs

Homebrew (package manager)

Generated by DeepSeek V3.2
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: macOS Hop 4
Expansion Funnel Raw 39 → Dedup 15 → NER 6 → Enqueued 5
1. Extracted39
2. After dedup15 (None)
3. After NER6 (None)
Rejected: 9 (not NE: 9)
4. Enqueued5 (None)
Similarity rejected: 1
Homebrew (package manager)
NameHomebrew
DeveloperMike McQuaid
Released17 May 2009
Programming languageRuby
Operating systemmacOS, Linux
GenrePackage manager
LicenseBSD 2-Clause
Websitehttps://brew.sh

Homebrew (package manager) is a free and open-source software package management system that simplifies the installation of software on macOS and Linux. Created by Mike McQuaid in 2009, it is designed to install software that the operating system does not provide, known as the "missing package manager for macOS." It is known for its simplicity, allowing users to install command-line tools and desktop applications from a central repository using the Terminal.

Overview

Homebrew was created to fill a gap in the macOS ecosystem, which lacked a native, comprehensive package manager for open-source software. Its design philosophy emphasizes simplicity, avoiding the need for sudo privileges by installing packages to a user-owned directory, typically `/usr/local`. This approach enhances security and reduces the risk of system conflicts. The project is written in Ruby and is hosted on GitHub, where it has garnered a large community of contributors. It has become an essential tool for developers, data scientists, and system administrators working in the Apple environment, facilitating the setup of development stacks and tools not provided by Apple's App Store.

Installation

Installation is performed via a single command-line script downloaded from the project's official website. The script is executed in the Terminal and automates the setup process, including the installation of necessary dependencies like the Xcode Command Line Tools on macOS. For Linux systems, it installs under the Linux Standard Base-compliant directory `/home/linuxbrew/.linuxbrew`. The installer configures the user's shell environment, typically by modifying files like `~/.bash_profile` or `~/.zshrc`, to include Homebrew's binary directory in the PATH. This ensures that installed software is immediately accessible. The process is designed to be non-destructive and can be easily reversed.

Usage

Basic usage involves commands like `brew install` to add a package, `brew update` to refresh the local list of available software, and `brew upgrade` to update installed packages. Users can search for packages with `brew search` and get information about them using `brew info`. Homebrew manages dependencies automatically, fetching and installing required libraries from its repositories or from GitHub repositories. For maintenance, commands like `brew cleanup` remove old versions of software, and `brew doctor` diagnoses common issues. The system integrates with Git for version tracking of its internal formula definitions, allowing for easy updates and rollbacks.

Formulae and Casks

Homebrew distinguishes between two primary package types: Formulae and Casks. Formulae are Ruby scripts that define how to compile and install command-line tools and libraries, such as Python, Node.js, or wget. Casks are used for installing pre-compiled binary applications, typically GUI desktop software like Google Chrome, Visual Studio Code, or Spotify, which are distributed as `.app` bundles on macOS. Both types are managed from a central repository known as the Homebrew Core, with Casks maintained in a separate tap called Homebrew Cask. This separation allows for efficient management of both open-source utilities and proprietary applications.

Community and ecosystem

The project thrives on GitHub, where thousands of contributors maintain and update the Formulae and Casks. Community involvement is channeled through issues, pull requests, and discussions, following guidelines set by the maintainers. Homebrew also supports the concept of "taps," which are third-party repositories that allow users to install packages not included in the official core. Notable taps include those for specialized scientific tools, Linux-specific software, or beta versions of applications. The ecosystem includes tools like `brew bundle` for managing project dependencies and integration with continuous integration services like GitHub Actions and Travis CI.

Comparison with other package managers

Unlike system-level package managers such as APT on Debian or YUM on Fedora, Homebrew is designed to be non-invasive, installing software to a user directory without requiring sudo access. This contrasts with MacPorts and Fink, other package managers for macOS that often install to system directories and may cause more potential conflicts. On Linux, Homebrew is an alternative to native managers but is generally used for software not available in the distribution's repositories, similar to how Snap or Flatpak operate for desktop applications. Its focus on simplicity and user-friendliness has made it particularly popular in the Apple developer community.

Category:Free software package management systems Category:MacOS software Category:Linux software Category:Ruby (programming language) software Category:2009 software