Skip to content

info: unify formula and cask output - #24573

Merged
HaraldNordgren merged 1 commit into
Homebrew:mainfrom
HaraldNordgren:haraldnordgren-unify-cask-formula-info
Nov 11, 2026
Merged

HaraldNordgren merged 1 commit into
Homebrew:mainfrom
HaraldNordgren:haraldnordgren-unify-cask-formula-info

Conversation

@HaraldNordgren

@HaraldNordgren HaraldNordgren commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Make brew info output more consistent between formulae and casks so that installed versions and their status are easier to compare.

  • Share formatting for the info summary, deprecation messages, requirements, dependencies and installed version rows.
  • Show installed cask siblings under Installed Versions, including upgrade status when applicable.
  • Group cask apps, fonts, manpages and plugins under their own headings, with less common types under Artifacts. Show binaries with --verbose.
  • Show cask installation paths and receipt details only with --verbose, matching formula output.
  • Place deprecation messages and metadata consistently across formulae and casks.
  • Add full-output tests and document the cask display.

Reproduction

With an installed versioned cask such as gimp@dev:

  1. Run brew info gimp to see the installed sibling without its Caskroom path and receipt details.
  2. Run brew info -v gimp to see those details and any binaries.

Before this change, cask installation details appeared even without --verbose, unlike formula installation details.

Example output

Before (main)

▶ brew info font-hack-nerd-font gimp@dev
==> font-hack-nerd-font ↑ (Hack Nerd Font (Hack)): 3.4.0 → 3.5.1
https://github.com/ryanoasis/nerd-fonts
Installed (on request)
/usr/local/Caskroom/font-hack-nerd-font/3.4.0 (32.2MB)
  Installed using the internal formulae.brew.sh API on 2026-07-04 at 21:34:47
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/font/font-h/font-hack-nerd-font.rb
==> Artifacts
HackNerdFont-Bold.ttf (Font)
HackNerdFont-BoldItalic.ttf (Font)
HackNerdFont-Italic.ttf (Font)
HackNerdFont-Regular.ttf (Font)
HackNerdFontMono-Bold.ttf (Font)
HackNerdFontMono-BoldItalic.ttf (Font)
HackNerdFontMono-Italic.ttf (Font)
HackNerdFontMono-Regular.ttf (Font)
HackNerdFontPropo-Bold.ttf (Font)
HackNerdFontPropo-BoldItalic.ttf (Font)
HackNerdFontPropo-Italic.ttf (Font)
HackNerdFontPropo-Regular.ttf (Font)

==> gimp@dev ✔ (GIMP development version): 3.2.0-RC3
Free and open-source image editor
https://www.gimp.org/
Installed (on request)
/usr/local/Caskroom/gimp@dev/3.2.0-RC3 (844MB)
  Installed using the internal formulae.brew.sh API on 2026-11-09 at 15:05:50
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/g/gimp@dev.rb
==> Artifacts
GIMP.app (App)
.homebrew-command-wrappers/gimp -> gimp (Command Wrapper)

After

▶ brew info font-hack-nerd-font
==> font-hack-nerd-font ↑ (Hack Nerd Font (Hack)): 3.4.0 → 3.5.1
https://github.com/ryanoasis/nerd-fonts
Installed (on request)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/font/font-h/font-hack-nerd-font.rb
==> Installed Versions
font-hack-nerd-font ↑ 3.4.0 → 3.5.1 (32.2MB)
==> Fonts
HackNerdFont-Bold.ttf
HackNerdFont-BoldItalic.ttf
HackNerdFont-Italic.ttf
HackNerdFont-Regular.ttf
HackNerdFontMono-Bold.ttf
HackNerdFontMono-BoldItalic.ttf
HackNerdFontMono-Italic.ttf
HackNerdFontMono-Regular.ttf
HackNerdFontPropo-Bold.ttf
HackNerdFontPropo-BoldItalic.ttf
HackNerdFontPropo-Italic.ttf
HackNerdFontPropo-Regular.ttf

▶ brew info gimp@dev
==> gimp@dev ✔ (GIMP development version): 3.2.0-RC3
Free and open-source image editor
https://www.gimp.org/
Installed (on request)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/g/gimp@dev.rb
==> Installed Versions
gimp@dev ✔ 3.2.0-RC3 (844MB)
==> Apps
GIMP.app

▶ brew info -v gimp
==> gimp (GIMP, GNU Image Manipulation Program): 3.2.8
Free and open-source image editor
https://www.gimp.org/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/g/gimp.rb
==> Installed Versions
gimp@dev ✔ 3.2.0-RC3 (844MB)
  Caskroom: /usr/local/Caskroom/gimp@dev/3.2.0-RC3
  Installed using the internal formulae.brew.sh API on 2026-11-09 at 15:05:50
==> Apps
GIMP.app
==> Binaries
gimp

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; every commit has a human author or co-author and I will answer maintainer questions and review comments myself without AI/LLM.

GitHub Copilot using GPT-6 Luna and GPT-6.1 Terra implemented and tested the changes. Verification included the unit tests, the formula output comparison against main and brew lgtm --online.


Share info formatting and align cask output with formulae.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Summary

Summary by CodeRabbit

  • New Features
    • brew info now groups cask apps, fonts, manpages, plugins and other artifacts under separate headings. Use --verbose to see binaries and command wrappers.
    • Installed cask versions now include size, location and receipt details.
  • Improvements
    • Formula and cask information is presented in a more consistent format, including clearer installation, dependency and requirements details.
  • Documentation
    • Updated the brew info guide to describe the artifact sections and verbose output.

brew info now uses shared formatting helpers for formula and cask output. Cask artifacts appear under category headings, and verbose output includes binaries and additional installed-version details. Tests and documentation cover these output changes.

Changes: Shared brew info output

Layer / File(s) Summary
Shared display helpers
Library/Homebrew/utils/info_display.rb, Library/Homebrew/test/utils/info_display_spec.rb
Utils::InfoDisplay adds shared formatting for package summaries, requirements, binaries, dependency counts, metadata, and installed-version sections.
Formula info output
Library/Homebrew/cmd/info.rb, Library/Homebrew/test/cmd/info_spec.rb
Formula output now passes package data and structured installed-version rows to shared helpers. Dependency, requirement, and verbose binary sections also use shared formatting.
Cask info output
Library/Homebrew/cask/info.rb, Library/Homebrew/test/cask/info_spec.rb, docs/Querying-Brew.md
Cask output uses shared summaries and installed-version rows. Artifacts are grouped by category, and verbose output includes binaries and additional installed-version details.
Merge Risk: Moderate · up to 237a4

Verbose brew info --installed and multi-cask queries can become slow with many installed casks. Formulae with a requirement for the current OS may also hide build dependencies in brew info, and normal cask output no longer flags a missing staged path. Address these before merging, or explicitly accept them.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description directly matches the changeset. It explains the shared formatting, installed cask versions, grouped artifacts, verbose output, tests, documentation, and verification steps.
Title check Passed The title clearly and concisely describes the main change: shared and consistent formula and cask info output.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b90c7a6-4cfa-4c91-b24b-c3f6b18b1a0f
Commits

Reviewing files that changed from the base of the PR and between 2ea376f and 237a47e.

Files selected for processing: 7

  • Library/Homebrew/cask/info.rb
  • Library/Homebrew/cmd/info.rb
  • Library/Homebrew/test/cask/info_spec.rb
  • Library/Homebrew/test/cmd/info_spec.rb
  • Library/Homebrew/test/utils/info_display_spec.rb
  • Library/Homebrew/utils/info_display.rb
  • docs/Querying-Brew.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread docs/Querying-Brew.md Resolved
Comment thread Library/Homebrew/cask/info.rb Resolved
Comment thread Library/Homebrew/cask/info.rb Resolved
Comment thread Library/Homebrew/utils/info_display.rb Resolved
@HaraldNordgren HaraldNordgren changed the title Unify formula and cask info output info: Unify formula and cask output Nov 11, 2026
@HaraldNordgren HaraldNordgren changed the title info: Unify formula and cask output info: unify formula and cask output Nov 11, 2026
@MikeMcQuaid

Copy link
Copy Markdown
Member

/usr/local/Caskroom/font-hack-nerd-font/3.4.0 (32.2MB)
Installed using the internal formulae.brew.sh API on 2026-07-04 at 21:34:47

Looks good other than this: would like to keep these. Can we see a before/after for formulae too or, if identical, just an example for cask comparison?

Thanks!

@HaraldNordgren

HaraldNordgren commented Nov 11, 2026 •

Copy link
Copy Markdown
Member Author

/usr/local/Caskroom/font-hack-nerd-font/3.4.0 (32.2MB)
Installed using the internal formulae.brew.sh API on 2026-07-04 at 21:34:47

Looks good other than this: would like to keep these. Can we see a before/after for formulae too or, if identical, just an example for cask comparison?

I moved the path info under verbose, like we did for formulae some time ago:

▶ brew info sqlite
...
==> Installed Versions
sqlite ↑ 3.54.0 → 3.54.1 (13 files, 5.4MB)

▶ brew info sqlite -v
...
==> Installed Kegs and Versions
sqlite ↑ 3.54.0 → 3.54.1 (13 files, 5.4MB)
  Cellar: /usr/local/Cellar/sqlite/3.54.0
  Built from source on 2026-10-14 at 13:14:55

So my main goal was to have consistent and predictable behavior between cask and formula.

I tried hard to not alter the formula output when refactoring. I set up some regression tests that passed on main as well, for reference, but I cannot guarantee it didn't change in some part. There were some decisions about ordering of fields where I opted for consistency between casks and formula rather than strict equality for the old formula output, so it's possible some rows jumped around, but nothing should have been removed.

Here is cask output without and with verbose:

▶ brew info font-hack-nerd-font
...
==> Installed Versions
font-hack-nerd-font ↑ 3.4.0 → 3.5.1 (32.2MB)

▶ brew info font-hack-nerd-font -v
...
==> Installed Versions
font-hack-nerd-font ↑ 3.4.0 → 3.5.1 (32.2MB)
  Caskroom: /usr/local/Caskroom/font-hack-nerd-font/3.4.0
  Installed using the internal formulae.brew.sh API on 2026-07-04 at 21:34:47

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, convinced me, nice cleanup!

@HaraldNordgren
HaraldNordgren added this pull request to the merge queue Nov 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Nov 11, 2026
@HaraldNordgren
HaraldNordgren added this pull request to the merge queue Nov 11, 2026
Merged via the queue into Homebrew:main with commit 97b56b7 Nov 11, 2026
89 of 91 checks passed
@HaraldNordgren
HaraldNordgren deleted the haraldnordgren-unify-cask-formula-info branch November 11, 2026 22:11
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