macOS
brew install shfmtlocal Homebrew formula metadata
sudo port install shfmtMacPorts ports tree · devel/shfmt/Portfile · ソース: api.github.com
brew / 順位 558
shfmt のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install shfmtlocal Homebrew formula metadata
sudo port install shfmtMacPorts ports tree · devel/shfmt/Portfile · ソース: api.github.com
sudo apk add shfmtAlpine Linux edge package indexes · shfmt · ソース: dl-cdn.alpinelinux.org
sudo apt install shfmtDebian stable package indexes · shfmt · ソース: deb.debian.org
nix profile install nixpkgs#shfmtnixpkgs package indexes · pkgs/by-name/sh/shfmt/package.nix · ソース: api.github.com
sudo pacman -S shfmtArch Linux sync databases · shfmt · ソース: geo.mirror.pkgbuild.com
sudo zypper install shfmtopenSUSE Tumbleweed package metadata · shfmt · ソース: download.opensuse.org
scoop install main/shfmtScoop official bucket manifest trees · bucket/shfmt.json · ソース: api.github.com
winget install --id mvdan.shfmt -eWindows Package Manager source index · mvdan.shfmt · ソース: cdn.winget.microsoft.com
概要
Autoformat shell script source code
履歴
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.
セキュリティ状態
generalized runtime or code generation signal.
リスク yellow · 信頼度 中 · runtime
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
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>/.editorconfig実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
shfmt | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
インストールメタデータ
| パッケージキー | brew:shfmt |
|---|---|
| バージョン | 3.14.1 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/shfmt |
| ホームページ | https://github.com/mvdan/sh |
| リポジトリ | https://github.com/mvdan/sh |
| ライセンス | BSD-3-Clause |
| ソースアーカイブ | https://github.com/mvdan/sh/archive/refs/tags/v3.14.0.tar.gz |
| 最終更新 | 2026-09-13T13:33:22+02:00 |
| Pulse | updated |
| ビルド依存関係 | go, scdoc |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| 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 |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
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 -eソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.