AnyPackage.Homebrew is an AnyPackage provider that facilitates installing Homebrew packages from any compatible repository.
In addition to PowerShell 7+ and an Internet connection on a MacOS or Linux machine, Homebrew must also be installed.
Install-Module AnyPackage.Homebrew -Force
Import-Module AnyPackage.Homebrew
Find-Package -Name node -Repository homebrew/core
Find-Package -Name firefox
Find-Package -Name node -Repository homebrew/core | Install-Package
Install-Package -Name firefox
Get-Package lib*
Get-Package node | Uninstall-Package
Uninstall-Package firefox
Register-PackageSource privateRepo -Provider Homebrew -Location 'https://somewhere/out/there/cache'
Find-Package node -Source privateRepo | Install-Package
Unregister-PackageSource privateRepo
AnyPackage.Homebrew integrates with brew
to manage and store source information.
Homebrew does not currently have an official module available on PowerShell Gallery, therefore this provider currently depends on a Cresendo module that is a best-effort attempt at parsing Homebrew's output. Due to Homebrew's output patterns fluctuating regularly, making a Cresdendo-based implementation is very brittle. As such, currently this provider should not be used in production scenarios.
AnyPackage.Homebrew is licensed under the MIT license.