Treefmt applies all the needed formatters to your project with one command line.
Before making contributions to any project, it’s common to get your code formatted according to the project’s standards. This task seems trivial from the first sight — you can simply set up the required language formatter in your IDE. But contributing to multiple projects requires more effort: you need to change the code formatter configs each time you switch between projects, or call formatters manually.
Formatting requires less effort if a universal formatter for multiple languages is in place, which is also project-specific.
Treefmt runs all your formatters with one command. It’s is easy to configure and fast to execute.
Providing a unified CLI and output: You don’t need to remember which formatters are required for each project. Once you specify the formatters in the config file, you can trigger all of them with one command and get a standardized output.
Running all the formatters in parallel: A standard script loops over your folders and runs each formatter consequentially. In contrast, treefmt runs formatters in parallel. This way, the formatting job takes less time.
Caching the changed files: When formatters are run in a script, they process all the files they encounter, no matter whether the code has changed. This unnecessary work can be eliminated if only the changed files are formatted. Treefmt caches the changed files and marks them for re-formatting.
Just type `treefmt` in any folder to reformat the whole code tree. All in all, you get a fast and simple formatting solution. Find the project wiki