macOS
brew install shfmtlocal Homebrew formula metadata
sudo port install shfmtMacPorts ports tree · devel/shfmt/Portfile · Quelle: api.github.com
brew / Rang 558
Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für shfmt in AI-Agent-Workflows.
Installation
brew install shfmtlocal Homebrew formula metadata
sudo port install shfmtMacPorts ports tree · devel/shfmt/Portfile · Quelle: api.github.com
sudo apk add shfmtAlpine Linux edge package indexes · shfmt · Quelle: dl-cdn.alpinelinux.org
sudo apt install shfmtDebian stable package indexes · shfmt · Quelle: deb.debian.org
nix profile install nixpkgs#shfmtnixpkgs package indexes · pkgs/by-name/sh/shfmt/package.nix · Quelle: api.github.com
sudo pacman -S shfmtArch Linux sync databases · shfmt · Quelle: geo.mirror.pkgbuild.com
sudo zypper install shfmtopenSUSE Tumbleweed package metadata · shfmt · Quelle: download.opensuse.org
scoop install main/shfmtScoop official bucket manifest trees · bucket/shfmt.json · Quelle: api.github.com
winget install --id mvdan.shfmt -eWindows Package Manager source index · mvdan.shfmt · Quelle: cdn.winget.microsoft.com
Überblick
Autoformat shell script source code
Verlauf
shfmt is the command-line formatter supplied by the mvdan/sh Go project. It parses and rewrites shell source using a consistent style and supports POSIX shell, Bash, mksh, and zsh-oriented syntax.
shfmt is developed within Daniel Martí's mvdan/sh project, a Go implementation of shell parsing, formatting, and interpretation. Version 3 documentation is published under the mvdan.cc/sh/v3 module path.
The project has also supported JavaScript-facing integrations. Its README records that the older mvdan-sh package was archived in favor of the third-party sh-syntax WASM package.
The official README lists packaging across Alpine, Arch, Debian, Fedora, FreeBSD, Homebrew, MacPorts, NixOS, OpenSUSE, Scoop, Snapcraft, Void, and webi, plus release images on Docker. This unusually broad distribution makes shfmt readily available in developer workstations and CI systems.
Typical use is `shfmt -l -w script.sh` to list and rewrite shell files. Formatting behavior can be supplied through a project `.editorconfig`, making the tool suitable for editor hooks, pre-commit checks, and CI formatting gates.
The official project also publishes container images, allowing formatting without installing a host binary.
shfmt is the shell ecosystem's prominent opinionated formatter. Package enthusiasts value its broad package-manager coverage, single Go binary, EditorConfig support, and applicability to POSIX shell, Bash, mksh, and related dialects.
Sicherheitslage
generalized runtime or code generation signal.
yellow Risiko · mittel Konfidenz · runtime
Prüfe vor unbeaufsichtigter Agent-Nutzung, ob das Tool Klartext-Credentials liest, Remote-Zustand schreibt, Artefakte veröffentlicht oder Plugins ausführt.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
<project-root>/.editorconfigExecutables
| Befehl | Art | Sichtbarkeit | Hinweis |
|---|---|---|---|
shfmt | cli | globales Executable |
Aktualität
Diese Signale trennen das Alter der Seitengenerierung, Aktivität des Paketmanagers und Upstream-Release-Vergleich. Versionsrückstand wird nur gemeldet, wenn eine Evidenz-URL und vergleichbare Versionen vorhanden sind.
Installationsmetadaten
| Paketschlüssel | brew:shfmt |
|---|---|
| Version | 3.14.1 |
| Paketmanager | Homebrew |
| Paketmanager-Seite | https://formulae.brew.sh/formula/shfmt |
| Homepage | https://github.com/mvdan/sh |
| Repository | https://github.com/mvdan/sh |
| Lizenz | BSD-3-Clause |
| Quellarchiv | https://github.com/mvdan/sh/archive/refs/tags/v3.14.0.tar.gz |
| Zuletzt aktualisiert | 2026-09-13T13:33:22+02:00 |
| Pulse | updated |
| Build-Abhängigkeiten | go, scdoc |
| Bottle | verfügbar (auf arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, x86_64_linux) |
| Homebrew post-install | nicht definiert |
| Dienst | keiner deklariert |
Registry-Fakten
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | shfmt |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
Source-Datenbank-Treffer
Treffer stammen aus externen Paketmanager-Indizes und bleiben von lokalen Automic-Vault-Paketlinks getrennt.
shfmt 3.8.0-1+b8
format shell programs
sudo apt install shfmtshfmt
nix profile install nixpkgs#shfmtshfmt 3.8.0-1
format shell programs
sudo apt install shfmtshfmt 3.13.1-r2
A shell parser, formatter, and interpreter (sh/bash/mksh)
sudo apk add shfmtshfmt-doc 3.13.1-r2
A shell parser, formatter, and interpreter (sh/bash/mksh) (documentation)
sudo apk add shfmt-docshfmt 3.13.1-1
Format shell programs
sudo pacman -S shfmtshfmt 3.12.0-1.7
A shell formatter with bash support
sudo zypper install shfmtshfmt
sudo port install shfmtmain/shfmt
scoop install main/shfmtmvdan.shfmt
winget install --id mvdan.shfmt -eQuellspur
Diese Seite wird von av-web aus dem privaten Paket-SQLite-Artefakt bereitgestellt, das scripts/generate-pkg-sqlite.py erstellt.
View the package source record on GitHub.