All you have to do is to edit the default formula and customize it for your purpose, which is being keg-only. It is actually very easy to make your own customized version of formulas, and once you edit a formula, Homebrew keeps your personalized version for future uses.

So, just edit the formula file (for the specific tap version you intend to install) and add `keg-only "My reason for making this keg-only"`

within the formula class.

In case you haven't edited a formula before, read these few lines from Homebrew's FAQ in order to learn how to do so:

### Can I edit formulae myself?

Yes! It’s easy! Just `brew edit $FORMULA`

.
You don’t have to submit modifications back to *Homebrew/homebrew*,
just edit the formula as you personally need it and `brew install`

.
As a bonus `brew update`

will merge your changes with upstream
so you can still keep the formula up-to-date
**with** your personal modifications!

`brew edit`

. – Mark Reed Sep 17 '14 at 10:52