Repository navigation
Description
Problem
There is no supported way to install cortextool on macOS or Linux. The README points at the
releases page, so users download an extensionless binary, chmod +x it, and move it onto their
PATH by hand — with no upgrade path and no checksum verification.
Homebrew support existed until 9fbb6fb4, when the brews: block targeting
grafana/homebrew-grafana was dropped during the move from Grafana to cortexproject.
CHANGELOG.md:154 still references it.
Proposal
Create cortexproject/homebrew-tap (public), containing one formula, cortextool:
brew install cortexproject/tap/cortextoolCoverage from the binaries we already publish: macOS arm64, macOS x86_64, Linux x86_64.
Not benchtool (can be added later), and not Linux arm64 — we don't build it (see below).
The tap updates itself. A workflow there runs every 6 hours (plus manual dispatch), reads
our latest release, rewrites the version and the three sha256s from checksums.txt,
installs and brew tests the candidate formula on macOS arm64, macOS x86_64 and Linux
x86_64, and only commits if all three pass.
Why not GoReleaser's brews: block
It's the obvious choice, and it's a dead end:
brewsis deprecated — soft since v2.10, hard since v2.16
(deprecations). Thedeprecated=trueschema
tag is present in the goreleaser binary.- Its replacement,
homebrew_casks, emits a Cask — which is macOS-only. So there is no
forward path frombrewsto a formula that also serves Linux users. - It needs a
tar.gzarchive id (theneeded-for-homebrewpattern we deleted), adding ~6
duplicate assets to every release and changing the asset list people script against. - It runs inside the single existing goreleaser job, so a tap-push failure — expired
token, deprecation turning fatal — can failrelease --cleanand abort a release
mid-publish, after the Quay images are already pushed. - It writes the formula blind. Nobody finds out it's broken until a user runs
brew install.
Impact on this repo
Deliberately minimal — .goreleaser.yml is not modified and no release artifacts change:
README.md/RELEASE.md— document the install and the bump path..github/workflows/release.yml— one appended job,needs: release,
permissions: {},continue-on-error: true, that fires arepository_dispatchat the tap
so bumps land in ~a minute instead of ≤6h. Optional: gated on aHOMEBREW_TAP_TOKEN
secret; if it's absent or expired the job skips and the tap's schedule still picks the
release up. It can never fail a release.- Delete the stale untracked
Formula/,HOMEBREW.md, and
scripts/update-homebrew-checksums.shfrom a previous attempt.
Questions for maintainers
- Tap repo name —
cortexproject/homebrew-tap(→brew tap cortexproject/tap), so
non-cortex-toolsformulae can live there later? Orhomebrew-cortex-tools, scoped to this
repo? - Who owns it — happy for it to be a
cortexprojectrepo with the same maintainer set? benchtooltoo, or start withcortextoolonly?- Linux arm64. We only build
linux/amd64, so Linux ARM users get
Error: cortextool: The x86_64 architecture is required for this software.Worth adding
arm64tocortextool-linux'sgoarchin.goreleaser.ymlas a follow-up? HOMEBREW_TAP_TOKEN. Fine to add a fine-grained PAT (Contents: write, scoped to the tap
only) for instant bumps? Or skip it and live with the 6-hourly schedule — zero new secrets?- homebrew-core eventually, instead of a tap? Realistically that needs the notability bar
plus a build-from-source formula, and it doesn't preclude the tap now.
I have a working implementation ready to push once there's agreement on the above.
Activity
CharlieTLe commentedon Aug 18, 2026
Update: going to homebrew-core instead of a tap
Answering my own question 6 above — homebrew-core is now viable, so I am not proposing a tap
any more. Repurposing this issue to track the homebrew-core submission.
What changed
There was already an attempt: Homebrew/homebrew-core#254582
(
cortextool 0.17.0 (new formula), opened 2025-11-15, closed 2025-11-28 as "no response"). It hittwo blockers, and the important one is gone:
GitHub fork (not canonical repository)— no threshold, nothing to tune. That is almostcertainly why every platform job failed, and it is exactly what the reviewer asked about
("I still see it is attached as a fork", 2025-11-22).
cortexproject/cortex-toolsis nowdetached —
gh api /repos/cortexproject/cortex-toolsreportsfork: falsewith noparentand no
source— so that failure no longer applies.75 stars bar. Still under, and not something we control. Worth noting that on the old PR a
maintainer removed the
notabilitylabel and appliedCI-skip-new-formulaeinstead, sothere is precedent for a waiver. The supporting argument is that
cortexitself is already inhomebrew-core (
Formula/c/cortex.rb) andcortextoolis its official operator CLI, releasedin lockstep.
Why this is better than the tap
The tap was fully built and verified locally, and I am dropping it anyway:
brew install cortextool— nobrew tap, and nobrew trust. Homebrew 6+ refuses formulaefrom untrusted third-party taps, which is real friction for every user.
there is no
HOMEBREW_TAP_TOKENto rotate, no bump workflow to maintain, and no extra repo.tap could only ship the
linux/amd64binary we publish.Impact on this repo
Smaller than the tap proposal: docs only. No
.goreleaser.ymlchange, no release-workflowchange (the
notify-tapjob existed only to poke our own tap; homebrew-core is bumped byBrewTestBot), no new secrets, no release artifacts changed. Just the
brew install cortextoolline in
README.mdand a shortRELEASE.mdnote that Homebrew bumps itself.Questions 1, 2, 3 and 5 are moot. Question 4 (adding
linux/arm64to.goreleaser.ymlso ourpublished binaries cover it too) still stands on its own, separately from Homebrew.
I will link the new homebrew-core PR here once it is open.
CharlieTLe commentedon Aug 18, 2026
The homebrew-core PR is open: Homebrew/homebrew-core#299512 (
cortextool 0.21.1 (new formula)), superseding #254582.It adds
Formula/c/cortextool.rb, building from the v0.21.1 source tarball. Locallybrew install --build-from-sourcesucceeds andbrew audit --strict --online --newreports zero problems apart from the expected notability message, so the outstanding question is theCI-skip-new-formulaewaiver.Nothing to do in this repo beyond the docs change (
brew install cortextoolin the README, plus aRELEASE.mdnote that Homebrew autobumps and we push nothing) — I'll open that PR separately and it can wait on the formula landing.CharlieTLe commentedon Aug 18, 2026
CI status on homebrew-core#299512: the formula builds, bottles, links and passes its test on Homebrew's runners. The only failing step is the notability audit:
Two useful confirmations from that run:
SharedAudits.githubonly reaches the notability comparison whenforkis false. That was the exact request left unanswered on #254582.brew install --build-from-source,brew style,brew bottle,brew linkageandbrew testall pass.I also went back through the review comments on #254582 and addressed the three inline ones that PR was closed before acting on — dropping the redundant
livecheckblock, collapsing theldflagsarray, and most substantively replacing the version/--helptest with a functional one: it runscortextool rules lintover a rule file with a multi-line PromQL expression, asserts the file is rewritten in place toexpr: sum(up), and asserts invalid PromQL exits 1 with a parse error. That works fully offline, which #61 made possible by removing the cortex-address requirement fromrules lint.So the submission now rests entirely on whether Homebrew grants the
CI-skip-new-formulaewaiver for notability (10 stars / 0 forks / 1 watcher vs 30/30/75). Requested, with the precedent that a maintainer applied that label to #254582. If it's declined, the fallback is to grow the repo's numbers or revisit a tap.This repo needs 10 stars → 75, or forks → 30, or watchers → 30 to clear the bar unaided, if anyone wants to help move that along.
CharlieTLe commentedon Aug 19, 2026
homebrew-core said no; going with the tap
We tried homebrew-core first — Homebrew/homebrew-core#299512 — and it was declined on notability by @p-linnane:
That answers Q6. It was not the formula's fault: on Homebrew's own CI the formula built, bottled, passed
brew linkageand passedbrew teston Linux arm64,brew stylewas clean, and the only audit problem was notability. We are at 10 stars / 0 forks / 1 watcher against a 75 stars / 30 forks / 30 watchers bar. (The fork-detach blocker from the earlier #254582 is confirmed gone — the audit reached the notability check at all, which it only does once the repo is no longer a fork.)So: back to the tap, as Homebrew suggested. It exists and is green — cortexproject/homebrew-tap:
Answers to the questions above
cortexproject/homebrew-tap, so other formulae can live there later.cortexprojectorg.cortextoolonly for now.benchtoolcan join the same tap whenever someone wants it.HOMEBREW_TAP_TOKEN: still optional, exactly as proposed. The tap polls every 6 hours on its own; the token only buys a ~1-minute bump instead of ≤6 hours, thenotify-tapjob iscontinue-on-errorwithpermissions: {}, and it is skipped entirely when the secret is unset. Zero new secrets is a perfectly fine answer.One change from the proposal: build from source
The formula reuses the source-built one homebrew-core validated instead of installing the released binary. That is a straight win:
linux/amd64only, so a binary-based formula could never have served it. This is now covered and proven — the tap's CI installs andbrew tests on macOS arm64, macOS x86_64, Linux x86_64 and Linux arm64, and all four are green.sha256per release instead of three, rewritten bybrew bump-formula-pr --write-onlyrather than a bespoke script.chmod 0555footgun.The cost is that users need
goas a build dependency and wait about a minute. If that turns into a complaint, the follow-up is bottles built by the tap's CI and hosted on GitHub Releases.This makes Q4 moot for Homebrew — the tap no longer consumes our binaries at all. Adding
arm64tocortextool-linux'sgoarchin.goreleaser.ymlis still worth doing for people who download the published binaries directly, but it is now unrelated follow-up work rather than a prerequisite. Happy to file it separately.What lands in this repo
Unchanged from the proposal, and still no
.goreleaser.ymlchange and no change to any release artifact:README.md/RELEASE.md— document the install and the bump path..github/workflows/release.yml— the one appendednotify-tapjob.PR to follow.
Document Homebrew tap install and notify it on release