shfmt

Install command:
brew install shfmt

Autoformat shell script source code

https://github.com/mvdan/sh

License: BSD-3-Clause

Development: Pull requests

Formula JSON API: /api/formula/shfmt.json

Formula code: shfmt.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
sonoma ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 3.14.1
head ⚡️ HEAD

Depends on when building from source:

go 1.27.4 Open source programming language to build simple/reliable/efficient software
scdoc 1.11.5 Small man page generator

Binaries: shfmt

GitHub Packages downloads:

Last 30 days59,282
Downloads1,169,725
Analytics install events (30 days)11,284
Downloads / install events (30 days)5.3×

Source: GitHub Packages, fetched 2026-11-19T00:55:41Z. Analytics dates: 2026-10-20 to 2026-11-19. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs11,27727,23483,658
Installs (--HEAD)71980
Installs on Request11,27227,20783,527
Installs on Request (--HEAD)71980
Build Errors20