How-to guides
Install adocfmt
Install adocfmt with Homebrew, pin it per project with mise, or download a release archive and put the binary on your PATH.
For IntelliJ IDEA, the adocfmt plugin brings its own binary.
Install with Homebrew
Homebrew installs adocfmt on macOS and Linux, on both Intel and ARM processors.
Add the adocfmt repository as a tap:
brew tap ypfaff/adocfmt https://github.com/ypfaff/adocfmtA tap is a repository that Homebrew reads formulas from.
Install adocfmt:
brew install ypfaff/adocfmt/adocfmt
Install with mise
mise pins adocfmt to one release per project.
In the project directory, run:
mise use github:ypfaff/adocfmt@1.2.3Replace 1.2.3 with the version you want.
mise installs that release and writes it to the project’s mise.toml.
Commit mise.toml, and mise.lock if the project has one, so that everyone working on the project formats with the same release.
Install from a release archive
Every release on the releases page has one archive for each platform.
In the archive names, VERSION stands for the version without the leading v, such as 1.2.3.
| Platform | Archive |
|---|---|
macOS, Apple silicon |
|
macOS, Intel |
|
Linux, ARM64 |
|
Linux, x86-64 |
|
Windows, ARM64 |
|
Windows, x86-64 |
|
Each archive holds the binary, LICENSE, NOTICE, and README.adoc.
The binary is adocfmt, or adocfmt.exe on Windows.
The release also has a checksums.txt file with the SHA-256 checksum of every archive.
On macOS and Linux:
Set the version and your platform, as in the archive name:
VERSION=1.2.3 PLATFORM=linux_amd64Download the archive and the checksums:
curl --fail --location --remote-name "https://github.com/ypfaff/adocfmt/releases/download/v${VERSION}/adocfmt_${VERSION}_${PLATFORM}.tar.gz" curl --fail --location --remote-name "https://github.com/ypfaff/adocfmt/releases/download/v${VERSION}/checksums.txt"Verify the archive against its checksum. On Linux, run:
sha256sum --check --ignore-missing checksums.txtOn macOS, run:
shasum --algorithm 256 --check --ignore-missing checksums.txtBoth print the archive name followed by
OK.Optional: Verify the archive’s build provenance with the GitHub CLI:
gh attestation verify "adocfmt_${VERSION}_${PLATFORM}.tar.gz" \ --repo ypfaff/adocfmt \ --signer-workflow ypfaff/adocfmt/.github/workflows/release.ymlExtract the binary:
tar --extract --gzip --file "adocfmt_${VERSION}_${PLATFORM}.tar.gz" adocfmtMove the binary to a directory on your
PATH, such as/usr/local/bin:sudo mv adocfmt /usr/local/bin/
Note | Apple has not notarized the macOS binaries.
If you download an archive with a browser, macOS may block adocfmt because it cannot verify the developer.
Downloading with curl, as in the steps above, avoids this.
For a binary that is already blocked, remove the quarantine attribute with xattr -d com.apple.quarantine /usr/local/bin/adocfmt. |
On Windows, extract adocfmt.exe from the archive and move it to a directory on your PATH.