How To Contribute
Updating a Cask
Notice an application that's out-of-date in Homebrew-Cask? In most cases, it's very simple to update it. We have a script that will ask for the new version number, and take care of updating the Cask file and submitting a pull request to us:
# install and setup script - only needed once brew install vitorgalvao/tiny-scripts/cask-repair cask-repair --help # fork homebrew-cask to your account - only needed once cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks" git config --local hub.protocol https hub fork # use to update <outdated_cask> outdated_cask='<the-cask-i-want-to-update>' github_user='<my-github-username>' cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks" cask-repair --pull origin --push $github_user $outdated_cask
If there is a more complicated change, or there is a case where
cask-repair fails (for example, where a Cask uses a
url do block or the
language stanza), you can also follow the steps in Adding a Cask to do the same thing manually. Remember to update the
shasum values, as well as the appcast
checkpoint, if there is one.
Getting Set Up To Contribute
For manual updates, you'll need to fork the repository and add your copy as a remote (can also be done with
1: Fork the repository in GitHub with the
2: If you have not already done so, add your GitHub fork as a remote for your homebrew-cask Tap:
$ github_user='<my-github-username>' $ cd "$(brew --repository)"/Library/Taps/caskroom/homebrew-cask $ git remote add "$github_user" "https://github.com/$github_user/homebrew-cask"
3: If you have already added your GitHub fork as a remote for your homebrew-cask Tap, ensure your fork is up-to-date.
4: Switch to a new branch (ie.
new-feature), and work from there:
git checkout -b new-feature.
Adding a Cask
Notice an application that's not in Homebrew-Cask yet? Make sure it's not yet in Homebrew-Versions (can be searched from the Github repository page) or Homebrew (can be searched with
brew search). Mac App Store apps can't be installed via Homebrew-Cask, but check out mas for an alternative.
With a bit of work, you can create a Cask for it. This document will walk you through creating a new Cask, testing it, and submitting it to us.
Some style guidelines:
- All Casks and code should be indented using two spaces (never tabs). When
brew cask stylecontradicts this,
stylemust be followed.
- There should not be any extraneous comments - the only comments that should be used are the ones explicitly defined in the Cask Language Reference.
- The stanza order and position of newlines is important to make things easier (See Stanza order).
- Use string manipulations to improve the maintainability of your Cask (See
- Test your cask using
brew cask audit/style(See testing).
- Make one Pull Request per Cask change.
- Do not squash commits after updating a Pull Request.
- Use descriptive commit messages - mention app name and version (ie.
Upgrade Transmission.app to v2.82).