Prefill `app` and `zap` in `brew create --cask` #24316

Merged
bevanjkay opened 3:31pm on October 21, 2026 wanted to merge 276 Ξ” into homebrew/brew main from
brew_create_zap
Diff Delta:
276
About 44 Diff Delta/hour
Classified as:  General

bevanjkay's Description of Work


  • New casks now need a zap stanza, which contributors find the most confusing part of a cask. Prefill it by running brew generate-zap on an installed copy of the app.

  • The cask name defaults to the download's file name, e.g. AgentIDE-0.9.11, not the app's, so unpack the download to find the app instead. Use it to fill in app, read its appcast for livecheck and find the installed copy.

  • Only scan an installed copy, so that a generic app name doesn't match unrelated files, and skip suites of apps rather than guess.

  • Unpacking only helps prefill the template, so warn rather than fail when the download can't be unpacked.

  • Have brew generate-zap --name also match the installed app's bundle identifier, which names most preference and cache files.



  • [x] Have you followed our Contributing guidelines?

  • [x] Have you checked for other open Pull Requests for the same change?

  • [x] Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.

  • [x] 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?

  • [x] Have you written new tests (excluding integration tests)? Here's an example.

  • [x] 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; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.


9 total changed files
(2 files ignored)
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Review complete πŸ’ͺ
No more diffs beyond this point