Automic VaultAutomic Vault

brew

Installer nixfmt avec Homebrew, Nix

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de nixfmt pour les workflows d'agents IA.

installation

Commandes d'installation supplémentaires

macOS

Homebrewvérifié · 100%
brew install nixfmt

local Homebrew formula metadata

Linux

Nixvérifié · 92%
nix profile install nixpkgs#nixfmt

nixpkgs package indexes · pkgs/by-name/ni/nixfmt/package.nix · Source: api.github.com

aperçu

Résumé du paquet

Command-line tool to format Nix language code

Commandes et alias

  • nixfmt

historique

Historique du projet et usages

nixfmt is the official formatter for Nix language code. It started as a formatter project, was donated into the NixOS organization, and became the reference implementation for the standard Nix format defined by RFC 166.

Historique du projet

The nixfmt changelog lists version 0.1.0 on May 11, 2019 as the first release and says it could parse all of nixpkgs and format it consistently, though not yet prettily in all places. The repository README later acknowledged that nixfmt was originally developed by Serokell and donated to become an official Nix project after RFC 166.

RFC 166 was merged on March 5, 2024. The RFC text on the pull request set out to define the initial standard Nix format, establish the Nix formatter team, create the official implementation, reformat Nixpkgs, and require default formatting in the Nix CLI to use the official formatter. nixfmt 1.0.0 was released on July 9, 2025 as the first stable release of the official formatter, with the changelog noting that formatting changed substantially from earlier nixfmt output.

Historique d'adoption

nixfmt's adoption is institutional inside the Nix ecosystem rather than measured only by direct installs. The README calls it the official formatter, says the standard is defined in `standard.md`, and documents editor integration, NixOS/Home Manager installation, `nixfmt-tree`, `treefmt-nix`, direct `treefmt`, and `git-hooks.nix` workflows.

On 2026-07-01, Homebrew listed nixfmt 1.3.1 with 1,388 installs over 365 days. That undercounts its real ecosystem role because many Nix users get it from Nixpkgs and invoke it through flakes, `nix fmt`, treefmt wrappers, editor integrations, or pre-commit hooks.

Modes d'utilisation

The bare CLI is simple: `nixfmt < input.nix` formats stdin to stdout, and `nixfmt file.nix` formats a file in place. The README notes that `nixfmt` itself processes one file at a time and points project-level users toward wrappers such as `nixfmt-tree`, `treefmt-nix`, `treefmt`, and `git-hooks.nix`.

For flake-based workflows, the Nix manual documents `nix fmt` as rewriting Nix files to a canonical format using the formatter specified in the flake, including examples that set the formatter to `nixfmt`. That is the package-nerd adoption path: wire nixfmt into the flake, editor, or pre-commit hook and stop arguing about style.

Pourquoi les passionnés de paquets s'y intéressent

nixfmt matters because Nix formatting moved from preference and competing tools toward a source-backed standard with a maintained official implementation. For package databases, it is a clean example of a developer tool whose status changed through governance: Serokell project, RFC-defined standard, NixOS-org repository, then official stable formatter.

Chronologie

  • {'date': '2019-05-11', 'event': 'nixfmt 0.1.0 first release.'}
  • {'date': '2024-03-05', 'event': 'RFC 166 merged.'}
  • {'date': '2025-07-09', 'event': 'nixfmt 1.0.0 released as the first stable official formatter.'}
  • {'date': '2026-07-01', 'event': 'Homebrew formula listed stable nixfmt 1.3.1.'}

Related projects

  • Nix
  • Nixpkgs
  • nixfmt-tree
  • treefmt
  • treefmt-nix
  • git-hooks.nix

posture de sécurité

Niveau de risque : vert

narrow executable package without higher-risk signals.

Classificateur de risque

risque vert · confiance faible · appliance

Pourquoi

  • narrow executable package without higher-risk signals

Signaux

  • metadata:no-higher-risk-signals

Comportement d'installation

  • Aucun hook post-install Homebrew n’est enregistré dans les métadonnées de formule.
  • Les métadonnées de bottle Homebrew sont disponibles pour 6 plateformes.
  • S’installe avec 1 dépendances d’exécution.
  • Les métadonnées de compilation listent 2 dépendances de compilation.

Revue recommandée

Avant une utilisation sans surveillance par un agent, vérifiez si l'outil lit des identifiants en clair, écrit un état distant, publie des artefacts ou lance des plugins.

exécutables

Exécutables installés

CommandeTypeExpositionNote
nixfmtcliexécutable global

fraîcheur

Version et fraîcheur

Ces signaux séparent l'âge de génération de la page, l'activité du gestionnaire de paquets et la comparaison avec les versions amont. Un retard de version n'est signalé que lorsqu'une URL de preuve et des versions comparables sont présentes.

page générée2026-07-08
version du gestionnaire1.4.0
gestionnaire mis à jour2026-07-08
données localesOK
amontà jour
dernière version détectéev1.4.0

https://github.com/NixOS/nixfmt

  • OKAucun avertissement de fraîcheur n'a été généré.

métadonnées d'installation

Métadonnées du paquet

Clé du paquetbrew:nixfmt
Version1.4.0
Gestionnaire de paquetsHomebrew
Page du gestionnaire de paquetshttps://formulae.brew.sh/formula/nixfmt
Page d'accueilhttps://github.com/NixOS/nixfmt
Dépôthttps://github.com/NixOS/nixfmt
Docs amonthttps://github.com/NixOS/nixfmt#readme
LicenceMPL-2.0
Archive sourcehttps://github.com/NixOS/nixfmt/archive/refs/tags/v1.4.0.tar.gz
Dernière mise à jour2026-07-08T03:18:41Z
Pulseupdated
Dépendancesgmp
Dépendances de compilationcabal-install, ghc
Bibliothèques fournies par macOSlibffi
Bouteilledisponible (sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
post-install Homebrewnon défini
Serviceaucun déclaré

faits du registre

Détails de la base source

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

correspondances dans les bases sources

Autres enregistrements de gestionnaires de paquets

Les correspondances proviennent d’index externes de gestionnaires de paquets et restent séparées des liens de paquets Automic Vault locaux.

Nix95%

nixfmt

nix profile install nixpkgs#nixfmt
  • normalized package name match
  • Correspondance par : Nixfmt
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ni/nixfmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

piste source

Généré depuis les données du dépôt

Cette page est servie par av-web depuis l'artéfact SQLite privé des paquets généré par scripts/generate-pkg-sqlite.py.

Sources utilisées

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