Skip to content

info: add Binaries section listing executables#22150

Merged
MikeMcQuaid merged 4 commits intoHomebrew:mainfrom
HaraldNordgren:info/primary-binary-path
May 6, 2026
Merged

info: add Binaries section listing executables#22150
MikeMcQuaid merged 4 commits intoHomebrew:mainfrom
HaraldNordgren:info/primary-binary-path

Conversation

@HaraldNordgren
Copy link
Copy Markdown
Contributor

@HaraldNordgren HaraldNordgren commented May 6, 2026

List the formula's bin/ and sbin/ executables in a new ==> Binaries section before ==> Caveats.

For installed formulae the list is read from the linked keg; for not-installed formulae --fetch-manifest triggers a fallback that reads from the bottle manifest, mirroring how Bottle Size and Installed Size already behave:

❯ brew info coreutils --fetch-manifest
==> coreutils ↑: 9.6 → stable 9.11 (bottled), HEAD
GNU File, Shell, and Text utilities
https://www.gnu.org/software/coreutils/
Conflicts with:
  b2sum (because both install `b2sum` binaries)
  gfold (because both install `gfold` binaries)
  idutils (because both install `gid` and `gid.1`)
Installed (on request)
/opt/homebrew/Cellar/coreutils/9.6 (465 files, 12.3MB) *
  Poured from bottle using the formulae.brew.sh API on 2025-02-12 at 09:59:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/c/coreutils.rb
License: GPL-3.0-or-later
==> Dependencies
Required (1): gmp ✔
Recursive Runtime (1): all installed ✔
==> Options
--HEAD
	Install HEAD version
