Title: Install with Homebrew from a tap of our own · Issue #151 · openjavaformat/open-java-format · GitHub
Open Graph Title: Install with Homebrew from a tap of our own · Issue #151 · openjavaformat/open-java-format
X Title: Install with Homebrew from a tap of our own · Issue #151 · openjavaformat/open-java-format
Description: Why Installing the formatter on a Mac or a Linux machine today means picking a file from the release page, making it executable, renaming it and moving it onto the PATH, and doing it again for every release, as the Command line page desc...
Open Graph Description: Why Installing the formatter on a Mac or a Linux machine today means picking a file from the release page, making it executable, renaming it and moving it onto the PATH, and doing it again for ever...
X Description: Why Installing the formatter on a Mac or a Linux machine today means picking a file from the release page, making it executable, renaming it and moving it onto the PATH, and doing it again for ever...
Opengraph URL: https://github.com/openjavaformat/open-java-format/issues/151
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Install with Homebrew from a tap of our own","articleBody":"### Why\n\nInstalling the formatter on a Mac or a Linux machine today means picking a file from the release page, making it executable, renaming it and moving it onto the `PATH`, and doing it again for every release, as the [Command line](https://openjavaformat.dev/get-started/command-line/) page describes. With Homebrew it is one command, and `brew upgrade` keeps it current.\n\nUpstream users ask for exactly this. palantir/palantir-java-format#1259 wants `brew install palantir-java-format`, so that AI coding tools and editors built on VS Code can call the formatter without Gradle's start-up time, and palantir/palantir-java-format#1116 asks for a CLI binary that editors such as Neovim can run. palantir-java-format publishes its native images to Maven Central only: its GitHub releases carry no files, and homebrew/core has no formula for it. We already ship the binaries, so only the install step is missing.\n\n### Proposal\n\nA tap, `openjavaformat/homebrew-tap`, with one formula, `Formula/open-java-format.rb`, that installs the native binary of the latest release:\n\n| Platform | Release file |\n| --- | --- |\n| macOS, Apple silicon | `open-java-format-macos_aarch64` |\n| macOS, Intel | `open-java-format-macos_x86-64` |\n| Linux x86-64 | `open-java-format-linux-glibc_x86-64` |\n| Linux AArch64 | `open-java-format-linux-glibc_aarch64` |\n\nThe formula picks the file with `on_macos`/`on_linux` and `on_arm`/`on_intel`, checks it against the checksum in the release's `checksums_sha256.txt` and installs it as `bin/open-java-format`. It depends on nothing, since the binary needs no JDK, and its `test do` block formats a small class and compares the output.\n\n```sh\nbrew install openjavaformat/tap/open-java-format\nopen-java-format --version\n```\n\nA formula rather than a cask: Homebrew downloads a formula with `curl`, so the binary gets no quarantine flag, which matters because the macOS binaries are not notarized. Formulae work on Linux too.\n\n### Keeping it current\n\nThe same shape as `follow-releases.yml` in openjavaformat/open-java-format-action and openjavaformat/docs. An hourly workflow in the tap compares the latest release with the formula's `version`. When they differ, it writes the new version and the four checksums from `checksums_sha256.txt`, installs and tests the formula on a macOS and a Linux runner, and commits as github-actions[bot]. It needs nothing but the tap's own `GITHUB_TOKEN`.\n\nJReleaser, which `release.yml` already runs, has a Homebrew packager. It would update the tap from inside the release workflow, though: before the draft release is published, while its download links still answer 404, and with a token that can push to another repository. Following published releases from the tap avoids both.\n\n### homebrew/core later\n\nNot possible yet, for two reasons:\n\n- **Notability.** A [new package](https://docs.brew.sh/Package-Acceptance-Policy#notability) needs at least 30 forks, 30 watchers or 75 stars, three times that when the project submits it itself. The repository has 34 stars today. Being a fork is no obstacle: a separately named fork may be accepted when it meets the other requirements.\n- **No native binary.** A [core formula](https://docs.brew.sh/Acceptable-Formulae) must build from source or install platform-independent output such as Java bytecode. It would install the runnable jar with `depends_on \"openjdk\"`, the way homebrew/core packages [google-java-format](https://github.com/Homebrew/homebrew-core/blob/main/Formula/g/google-java-format.rb).\n\n### To decide\n\n- **Only the latest version?** A new minor version can change the output (see [Versions](https://openjavaformat.dev/about/#versions)), and `brew upgrade` takes it. `brew pin open-java-format` holds a version on one machine, and projects pin theirs in Gradle, Maven or the action anyway. Versioned formulae such as `open-java-format@21.1` can follow if someone needs them.\n\n### Done when\n\n- `brew install openjavaformat/tap/open-java-format` installs the latest release on macOS (Apple silicon and Intel) and Linux (x86-64 and AArch64), and `brew test` passes on each;\n- a new release reaches the tap within the hour, without a hand edit;\n- the [Command line](https://openjavaformat.dev/get-started/command-line/) page offers `brew install` before the manual download, and [About](https://openjavaformat.dev/about/#where-it-is-published) lists the tap.\n\n### Related\n\n- palantir/palantir-java-format#1259 and palantir/palantir-java-format#1116\n- #152 and #153 do the same for Windows and Ubuntu.\n","author":{"url":"https://github.com/abashev","@type":"Person","name":"abashev"},"datePublished":"2026-10-25T14:25:40Z","url":"https://github.com/openjavaformat/open-java-format/issues/151"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fa18069c-181a-c2a5-02f4-cfd9a5c15218 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCC0:2ED20C:2AF34F:390D36:6AFBB78D |
| html-safe-nonce | 44bc95bdc52b9f2589fd1927c1400c02ac5ca33715ec0cc6f2ca1d1a9b75a59b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0MwOjJFRDIwQzoyQUYzNEY6MzkwRDM2OjZBRkJCNzhEIiwidmlzaXRvcl9pZCI6IjM4Mzc2Nzg1NTIwODIwMDM4NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 018194d46f6d4dd931e914bacf3e52051fd53501cba4a367801039152493e09d |
| hovercard-subject-tag | issue:6025502317 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openjavaformat/open-java-format/151/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c773c555286e238f4c46a4a4a7fde68b48db4423a33bbfde50f39655e697b731/openjavaformat/open-java-format/issues/151 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c773c555286e238f4c46a4a4a7fde68b48db4423a33bbfde50f39655e697b731/openjavaformat/open-java-format/issues/151 |
| og:image:alt | Why Installing the formatter on a Mac or a Linux machine today means picking a file from the release page, making it executable, renaming it and moving it onto the PATH, and doing it again for ever... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abashev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git |
| octolytics-dimension-user_id | 325177626 |
| octolytics-dimension-user_login | openjavaformat |
| octolytics-dimension-repository_id | 1288055459 |
| octolytics-dimension-repository_nwo | openjavaformat/open-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 214273098 |
| octolytics-dimension-repository_parent_nwo | palantir/palantir-java-format |
| octolytics-dimension-repository_network_root_id | 214273098 |
| octolytics-dimension-repository_network_root_nwo | palantir/palantir-java-format |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width