Until we figure out how to allow --tree to show optional dependencies in
a way that fits on a normal screen, this helps to explain the
discrepancy between `brew deps` and `brew deps --tree`.
ClosesHomebrew/homebrew#41841.
ClosesHomebrew/homebrew#41947.
We're (finally) working on a documented public API for Homebrew. It's currently a work in progress; a bunch of public stuff is documented and a bunch of private stuff is undocumented. Sorry about that!
The main class you should look at is {Formula}. Assume everything else is private for now.