Skip to content

feat: add rtk brew wrapper to compact brew install/upgrade/update output #3490

Open

Description

@nitrocode

Problem

brew install, brew upgrade, and brew update produce a lot of output that isn't useful to an LLM: dependency resolution lines, download progress bars, ==> Fetching… / ==> Pouring… steps, and post-install caveats. What the model actually needs is the final result (installed/upgraded, skipped, or failed) plus any real errors.

Today rtk has no brew subcommand, so the hook rewrite (brew install <pkg> -> rtk brew install <pkg>) fails with error: unrecognized subcommand 'brew' and rtk falls back to raw passthrough. Nothing gets filtered.

Local evidence

Auditing one machine's rtk history: 9 logged parse failures on brew install …, 0 successful compactions. Small sample, but 100% miss rate on a command that runs regularly during dev-env setup and dependency bumps.

Proposal

Add rtk brew as a filter that keeps:

  • the final installed, upgraded, already installed, or skipped line(s) per formula
  • any Error: / Warning: block
  • the exit-status-relevant summary tail

...and drops fetch progress, mirror URLs, pour steps, and caveats (or collapses caveats to a one-line "N caveats printed, use brew info <pkg> to view").

Example

Raw:

==> Fetching dependencies for example-tool: libfoo, libbar
==> Downloading https://ghcr.io/v2/homebrew/core/libfoo/manifests/1.2.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libfoo/blobs/sha256:...
######################################################################## 100.0%
==> Pouring libfoo--1.2.3.arm64_sequoia.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/libbar/manifests/4.5.6
######################################################################## 100.0%
==> Pouring libbar--4.5.6.arm64_sequoia.bottle.tar.gz
==> Fetching example-tool
==> Pouring example-tool--2.0.0.arm64_sequoia.bottle.tar.gz
==> Caveats
To start example-tool now and restart at login:
  brew services start example-tool
Or, if you don't want/need a background service:
  /opt/homebrew/opt/example-tool/bin/example-tool
==> Summary
🍺  /opt/homebrew/Cellar/example-tool/2.0.0: 42 files, 3.1MB

Filtered:

installed: libfoo 1.2.3, libbar 4.5.6, example-tool 2.0.0
example-tool: 2 caveats (run `brew info example-tool`)

Related

Same shape as #1781 (ansible-lint), #1759 (fd/sd), #1256 (pytest).

Activity

  1. added
    enhancement
    help wanted
    on Aug 9, 2026
  2. pszymkowiak commented on Aug 9, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    ✨ Category feature
    🟡 Priority medium
    🎯 Confidence 93%

    Summary

    Add an rtk brew filter to compact install/upgrade/update output (currently unsupported, causing 100% raw passthrough per author's local audit).


    Triaged automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clienhancementhelp wantedpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions