Convert Figma logo to code with AI

Homebrew logohomebrew-bundle

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.

5,284
283
5,284
6

Top Related Projects

62,307

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

14,094

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:

7,565

Chef Infra, a powerful automation platform that transforms infrastructure into code automating how infrastructure is configured, deployed and managed across any environment, at any scale

7,382

Server automation framework and application

42,146

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

109,710

Production-Grade Container Scheduling and Management

Quick Overview

Homebrew Bundle is an extension to Homebrew, the popular package manager for macOS. It allows users to define and manage a set of dependencies in a Brewfile, enabling easy installation and management of multiple packages, casks, and taps in a single command. This tool is particularly useful for setting up new machines or maintaining consistent development environments across multiple systems.

Pros

  • Simplifies the process of installing and managing multiple Homebrew packages
  • Enables version control of system dependencies through a Brewfile
  • Supports various types of Homebrew installations, including formulae, casks, and taps
  • Integrates well with existing Homebrew workflows

Cons

  • Limited to macOS and Linux systems that use Homebrew
  • May not cover all software installation needs, especially for non-Homebrew packages
  • Can potentially lead to conflicts if not managed carefully with other system package managers
  • Requires manual updates of the Brewfile to keep it in sync with system changes

Getting Started

  1. Install Homebrew if not already installed:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Homebrew Bundle:

    brew tap Homebrew/bundle
    
  3. Create a Brewfile in your desired directory:

    touch Brewfile
    
  4. Edit the Brewfile to add your desired packages, casks, and taps. For example:

    # Brewfile
    tap "homebrew/cask"
    brew "git"
    brew "node"
    cask "visual-studio-code"
    
  5. Run Homebrew Bundle to install everything in your Brewfile:

    brew bundle
    

This will install all the specified packages, casks, and taps in your Brewfile. You can now use this Brewfile to easily set up your development environment on other machines or keep track of your installed packages.

Competitor Comparisons

62,307

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

Pros of Ansible

  • More comprehensive configuration management and automation capabilities
  • Supports a wide range of operating systems and platforms
  • Highly extensible with a large ecosystem of modules and plugins

Cons of Ansible

  • Steeper learning curve due to its complexity and extensive features
  • Requires more setup and configuration compared to Homebrew Bundle
  • May be overkill for simple package management tasks on macOS

Code Comparison

Homebrew Bundle (Brewfile):

tap "homebrew/cask"
brew "git"
cask "firefox"
mas "Xcode", id: 497799835

Ansible (playbook.yml):

- hosts: localhost
  tasks:
    - name: Install Git
      homebrew:
        name: git
        state: present
    - name: Install Firefox
      homebrew_cask:
        name: firefox
        state: present

While Homebrew Bundle focuses on declarative package management for macOS, Ansible offers a more powerful and flexible approach to configuration management across multiple platforms. Homebrew Bundle is simpler to use for basic macOS setups, but Ansible provides greater control and automation capabilities for complex environments.

14,094

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:

Pros of Salt

  • More comprehensive configuration management and automation capabilities
  • Supports multiple operating systems and platforms
  • Scalable for large infrastructure deployments

Cons of Salt

  • Steeper learning curve and more complex setup
  • Requires more resources to run and maintain
  • May be overkill for simple package management tasks

Code Comparison

Salt (YAML state file):

install_packages:
  pkg.installed:
    - pkgs:
      - git
      - nginx
      - postgresql

Homebrew Bundle (Brewfile):

brew "git"
brew "nginx"
brew "postgresql"

Summary

Salt is a powerful configuration management and automation tool suitable for complex, multi-platform environments. It offers extensive features but requires more setup and resources. Homebrew Bundle, on the other hand, is a simpler solution focused on package management for macOS, making it easier to use for basic tasks but limited in scope compared to Salt's capabilities.

7,565

Chef Infra, a powerful automation platform that transforms infrastructure into code automating how infrastructure is configured, deployed and managed across any environment, at any scale

