From this Stack Overflow article:
List of formulae in a tap can be found by running
brew tap-info $TAP --jsonTo 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 --json lists 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 cask_tokensTL;DR: Running will give you the formulae from that tap.brew tap-info <tap-here> --json | jq -r '.[]|(.cask_tokens[])'
Note If this fails to list all try running brew tap-info <tap-here> --json | jq -r '.[]|(.formula_names[],.cask_tokens[])'
The list of formulas in a tap is exposed in .brew tap-info $TAP --json
From here, you can use a JSON command line parser to extract the list, such as :jq
For example, to list all the formulas from homebrew/cask-fonts and kde-mac/kde:
brew tap-info homebrew/cask-fonts kde-mac/kde --json | jq -r '.[]|(.formula_names[],.cask_tokens[])'
Taps are sources of formulae. A formula is a file that describes how to install software. The main tap is but anybody can create one. Taps are managed with the homebrew/core and brew tap commands.brew untap
When Homebrew tells you it’s "", it means it’s looking for an searching local taps formula in one of the taps you have locally. If one of the formula it finds is installed locally, it’ll show it in bold with a little checkmark next to it:ocaml
# OCaml is installed
$ brew search ocaml
==> Searching local taps...
ocaml ✔ ocamlbuild ocamlsdl
# Ocaml is NOT installed
$ brew search ocaml
==> Searching local taps...
ocaml ocamlbuild ocamlsdl
As you can see in your case, you don’t get that checkmark so Ocaml is not installed. You can be sure by typing :brew info ocaml
$ brew info ocaml
ocaml: stable 4.05.0 (bottled), HEAD
General purpose programming language in the ML family
https://ocaml.org/
Not installed <--------- look here
...
As for taps you can list those you have locally using :brew tap
$ brew tap
homebrew/core
homebrew/services
homebrew/fuse
homebrew/nginx
homebrew/php
...
The exact output may vary but you’ll always have at least .homebrew/core
To add a new tap, use :brew tap <tap>
brew tap homebrew/science
To remove a tap, use :brew untap <tap>
brew untap homebrew/science
Note you can’t remove .homebrew/core
Try .brew list --full-name
It puts the tap name in front of the formula name for all installed formulas that do not belong to the core tap ().homebrew/core
The new way to list all installable cask packages is:
brew search --casks
The man page for brew has the following information:
search --casks
Display all locally available casks (including tapped ones). No online search is performed.
Update:
While the documentation didn't change, seems like search-text is now mandatory. We can specify * by adding a as parameter (to avoid it thinking we are referring to the content of the current directory). So basically it's possible to do:
\*brew search --casks \*
brew bundleWe can list all taps, formulae and casks that were added by the user on stdout:
brew bundle dump --file -
Or we can do it manually, without using .brew bundle
brew tapsbrew tap
brew formulae installed on requestThis ignores any formulae that were added automatically as dependencies, but unlike will still show any packages that are dependencies if you installed them manually as well, and avoids listing 'orphaned' packages:brew leaves
brew info --json=v2 --installed \
| jq -r '.formulae[]|select(any(.installed[]; .installed_on_request)).full_name'
brew casks installedAt the time of writing (2022-03-20) doesn't keep track of which casks were installed on request, but few if any casks are dependencies for other casks/formulae, so we can simply list them all:brew
brew list --cask -l1