EVERYTHING XIAOMI
Get listed
Side by side

Prettier vs shfmt

Prettier logo

Prettier

7.6#1 in code formatting toolsFree plan
Free planWebAPIExtensionLinux
Visit

shfmt

6.1#22 in code formatting toolsFree plan
Free planLinuxmacOSSelf-hostedWindows
Visit

What both publish

FactPrettiershfmt
ConfigurationConfiguration can use JSON, YAML, TOML, JavaScript or TypeScript files, with overrides for selected files and directories.shfmt reads formatting options from EditorConfig files when parser or printer flags are not provided.
Editor integrationsThe official site lists integrations or support for VS Code, WebStorm, Visual Studio, Vim, Emacs, Sublime Text, Nova and Espresso.Listed integrations include JetBrains shell plugins, micro, NeoVim, VS Code, Emacs, and Trunk.

Prettier plans

  • Open-source PrettierFree
  • PrettierFree

shfmt plans

  • shfmtFree

Pick Prettier if…

It suits developers who want consistent code formatting across supported languages and editors. Teams needing additional languages can use plugins, while those using ESLint can follow the documented integration guidance.

Pick shfmt if…

shfmt suits shell developers who want consistent formatting or syntax checks across POSIX Shell, Bash, Zsh, mksh or Bats. Editor integrations and a library API also serve users integrating it into editor or code workflows.

Charts they share