Pros of Chef

  • More comprehensive configuration management system for entire infrastructure
  • Supports multiple operating systems and platforms
  • Offers advanced features like roles, environments, and data bags

Cons of Chef

  • Steeper learning curve and more complex setup
  • Requires more resources and overhead for small-scale deployments
  • Less focused on package management compared to Homebrew Bundle

Code Comparison

Homebrew Bundle (Brewfile):

tap "homebrew/cask"
brew "git"
cask "firefox"
mas "Xcode", id: 497799835

Chef (recipe.rb):

package "git"

homebrew_cask "firefox"

mac_app_store_app "Xcode" do
  app_id 497799835
end

Summary

Chef is a more comprehensive configuration management tool suitable for managing complex infrastructures across multiple platforms. It offers advanced features but comes with a steeper learning curve and higher overhead. Homebrew Bundle, on the other hand, is a simpler, more focused tool for managing packages and applications on macOS using Homebrew. While Chef provides greater flexibility and power, Homebrew Bundle offers a more straightforward approach for macOS-specific package management.

7,382

Server automation framework and application

Pros of Puppet

  • More comprehensive configuration management system for entire infrastructure
  • Supports a wide range of operating systems and platforms
  • Offers a declarative language for defining system configurations

Cons of Puppet

  • Steeper learning curve due to its complex DSL and architecture
  • Requires more setup and infrastructure compared to Homebrew Bundle
  • May be overkill for simple package management tasks on macOS

Code Comparison

Puppet manifest example:

package { 'nginx':
  ensure => installed,
}

service { 'nginx':
  ensure => running,
  enable => true,
}

Homebrew Bundle Brewfile example:

brew "nginx"
cask "firefox"
mas "Xcode", id: 497799835

Puppet offers a more powerful and flexible configuration management solution for complex infrastructures across multiple platforms. It uses a declarative language to define system states and manages dependencies between resources.

Homebrew Bundle, on the other hand, provides a simpler approach focused on macOS package management. It uses a straightforward Brewfile to list desired packages, casks, and Mac App Store applications, making it easier to set up and maintain development environments on macOS.

While Puppet excels in large-scale infrastructure management, Homebrew Bundle is more suitable for individual developers or small teams working primarily on macOS systems who need a lightweight solution for managing their development tools and applications.

42,146

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

Pros of Terraform

  • Powerful infrastructure-as-code tool for managing complex cloud resources
  • Supports multiple cloud providers and on-premises infrastructure
  • Offers a large ecosystem of providers and modules for extensibility

Cons of Terraform

  • Steeper learning curve, especially for those new to infrastructure-as-code
  • Requires more setup and configuration compared to Homebrew Bundle
  • Can be overkill for simple local development environments

Code Comparison

Terraform:

resource "aws_instance" "example" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
}

Homebrew Bundle:

brew "git"
cask "visual-studio-code"
mas "Xcode", id: 497799835

Key Differences

  • Terraform focuses on cloud infrastructure provisioning, while Homebrew Bundle manages local software installations
  • Terraform uses HCL (HashiCorp Configuration Language), whereas Homebrew Bundle uses a simple Ruby-based DSL
  • Terraform is more suitable for complex, multi-cloud environments, while Homebrew Bundle is ideal for setting up development machines

Use Cases

  • Use Terraform for managing cloud resources, server provisioning, and complex infrastructure setups
  • Use Homebrew Bundle for quickly setting up and maintaining consistent development environments on macOS
109,710

Production-Grade Container Scheduling and Management

Pros of kubernetes

  • Comprehensive container orchestration platform for deploying and managing large-scale applications
  • Robust ecosystem with extensive tooling and community support
  • Highly scalable and flexible for complex microservices architectures

Cons of kubernetes

  • Steeper learning curve and more complex setup compared to Homebrew Bundle
  • Requires more resources and infrastructure to run effectively
  • May be overkill for simple application deployments or local development environments

Code comparison

Kubernetes manifest (YAML):

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx

Homebrew Bundle Brewfile:

