Category filter

Script to install Homebrew on Mac

For maximum productivity at work, employees must have access to updated software. However, managing the updates and requirements of each program on corporate devices can be a massive burden for users. Homebrew is a package manager that helps install libraries, packages, and other dependencies required to execute applications in any environment. With Hexnode’s Execute Custom Script action, deploy Homebrew on target macOS devices using customized scripts.


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Script for Homebrew Installation

This customized script first checks if Homebrew is already installed on your device and, if not, checks for a series of conditions to prepare the device for installing Homebrew. Macs without Apple Silicon processors require Rosetta to install Homebrew. The script automatically downloads Rosetta for Intel processor Macs if it’s not present. The script will install Homebrew on the currently logged-in user.


  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository