This is an extension on the OSX package manager, Homebrew, that makes it easy to find and manage Homebrew's external-commands.
Currently WIP
Search for all external-commands with 'growl' in the name.
brew ext search growl
Search for all external-commands with 'growl' in the description.
brew ext search --desc growl
Print description of the external-command 'brew-growl'.
brew ext desc brew-growl
Open the home page for external-command 'brew-growl'.
brew ext home brew-growl
Install the external-command 'brew-growl'.
brew ext install brew-growl
Remove the external-command 'brew-growl'.
brew ext uninstall brew-growl
You can upload easily add your own external-commands so they are picked up by homebrew. Just submit a manifest.
For example the manifest for an external-command like brew-growl
from the list
would is represented with a simple YAML file like this:
---
name: brew-growl
desc: Get Growl notifications for Homebrew
home: https://github.com/secondplanet/homebrew-growl
install: # Prepend each line with 'brew' before executing
- tap secondplanet/growl
- install brew-growl
uninstall: # Same as above
- uninstall brew-growl
- untap secondplanet/growl
test: # Each must: [$?==0] after 'install' & [$?!=0] after 'uninstall'
- command growl
- growl on
---
Granted, even this example has problems, b/c brew-growl.rb
doesn't list its
dependency on growlnotify
. However, I think it also get's a lot of stuff right:
- The problem caused by missing requirements would be caught by at least one of the tests.
- Our package only stores what commands to execute, which leaves the burden of maintenance on the original dev.
- Because the commands are universal and generic, we have very loose coupling with the formula/tap, which minimizes maintenance burden when the tap/formula gets updated, modified, or even changes repos.
- Using
brew
commands gives us a basic guarantee against arbitrary shell commands and dependencies. - Having tests allows us to verify installs, detect breaking changes, and collect (and report) metrics about whether or not an extcmd "works" for a majority of users. This could potentially be reported to the maintainer.
- Storing a GitHub homepage means we can relate metrics to the user and indicate the health/volatility of the extension.
- It's a simple and popular format with a very low barrier to entry, which should make it as easy as possible for developers to add and maintain their associated extcmds package.
All in all, I think this goes a long way towards meetings the goals of such a system. To clarify they are:
- Maintaining a relationship (with mutual feedback) between extcmd devs and the users who want to experiment with and use them.
- Lower barriers to entry for users looking for more features in Homebrew.
- Lower barriers to entry for devs who wish to add more features to Homebrew.
- Minimize maintenance upkeep for the maintainers of both the extcmd repo and the extcmd tap/formula.
- Ease integration of extcmds into brew by providing clear measures for eliability and desirability.
Please let me know what you think.
- Am I off the mark?
- Where/Why will this system not work?
- What could be improved?