Automic VaultAutomic Vault

brew

Install treefmt with Homebrew, MacPorts, Nix

One CLI to format the code tree. Version 2.5.0 via Homebrew; verified 2026-06-29.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install treefmt

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install treefmt

MacPorts ports tree · devel/treefmt/Portfile · source: api.github.com

Linux

Nixverified · 92%
nix profile install nixpkgs#treefmt

nixpkgs package indexes · pkgs/by-name/tr/treefmt/package.nix · source: api.github.com

overview

Package summary

One CLI to format the code tree

Commands and aliases

  • treefmt

history

Project history and usage

treefmt is a formatter multiplexer: one CLI that runs the right formatters across a source tree from a project-level configuration file.

Project history

Numtide's README explains treefmt as a response to polyglot repositories, where each language brings its own formatter and teams repeatedly reimplement scripts to run them. treefmt turns that recurring script into one command.

The project emphasizes a unified CLI and output, parallel execution, and tracking changed files so that formatting does not always have to scan and rewrite an entire repository. Its documentation centers the `treefmt.toml` file in the project root as the place where formatter commands, options, and include globs are declared.

By 2026 the GitHub repository had multiple major releases, Go and Nix build metadata, and related tooling such as treefmt-nix, reflecting its adoption in Nix-heavy and polyglot development workflows.

Adoption history

treefmt's adoption is closely tied to repositories that do not want language-specific formatting scripts in every project. It is packaged by Homebrew, MacPorts, and Nix, and the upstream README explicitly points Nix users at treefmt-nix.

For package users, the attraction is boring consistency: install one binary, commit one `treefmt.toml`, and let CI or pre-commit workflows run all configured formatters the same way.

How it is used

A project usually creates `treefmt.toml` with `treefmt --init`, defines formatter sections with command, options, and include globs, and then runs `treefmt` from the project root.

Package nerds use it to standardize formatting across Nix, Rust, Go, JavaScript, and other mixed-language repos without maintaining a custom shell script per repository.

Why package nerds care

treefmt is significant because it packages repository formatting as a composable CLI rather than a pile of local scripts. That matters to reproducible developer environments, especially where Nix flakes and CI expect declarative tooling.

Timeline

  • Project docs: treefmt is presented as the formatter multiplexer.
  • 2026: v2.5.0 release adds formatter option support and Go toolchain updates.
  • 2026: The repository records roughly a thousand stars, dozens of releases, and continued maintenance.

Related projects

  • treefmt-nix wraps treefmt for Nix-based configuration and formatter provisioning.
  • Related tools named upstream include EditorConfig, Prettier, Super-Linter, and pre-commit.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
treefmt.toml

executables

Installed executables

CommandKindExposureNote
treefmtcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version2.5.0
manager updated2026-06-29
local dataok
upstreamcurrent
latest detectedv2.5.0

https://github.com/numtide/treefmt

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:treefmt
Version2.5.0
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/treefmt
Homepagehttps://treefmt.com/latest/
Repositoryhttps://github.com/numtide/treefmt
Upstream docshttps://treefmt.com/latest
LicenseMIT
Source archivehttps://github.com/numtide/treefmt/archive/refs/tags/v2.5.0.tar.gz
Last updated2026-06-29T12:01:53Z
Pulseupdated
Build dependenciesgo
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nametreefmt
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

treefmt

nix profile install nixpkgs#treefmt
  • normalized package name match
  • Matched by: Treefmt
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/tr/treefmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
MacPorts95%

treefmt

sudo port install treefmt
  • normalized package name match
  • Matched by: Treefmt
MacPorts ports tree · api.github.com · MacPorts ports tree: devel/treefmt/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment