When an installed formula is missing and its source has migrated
to a new tap, Homebrew warns the user about this, saying:
You can access it again by running:
brew tap new-name
And then you can install it by running:
brew cask install new-name
Unfortunately, the "brew cask install" incantation is deprecated
and the advice won't work:
Error: Calling brew cask install is disabled! Use brew install [--cask] instead.
This alters the advice to use the new "brew install --cask" notation,
fixing the advice presented to the user.
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.