macOS
brew install nixfmtlocal Homebrew formula metadata
brew
nixfmt のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install nixfmtlocal Homebrew formula metadata
nix profile install nixpkgs#nixfmtnixpkgs package indexes · pkgs/by-name/ni/nixfmt/package.nix · ソース: api.github.com
概要
Command-line tool to format Nix language code
履歴
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.
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.
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.
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.
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.
セキュリティ状態
narrow executable package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
nixfmt | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://github.com/NixOS/nixfmt
インストールメタデータ
| パッケージキー | brew:nixfmt |
|---|---|
| バージョン | 1.4.0 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/nixfmt |
| ホームページ | https://github.com/NixOS/nixfmt |
| リポジトリ | https://github.com/NixOS/nixfmt |
| 上流ドキュメント | https://github.com/NixOS/nixfmt#readme |
| ライセンス | MPL-2.0 |
| ソースアーカイブ | https://github.com/NixOS/nixfmt/archive/refs/tags/v1.4.0.tar.gz |
| 最終更新 | 2026-07-08T03:18:41Z |
| Pulse | updated |
| 依存関係 | gmp |
| ビルド依存関係 | cabal-install, ghc |
| macOS 提供ライブラリ | libffi |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | nixfmt |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
nixfmt
nix profile install nixpkgs#nixfmtソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.