szEvEz/kegwasher

Housekeeping for Homebrew

★ 1Forks 0GoGitHub ↗Compare

README

kegwasher

Housekeeping for Homebrew in a single command.

kegwasher updates and upgrades your formulae, then cleans up cached files and removes unused dependencies — so you don't have to remember the individual brew incantations.

$ kegwasher --help

NAME:
   kegwasher - Housekeeping for Homebrew

USAGE:
   kegwasher [global options]

GLOBAL OPTIONS:
   --noprune      Do not remove all cached files (default: false)
   --noupdate     Do not run 'brew update' and 'brew upgrade' before cleanup (default: false)
   --help, -h     show help
   --version, -v  print the version

By default kegwasher runs, in order:

  1. brew update
  2. brew upgrade
  3. brew cleanup --prune=all
  4. brew autoremove

Pass --noupdate to skip steps 1–2, or --noprune to run brew cleanup without --prune=all.

Installation

Homebrew (via go install)

If you have a Go toolchain:

go install github.com/szEvEz/kegwasher/cmd/kegwasher@latest

Download a release binary

Prebuilt binaries are published for macOS and Linux on both arm64 and amd64. Pick the one matching your platform:

# macOS (Apple Silicon)
curl -L -o kegwasher https://github.com/szEvEz/kegwasher/releases/latest/download/kegwasher-darwin-arm64

# macOS (Intel)
curl -L -o kegwasher https://github.com/szEvEz/kegwasher/releases/latest/download/kegwasher-darwin-amd64

# Linux (arm64 / amd64)
curl -L -o kegwasher https://github.com/szEvEz/kegwasher/releases/latest/download/kegwasher-linux-arm64
curl -L -o kegwasher https://github.com/szEvEz/kegwasher/releases/latest/download/kegwasher-linux-amd64

chmod +x kegwasher
mv kegwasher /usr/local/bin/

Each release also ships a checksums.txt. To verify a download:

curl -L -O https://github.com/szEvEz/kegwasher/releases/latest/download/checksums.txt
shasum -a 256 -c checksums.txt --ignore-missing

Building from source

git clone https://github.com/szEvEz/kegwasher.git
cd kegwasher
go build -o kegwasher ./cmd/kegwasher

The version reported by --version is stamped in at release time via -ldflags "-X main.version=<tag>"; a plain go build reports dev.

Releasing

Pushing a tag matching v* triggers the Build and Release GitHub Actions workflow, which cross-compiles the binaries, generates checksums, and publishes them to a GitHub Release:

git tag v0.1.0
git push origin v0.1.0

Contributors

szEvEz

Issues