Skip to content

Commit

Permalink
Several readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom committed Mar 16, 2024
1 parent eb0cb61 commit e648a1f
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
[build-image]: https://img.shields.io/github/actions/workflow/status/anypackage/Homebrew/ci.yml
[cf-image]: https://img.shields.io/codefactor/grade/github/anypackage/Homebrew
[gallery-site]: https://www.powershellgallery.com/packages/AnyPackage.Homebrew
[build-site]: https://github.com/anypackage/Homebrew/actions/workflows/ci.yml
[build-site]: https://github.com/anypackage/homebrew/actions/workflows/CI.yml
[cf-site]: https://www.codefactor.io/repository/github/anypackage/Homebrew

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

## Requirements

Your machine must have at least Windows 10 1709 or Windows 11 and either PowerShell 5.1+ or PowerShell 7.0.1+, and the Homebrew CLI utility installed. It may be already installed on your machine, but if not, Microsoft's recommended method for installing Homebrew is via the Microsoft Store as part of the [App Installer](https://www.microsoft.com/en-us/p/app-installer/9nblggh4nns1?activetab=pivot:overviewtab) package.
In addition to PowerShell 7+ and an Internet connection on a MacOS or Linux machine, [Homebrew](https://brew.sh/) must also be installed.

## Install AnyPackage.Homebrew

Expand All @@ -34,51 +34,48 @@ Import-Module AnyPackage.Homebrew
### Search for a package

```PowerShell
Find-Package -Name OpenJS.NodeJS
Find-Package -Name node -Repository homebrew/core
Find-Package -Name Mozilla.Firefox
Find-Package -Name firefox
```

### Install a package

```PowerShell
Find-Package OpenJS.NodeJS | Install-Package
Find-Package -Name node -Repository homebrew/core | Install-Package
Install-Package -Name Git.Git
Install-Package -Name firefox
```

### Get list of installed packages (with wildcard search support)

```PowerShell
Get-Package Microsoft.*
Get-Package lib*
```

### Uninstall a package

```PowerShell
Get-Package OpenJS.NodeJS| Uninstall-Package
Uninstall-Package Git.Git
Get-Package node | Uninstall-Package
Uninstall-Package firefox
```

### Manage package sources

```PowerShell
Register-PackageSource privateRepo -Provider Homebrew -Location 'https://somewhere/out/there/cache'
Find-Package OpenJS.NodeJS -Source privateRepo | Install-Package
Find-Package node -Source privateRepo | Install-Package
Unregister-PackageSource privateRepo
```

AnyPackage.Homebrew integrates with Homebrew.exe to manage and store source information.
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 still being heavily in development, it's output patterns fluctuate regularly, making a Cresdendo-based implementation very brittle. As such, currently this provider **should not** be used in production scenarios.

### Search Specificity

Due to Homebrew's ambiguous search behavior and the risks of unintended outcomes, this provider only allows searching of packages on remote repositories by exact package ID. Fuzzy searches and searches by moniker, display name, and tag are not supported.
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

Expand Down

0 comments on commit e648a1f

Please sign in to comment.