tap "homebrew/cask"
brew "nginx"
cask "firefox"

Summary

Kubernetes is a powerful container orchestration platform designed for large-scale, distributed applications. It offers extensive features for deployment, scaling, and management but comes with increased complexity. Homebrew Bundle, on the other hand, is a simpler tool for managing software packages on macOS, focusing on local development environments and package management. While Kubernetes uses YAML manifests for configuration, Homebrew Bundle uses a Ruby-based Brewfile for specifying packages and dependencies.

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 Bundle

Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual Studio Code.

Requirements

Homebrew (on macOS or Linux) for installing dependencies.

Homebrew Cask is optional and used for installing Mac applications.

mas-cli is optional and used for installing Mac App Store applications.

Whalebrew is optional and used for installing Whalebrew images.

Visual Studio Code is optional and used for installing Visual Studio Code extensions.

Installation

brew bundle is automatically installed when first run.

Usage

See the brew bundle section of the brew generate-man-completions output or brew bundle --help.

An example Brewfile:

# 'brew tap'
tap "homebrew/cask"
# 'brew tap' with custom Git URL
tap "user/tap-repo", "https://user@bitbucket.org/user/homebrew-tap-repo.git"
# 'brew tap' with arguments
tap "user/tap-repo", "https://user@bitbucket.org/user/homebrew-tap-repo.git", force_auto_update: true

# set arguments for all 'brew install --cask' commands
cask_args appdir: "~/Applications", require_sha: true

# 'brew install'
brew "imagemagick"
# 'brew install --with-rmtp', 'brew services restart' on version changes
brew "denji/nginx/nginx-full", args: ["with-rmtp"], restart_service: :changed
# 'brew install', always 'brew services restart', 'brew link', 'brew unlink mysql' (if it is installed)
brew "mysql@5.6", restart_service: true, link: true, conflicts_with: ["mysql"]
# install only on specified OS
brew "gnupg" if OS.mac?
brew "glibc" if OS.linux?

# 'brew install --cask'
cask "google-chrome"
# 'brew install --cask --appdir=~/my-apps/Applications'
cask "firefox", args: { appdir: "~/my-apps/Applications" }
# bypass Gatekeeper protections (NOT RECOMMENDED)
cask "firefox", args: { no_quarantine: true }
# always upgrade auto-updated or unversioned cask to latest version even if already installed
cask "opera", greedy: true
# 'brew install --cask' only if '/usr/libexec/java_home --failfast' fails
cask "java" unless system "/usr/libexec/java_home", "--failfast"

# 'mas install'
mas "1Password", id: 443_987_910

# 'whalebrew install'
whalebrew "whalebrew/wget"

# 'vscode --install-extension'
vscode "GitHub.codespaces"

Versions and lockfiles

Homebrew is a rolling release package manager so it does not support installing arbitrary older versions of software. If your software needs specific pinned versions, consider whalebrew lines in your Brewfile to install Docker containers.

After a successful brew bundle run, it creates a Brewfile.lock.json to record the environment. If a future brew bundle run fails, you can check the differences between Brewfile.lock.json to debug. As it can contain local environment information that varies between systems, it's not worth committing to version control on multi-user repositories.

Disable generation of the Brewfile.lock.json file by setting the environment variable with export HOMEBREW_BUNDLE_NO_LOCK=1 or by using the command-line argument brew bundle --no-lock.

New Installers/Checkers/Dumpers

brew bundle currently supports Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual Studio Code.

We are interested in contributions for other installers/checkers/dumpers but they must:

  • be able to install software without user interaction
  • be able to check if software is installed
  • be able to dump the installed software to a format that can be stored in a Brewfile
  • not require sudo to install
  • be extremely widely used

Note: based on these criteria, we would not accept e.g. Whalebrew (but have no plans to remove it.)

Tests

Tests can be run with bundle install && bundle exec rspec. Syntax linting can be run with brew style homebrew/bundle.

Copyright

Copyright (c) Homebrew maintainers and Andrew Nesbitt. See LICENSE for details.