Personal Homebrew tap for execsumo's projects. One tap, many formulas/casks —
do not create a new tap repo per project. Tapped as execsumo/tap
(Homebrew maps user/tap → the homebrew-tap repo automatically).
Formula/*.rb— CLI tools / cross-platform binaries (installed viabrew install <name>)Casks/*.rb— macOS.appbundles distributed as a DMG (installed viabrew install --cask <name>)
Use a Formula for a Go/Rust/etc. CLI binary. Use a Cask for a macOS .app.
Reference: Formula/dossier.rb, sourced from execsumo/dossiers.
- In the project's own repo, its release CI (e.g.
.github/workflows/release.yml) already builds per-platform binaries ongit push --tagsand uploads them to a GitHub Release along with achecksums.txt(viasha256sum). - Add a job to that same workflow (see
execsumo/dossiers/.github/workflows/release.yml, jobupdate-tap) that runs after the release job:- reads
checksums.txtfrom the just-published release, - regenerates
Formula/<name>.rbfrom a heredoc template (version + per-platformurl/sha256, usingon_macos/on_linux+Hardware::CPU.arm?blocks), - clones this tap repo with a
GH_PATsecret, commits, and pushes tomain.
- reads
- The project's repo needs a
GH_PATsecret: a fine-grained PAT, scoped to only this tap repo (execsumo/homebrew-tap), with Contents: Read and write. Generate at https://github.com/settings/tokens?type=beta. This tap repo itself needs no secrets — it's just a push target. - Formula skeleton (adapt name/desc/platforms):
class Name < Formula
desc "One-line description"
homepage "https://github.com/execsumo/<repo>"
version "X.Y.Z"
license "MIT"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/execsumo/<repo>/releases/download/vX.Y.Z/<name>-darwin-arm64"
sha256 "..."
else
url "https://github.com/execsumo/<repo>/releases/download/vX.Y.Z/<name>-darwin-amd64"
sha256 "..."
end
end
on_linux do
if Hardware::CPU.arm?
url "https://github.com/execsumo/<repo>/releases/download/vX.Y.Z/<name>-linux-arm64"
sha256 "..."
else
url "https://github.com/execsumo/<repo>/releases/download/vX.Y.Z/<name>-linux-amd64"
sha256 "..."
end
end
def install
bin.install Dir["<name>-*"].first => "<name>"
end
test do
system "#{bin}/<name>", "--version"
end
end- Bootstrap the first version by hand once (clone this repo, add the file, push),
then verify:
brew untap execsumo/tap 2>/dev/null; brew tap execsumo/tap && brew install --formula <name>. - Document in the project's own README:
brew tap execsumo/tap && brew install <name>to install,brew upgrade <name>to update.
Reference: Casks/heard.rb, sourced from execsumo/heard (project repo Heard).
- The project's release CI builds a notarized, signed DMG and publishes it to a GitHub Release, printing its SHA256.
- CI's release job (see
execsumo/Heard/.github/workflows/ci.yml) then, in the same run:sed-patchesCasks/<name>.rbin the project's own repo with the newversion/sha256, commits that back to the project repo, then clones this tap repo (sameGH_PATsecret pattern as above), copies the updated cask file over, and pushes. - Cask skeleton (adapt name/paths/bundle id):
cask "name" do
version "X.Y.Z"
sha256 "..."
url "https://github.com/execsumo/<repo>/releases/download/v#{version}/Name-#{version}.dmg"
name "Name"
desc "One-line description"
homepage "https://github.com/execsumo/<repo>"
depends_on macos: :sequoia # adjust to actual minimum OS
app "Name.app"
uninstall quit: "com.execsumo.name"
zap trash: [
"~/Library/Application Support/Name",
"~/Library/Caches/com.execsumo.name",
"~/Library/Preferences/com.execsumo.name.plist",
"~/Library/Saved Application State/com.execsumo.name.savedState",
]
end- Document in the project's own README:
brew tap execsumo/tap && brew install --cask <name>to install,brew upgrade --cask <name>to update.
- Formula/cask class or block name matches the filename (lowercase, no dashes unless the tool name has one).
- Every project's own release workflow owns pushing to this tap — this repo is a pure publish target, never hand-edited for routine version bumps.
- Each project repo holds its own
GH_PATsecret (fine-grained, scoped to this repo, Contents: Read/write). There's no way to share one secret across repos on a personal GitHub account — generate a fresh token per project. - Don't rename this tap again without updating every project's workflow that pushes to
it (search each project repo for
homebrew-tap).