Introduction
Install Level's managed Homebrew on a macOS device as part of an automation. Use this action when you want to ensure Homebrew is present on a device before other steps run — for example, at the start of a macOS onboarding automation.
ℹ️ NOTE: You don't need this action before every Install Homebrew Package step. If Level's Homebrew isn't on a device yet, the package install actions set it up automatically. Use Install Homebrew when you want Homebrew present regardless of whether you're installing packages right away.
Install Homebrew
From the automation pipeline in edit mode, click + Add action and select Install Homebrew from the App management category. The action panel opens with two sections: Action type (pre-set to Install Homebrew) and Step configuration.
Configuring the Step
Install Homebrew has no base configuration options. Save the action and Level handles the rest on the target device.
How Level Manages Homebrew
Level doesn't install Homebrew the same way a user would from the terminal. It sets up a dedicated homebrew system user account on the device and transfers ownership of Homebrew to that account. This follows Homebrew's own recommendation for managed environments.
The homebrew user is configured with passwordless sudo, with its configuration stored at /etc/sudoers.d/homebrew.
ℹ️ NOTE: If Homebrew was already installed on the device before this action runs, Level reconfigures it — transferring ownership to the homebrew user rather than leaving it under the previous user. The existing installation is preserved; only the ownership changes.
Running Brew Commands Manually
Because Homebrew is owned by the homebrew user, commands sent directly as another user won't work as expected.
The full form is:
sudo -E -H -u homebrew brew [COMMAND]
Level installs a wrapper script at /usr/local/bin/brew that handles this automatically, so in practice you can run:
brew [COMMAND]
💡 TIP: When running brew commands through Level's background management terminal, use the short form (brew install wget, for example). The wrapper script is in place and takes care of the user context.
When you run a command through the wrapper, you'll see an informational banner like:
NOTE: Homebrew is managed by Level on this device: https://docs.level.io/...
This is expected — it's a reminder that the Homebrew install is Level-managed, not a warning or error.
Conditions
The Conditions section lets you restrict when this action runs based on device attributes or the outcome of a previous action. Expand the section to add conditions.
See Action Conditions for the full reference on condition types, operators, and values.
Additional Options
Expand Additional options for additional execution settings including action name, failure behavior, output variables, and retries.
See Actions Overview for the full reference on additional options available on every action.
FAQ
Do I need this action before every Install Homebrew Package step? No. If Level's Homebrew isn't on a device, the package install actions install it automatically. Use this action when you want to guarantee Homebrew is present as a standalone step, independent of package installs.
What happens if Homebrew is already installed on the device? Level reconfigures the existing installation to be owned by the
homebrewuser. The packages already installed are preserved; only ownership transfers.Why is there a "homebrew" user account on my device after this runs? Level follows Homebrew's recommendation of using a dedicated user account to own and manage the Homebrew installation. This isolates Homebrew from regular user accounts and is the expected behavior.
What's the banner I see when running brew commands? It's an informational note confirming that Homebrew on this device is managed by Level. It's not an error — you can ignore it.
Does this work on Windows or Linux? No. Homebrew is macOS only. This action is not available for Windows or Linux devices.
Who can add or modify this action in an automation? Technicians with permission to edit automations in the relevant group. See Workspace → Permissions for access control configuration.
What happens if the device is offline when this action runs? The action queues and resumes once the device comes back online.

