Homebrew is the best package manager ever created!
I’m serious; fight me! π
Let’s get cracking and learn how to install, use, auto update, and contribute to Homebrew.
Installation
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"You may want to dive deeper into Homebrew installation details.
Usage
Install the latest stable version of a formula or cask (use --devel for development versions):
brew install formulaList all installed formulae and casks:
brew listUpgrade an installed package
brew upgrade formulaFetch the newest version of Homebrew
brew updateShow outdated formulae and casks
brew outdatedSearch for available packages
brew search text- Display information about a package
brew info formulaCheck the local Homebrew installation for potential problems:
brew doctorAuto-Updating Homebrew
I auto update Homebrew formulas because I like to live on the edge. If you have trust issues, you can skip this section.
The Homebrew autoupdate tap provides a command to automatically update Homebrew, formulae, and casks. It is designed to be run regularly as a scheduled background job and will update the default Homebrew installation.
brew tap homebrew/autoupdate
brew autoupdate --start --upgrade --cleanup --enable-notificationCreate a Cask
Creating a Cask is easy. Let’s go!
Grab the download URL from the website. In this case, it’s https://vero.co/download/desktop/beta/macos.
brew create --cask download-url --set-name my-new-caskFill in the blanks.
Profit?!
brew create Create a SHA256 hash of a file with the following command:
cask "vero" do
version "0.5.4"
sha256 :no_check
url "https://vero.co/download/desktop/beta/macos"
name "vero"
desc "Ad-free, Algorithm-free Social."
homepage "https://vero.co/"
livecheck do
url "https://vero.co/download/desktop/beta/macos"
strategy :header_match
end
app "VERO.app"
zap trash: [
"~/Library/Application Support/VERO",
"~/Library/Preferences/co.vero.desktop.plist",
"~/Library/Saved Application State/co.vero.desktop.savedState",
]
endbrew audit --strict veroFork: https://github.com/Homebrew/homebrew-cask
cd "$(brew --repository homebrew/cask)"
brew audit --new-cask vero
brew install --cask vero
brew uninstall --cask vero
# Reinstall when you're done!If you have the gh command.
# If you have the gh command.
gh repo fork Homebrew/homebrew-cask
git checkout -b add-vero
git add *
git commit -m "add vero"
git push -u origin add-vero
# Post PR approval
git checkout masterFollow my vero example if you like.
Use Brew Livecheck to check for available updates and understand the Livecheck Strategy.
brew livecheck vero
Comments #