Hammerspoon plugin (a.k.a. Spoon)
for running brew update
automatically.
The plugin executes brew update
at Hammerspoon's startup and then repeatedly every 8 hours (or some other defined interval).
If there are outdated packages (determined by executing brew outdated
) it will display a notification with a button
to run brew upgrade
in a Terminal.
In case there are too many outdated packages that cannot be fully displayed within the limited space of the notification's contents area, then clicking this contents area will toggle an alert with the full information.
Prerequisite: you have Hammerspoon installed.
Download the latest BrewAutoUpdate.spoon.zip file from the Releases
page and double-click the extracted BrewAutoUpdate.spoon
folder.
Hammerspoon should automatically move it into your $HOME/.hammerspoon/Spoons/
folder.
Add this line to your $HOME/.hammerspoon/init.lua
file:
hs.loadSpoon("BrewAutoUpdate"):start()
The plugin will auto-detect your brew
binary and uses by default an update interval of 8 hours and a duration of
5 seconds for displaying the additional information alert.
You may overwrite these settings with
hs.loadSpoon("BrewAutoUpdate"):config({
brewBinary = "/path/to/your/brew",
updateInterval = "6h", -- check for updates every 6 hours
alertSeconds = 3 -- close the info alert after 3 seconds
}):start()