https://github.com/obecker/brew-auto-update-spoon
Hammerspoon plugin for running "brew update" automatically
https://github.com/obecker/brew-auto-update-spoon
hammerspoon homebrew
Last synced: 2 months ago
JSON representation
Hammerspoon plugin for running "brew update" automatically
- Host: GitHub
- URL: https://github.com/obecker/brew-auto-update-spoon
- Owner: obecker
- License: apache-2.0
- Created: 2023-08-02T13:11:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T15:16:49.000Z (almost 3 years ago)
- Last Synced: 2023-08-16T17:39:41.311Z (almost 3 years ago)
- Topics: hammerspoon, homebrew
- Language: Lua
- Homepage:
- Size: 122 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/obecker/brew-auto-update-spoon/releases)
# BrewAutoUpdate.spoon
[Hammerspoon](https://www.hammerspoon.org) plugin (a.k.a. [Spoon](https://www.hammerspoon.org/go/#spoonsintro))
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.
## Installation
_Prerequisite_: you have [Hammerspoon](https://www.hammerspoon.org) installed.
Download the latest **BrewAutoUpdate.spoon.zip** file from the [Releases](https://github.com/obecker/brew-auto-update-spoon/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:
```lua
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
```lua
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()
```