If people are trying to `brew install` an existing version it’s worth
pointing out to them how they can reinstall (as it’s pretty much the
only case where we’re not already suggesting another command).
This is the (partially) documented public API for Homebrew.
The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.