==> Binaries
b2sum       gchcon      gdf         gfold       gmd5sum     gpaste      gruncon     gstat       gtrue       gwho        tac
base32      gchgrp      gdir        ggroups     gmkdir      gpathchk    gseq        gstdbuf     gtruncate   gwhoami     timeout
basenc      gchmod      gdircolors  ghead       gmkfifo     gpinky      gsha1sum    gstty       gtsort      gyes
chcon       gchown      gdirname    ghostid     gmknod      gpr         gsha224sum  gsum        gtty        hostid
factor      gchroot     gdu         gid         gmktemp     gprintenv   gsha256sum  gsync       guname      nproc
g[          gcksum      gecho       ginstall    gmv         gprintf     gsha384sum  gtac        gunexpand   numfmt
gb2sum      gcomm       genv        gjoin       gnice       gptx        gsha512sum  gtail       guniq       pinky
gbase32     gcp         gexpand     gkill       gnl         gpwd        gshred      gtee        gunlink     ptx
gbase64     gcsplit     gexpr       glink       gnohup      greadlink   gshuf       gtest       guptime     runcon
gbasename   gcut        gfactor     gln         gnproc      grealpath   gsleep      gtimeout    gusers      shred
gbasenc     gdate       gfalse      glogname    gnumfmt     grm         gsort       gtouch      gvdir       shuf
gcat        gdd         gfmt        gls         god         grmdir      gsplit      gtr         gwc         stdbuf
==> Caveats
Commands also provided by macOS and the commands dir, dircolors, vdir have been installed with the prefix "g".
If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH with:
  PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
==> Analytics
install: 114,135 (30 days), 310,879 (90 days), 1,010,611 (365 days)
install-on-request: 107,029 (30 days), 290,224 (90 days), 902,767 (365 days)
build-error: 39 (30 days)

List the formula's bin/ and sbin/ executables in a new `==> Binaries`
section before `==> Caveats`. For installed formulae the list is read
from the linked keg; for not-installed formulae `--fetch-manifest`
triggers a fallback that reads from the bottle manifest, mirroring
how `Bottle Size` and `Installed Size` already behave.
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @HaraldNordgren, I think this is too wordy to be the default. Having it with --verbose might be a better fit?

@HaraldNordgren
Copy link
Copy Markdown
Contributor Author

HaraldNordgren commented May 6, 2026

@MikeMcQuaid Yeah, make sense! The complication is that we need to fetch the manifest, so it's essentially gated by --fetch-manifest. Should we require both flags, or --verbose to trigger --fetch-manifest implicitly?

Move the `==> Binaries` section behind `--verbose` (`-v`) so the
default `brew info` output stays concise.
@HaraldNordgren
Copy link
Copy Markdown
Contributor Author

HaraldNordgren commented May 6, 2026

Hmm, I checked the -v flag and it's quite annoying to get all the analytics there as well? As an end-user I don't care about it, but I should care about which binaries will be installed on my machine 🤗

❯ brew info coreutils -v
==> coreutils ↑: 9.6 → stable 9.11 (bottled), HEAD
GNU File, Shell, and Text utilities
https://www.gnu.org/software/coreutils/
Conflicts with:
  b2sum (because both install `b2sum` binaries)
  gfold (because both install `gfold` binaries)
  idutils (because both install `gid` and `gid.1`)
Installed (on request)
/opt/homebrew/Cellar/coreutils/9.6 (465 files, 12.3MB) *
  Poured from bottle using the formulae.brew.sh API on 2025-02-12 at 09:59:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/c/coreutils.rb
License: GPL-3.0-or-later
==> Dependencies
Required (1): gmp ✔
Recursive Runtime (1): all installed ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
Commands also provided by macOS and the commands dir, dircolors, vdir have been installed with the prefix "g".
If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH with:
  PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
==> Analytics
==> install (30 days)
Index | Name (with options)                                                                                                                                                                                                                 |   Count |  Percent
-----:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------:|--------:
1     | coreutils                                                                                                                                                                                                                           | 114,018 |   99.90%
2     | coreutils --HEAD                                                                                                                                                                                                                    |     117 |    0.10%
Total |                                                                                                                                                                                                                                     | 114,135 |  100.00%
==> install (90 days)
Index | Name (with options)                                                                                                                                                                                                                 |   Count |  Percent
-----:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------:|--------:
1     | coreutils                                                                                                                                                                                                                           | 310,659 |   99.93%
2     | coreutils --HEAD                                                                                                                                                                                                                    |     220 |    0.07%
Total |                                                                                                                                                                                                                                     | 310,879 |  100.00%
==> install (365 days)
Index | Name (with options)                                                                                                                                                                                                               |     Count |  Percent
-----:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------:|--------:
1     | coreutils                                                                                                                                                                                                                         | 1,009,556 |   99.90%
2     | coreutils --HEAD                                                                                                                                                                                                                  |     1,055 |    0.10%
Total |                                                                                                                                                                                                                                   | 1,010,611 |  100.00%
==> install-on-request (30 days)
Index | Name (with options)                                                                                                                                                                                                                 |   Count |  Percent
-----:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------:|--------:
1     | coreutils                                                                                                                                                                                                                           | 106,914 |   99.89%
2     | coreutils --HEAD                                                                                                                                                                                                                    |     115 |    0.11%
Total |                                                                                                                                                                                                                                     | 107,029 |  100.00%
==> install-on-request (90 days)
Index | Name (with options)                                                                                                                                                                                                                 |   Count |  Percent
-----:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------:|--------:
1     | coreutils                                                                                                                                                                                                                           | 290,007 |   99.93%
2     | coreutils --HEAD                                                                                                                                                                                                                    |     217 |    0.07%
Total |                                                                                                                                                                                                                                     | 290,224 |  100.00%
==> install-on-request (365 days)
Index | Name (with options)                                                                                                                                                                                                                 |   Count |  Percent
-----:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------:|--------:
1     | coreutils                                                                                                                                                                                                                           | 901,715 |   99.88%
2     | coreutils --HEAD                                                                                                                                                                                                                    |   1,052 |    0.12%
Total |                                                                                                                                                                                                                                     | 902,767 |  100.00%
==> build-error (30 days)
Index | Name (with options)                                                                                                                                                                                                                   | Count |  Percent
-----:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------:|--------:
1     | coreutils                                                                                                                                                                                                                             |    38 |   97.44%
2     | coreutils --HEAD                                                                                                                                                                                                                      |     1 |    2.56%
Total |                                                                                                                                                                                                                                       |    39 |  100.00%

@MikeMcQuaid
Copy link
Copy Markdown
Member

@HaraldNordgren I think it's bit weird to have --fetch-manifest change behaviour/be needed. --verbose already downloads analytics files inline, for instance.

I don't think we're going to be able to get to an output that everyone agrees is not too much/just enough. I think the specific binaries are useful to have but you're the first person I've heard request it directly.

#22141 may be interesting because I'm moving more in a --verbose vs. --quiet direction there and, by default, a single formula is a bit more verbose and multiple a bit more quiet.

Trigger the bottle manifest fetch under `--verbose` so users don't
need to combine `-v` with `--fetch-manifest`. Mirrors how `-v`
already pulls analytics inline.
@HaraldNordgren
Copy link
Copy Markdown
Contributor Author

HaraldNordgren commented May 6, 2026

@MikeMcQuaid Done, hid this behind the --verbose flag, which now also fetches manifesto.

Comment thread Library/Homebrew/cmd/info.rb
@HaraldNordgren
Copy link
Copy Markdown
Contributor Author

HaraldNordgren commented May 6, 2026

@MikeMcQuaid One thing I realized now, Git has multiple levels of verbosity ('-v' and '-vv'), potentially the analytics could be hidden behind double verbosity level since it takes over the output otherwise, and leave single verbosity for things that are more customer-facing (binaries and formula size).

@MikeMcQuaid
Copy link
Copy Markdown
Member

@HaraldNordgren I'd rather we kept with one level of verbosity for now.

@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 6, 2026
Merged via the queue into Homebrew:main with commit 2a79030 May 6, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants