Which of Homebrew or mas-cli to choose when a package is available via both?
Solution 1:
Both the Mac App Store (to which the mas you mention is a command-line interface) and Homebrew are package managers in their own rights, only difference being that former comes from 1st party while the latter is a open-source, community developed one.
The end result in either case is almost the same (the app bundle getting installed under /Applications
directory). Below are some differences in terms of how the package management (installation/uninstallation) gets affected in either case, which helps in making a decision with which one to choose:
-
Using Homebrew lets one script and automate the package management.
-
Homebrew allows access to
zap
verb, which alongside uninstalling the app also deletes any associated metadata file(s). -
Installing via Homebrew may let you gain access to the latest version of the app earlier than the Mac App Store, as the update released via latter wait for the approval from the App Store review team.
On the other hand, an update released via Mac App Store is assured to have passed through the review team.
-
Most often the apps made available via either would align in their version number (except for the brief period of time when the version numbers mismatch as an update waits for review), and you should be able to install it either way without much of a difference.
-
Unless if there's an app which is still available on the App Store, but no longer sees any updates, but gets updates via Homebrew, going either way would let you get access to the latest version.
Taking into consideration all of the above, here's an approach that I take personally. If an app sees active updates on both the platforms, I prefer installing it via Homebrew over Mac App Store.