How can I see all formulae available in a specific tap using Brew?

Suppose I have added a new tap to Brew using brew tap ....

I've tried looking into brew search, brew tap, and brew tap-info, but none of these subcommand present any suitable options.

How can I list all formulae available within that tap?


Solution 1:

From this Stack Overflow article:

List of formulae in a tap can be found by running brew tap-info $TAP --json

To turn this into a proper readable format we can run brew tap-info $TAP --json | jq -r '.[]|(.cask_tokens[])'

Example: To find all formulae in homebrew/cask-fonts we can do: brew tap-info homebrew/cask-fonts --json | jq -r '.[]|(.cask_tokens[])'

Break down of the command:

  1. brew tap-info homebrew/cask-fonts --json lists JSON info of the taps and some other stuff (output)
  2. jq -r '.[] removes the outside square bracket (output)
  3. |(.cask_tokens[])' gets the JSON value of the key cask_tokens

TL;DR: Running brew tap-info <tap-here> --json | jq -r '.[]|(.cask_tokens[])' will give you the formulae from that tap.

Note If this fails to list all try running brew tap-info <tap-here> --json | jq -r '.[]|(.formula_names[],.cask_tokens[])'