Enforcing code formatting standards can make a project more readable and easier to work with. But in a large project or monorepo with many contributors, this can become a time-consuming task.
The project may be written in many different programming or configuration languages, each with its own formatting tool. This means you’d need to learn how to invoke each one, and how its tree traversal logic works.
treefmt is a single tool that traverses the code tree and maps each file to its respective code formatter. You only need to learn one command: treefmt.
Because it keeps track of file modification time, most runs only take a few milliseconds.
It’s not an earth-shattering project, but reducing minor frictions can be a big benefit to your company. Small improvements add up to a much smoother workflow.
This is a free and open-source project. If you like our work, you might also consider working with us ;)
This repository is free to use, and it’s maintained at: