Skip to content

anypackage/homebrew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnyPackage.Homebrew

gallery-image build-image cf-image

AnyPackage.Homebrew is an AnyPackage provider that facilitates installing Homebrew packages from any compatible repository.

Requirements

In addition to PowerShell 7+ and an Internet connection on a MacOS or Linux machine, Homebrew must also be installed.

Install AnyPackage.Homebrew

Install-Module AnyPackage.Homebrew -Force

Import AnyPackage.Homebrew

Import-Module AnyPackage.Homebrew

Sample usages

Search for a package

Find-Package -Name node -Repository homebrew/core

Find-Package -Name firefox

Install a package

Find-Package -Name node -Repository homebrew/core | Install-Package

Install-Package -Name firefox

Get list of installed packages (with wildcard search support)

Get-Package lib*

Uninstall a package

Get-Package node | Uninstall-Package

Uninstall-Package firefox

Manage package sources

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.

Known Issues

Stability

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.

Legal and Licensing

AnyPackage.Homebrew is licensed under the MIT license.