[![Support room on Matrix](https://img.shields.io/matrix/treefmt:numtide.com.svg?label=%23treefmt%3Anumtide.com&logo=matrix&server_fqdn=matrix.numtide.com)](https://matrix.to/#/#treefmt:numtide.com)
**Status: beta**
`treefmt` streamlines the process of applying formatters to your project, making it a breeze with just one command line.
## Motivation
It’s common to format code according to the project’s standards before making contributions to any project. This task
seems trivial at first sight — you can set up the required language formatter in your IDE.
However, contributing to multiple projects requires more effort: you must change your formatter configurations each
time you switch between projects or call them manually.
Formatting requires less effort if a universal formatter for multiple languages, which is also project-specific, is in
place.
## About treefmt
`treefmt` runs all your formatters with one command. It’s easy to configure and fast to execute.
![Treefmt Init](./docs/public/init.gif)
Its main features are:
-**Providing a unified CLI and output**
- You don’t need to remember which formatters are necessary for each project.
You can install `treefmt` by downloading the binary. Find the binaries for different architectures [here](https://github.com/numtide/treefmt.go/releases).
In order to use `treefmt` in your project, make sure the config file `treefmt.toml` is present in the root folder and
is edited to suit your needs.
You can generate it with:
```
$ treefmt --init
```
You can then run `treefmt` in your project root folder like this:
```
$ treefmt
```
To explore the tool’s flags and options, type:
```console
$ treefmt --help
```
Additionally, there's a wrapper called [`treefmt-nix`](https://github.com/numtide/treefmt.go-nix) for using `treefmt` with [`nix`](https://github.com/NixOS/nix).
## Configuration
Formatters are specified in the config file `treefmt.toml`, which is usually located in the project root folder. The
`treefmt` works with any formatter that adheres to the [following specification](https://github.com/numtide/treefmt.go/blob/main/docs/formatters-spec.md).