Skip to content

shfmt

Agent-readyGit & GitHubProductivity

Shell formatting, bash style, and ci hygiene from the terminal.

Shell formatting, bash style, and ci hygiene from the terminal. Built by mvdan.

Task fit

shell formatting, bash style, and ci hygiene from the terminal.

Lane

Review PRs, triage issues, inspect workflows, and keep repo work agent-safe.

Operator brief

Use shfmt for shell formatting, bash style, and ci hygiene from the terminal.

Run `shfmt -w scripts` and see what comes back.

Repository family

mvdan

First trust check

shfmt responds locally and is ready for the first real command.

Safe first loop

Install, verify, then run one real command.

GitHub review loop

Install command

$ brew install shfmt

Operator pack

Copy or export the working notes for this CLI before handing it to an agent.

Verify

$ shfmt --version

shfmt responds locally and is ready for the first real command.

First real command

$ shfmt -w scripts

First steps

  1. 01Install shfmt.
  2. 02Run `shfmt --version` first.
  3. 03Start with `shfmt -w scripts`.
  4. 04Install the CLI and make sure it is on your PATH.

When to use / hold off when

Best for

shell formatting, bash style, and ci hygiene from the terminal.

Use this when

You need productivity workflows in both local dev and CI.

Hold off when

You don't work with productivity workflows.

Trust and constraints

trusted95/100
Install readyTrusted
JSON outputNo
Non-interactiveYes
CI-friendlyYes

Why operators pick it

  • shfmt fits git & github well, especially for shell formatting, bash style, and ci hygiene from the terminal.
  • 8,353 homebrew installs (30d).
  • Easy to automate.

Constraints

  • Output is mostly plain text.

Repository context

Other CLIs in this family

This is the only CLI surfaced from this family right now.

Facts and links

Install withbrew
Homebrew installs (30d)8.4K
GitHub stars8.6K
LicenseBSD-3-Clause
UpdatedMar 22, 2026