Suppose I have added a new tap to Brew using
brew tap ....
I've tried looking into
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?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
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)'
brew tap-info homebrew/cask-fonts --jsonlists JSON info of the taps and some other stuff (output)
jq -r '.removes the outside square bracket (output)
|(.cask_tokens)'gets the JSON value of the key
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)'