macOS
brew install alejandralocal Homebrew formula metadata
brew
Command-line tool for formatting Nix Code. Version 4.0.0 via Homebrew; verified from local package data.
install
brew install alejandralocal Homebrew formula metadata
nix profile install nixpkgs#alejandranixpkgs package indexes · pkgs/by-name/al/alejandra/package.nix · source: api.github.com
overview
Command-line tool for formatting Nix Code
history
Alejandra is a Rust-based formatter for the Nix expression language. It is part of the Nix ecosystem's formatter wars: small, opinionated, fast, and built to make style disappear from code review.
The official README brands Alejandra as 'The Uncompromising Nix Code Formatter' and says it was written in Rust, formats Nixpkgs in seconds, and starts from the original Nixpkgs style refined by feedback from developers using Nix at scale.
The changelog shows a fast maturation arc in 2022. Version 1.0.0 shipped in March 2022; 1.4.0 and 1.5.0 followed with pre-commit support and dependency updates; 2.0.0 in July 2022 added a style guide, editor integration docs, and publication as a Rust crate with API docs; 3.0.0 in August 2022 simplified the CLI and improved large-file formatting order.
Later releases kept the formatter active in normal toolchain maintenance. Version 3.1.0 in 2024 refreshed integration docs and pre-commit hooks, and 4.0.0 in 2025 added experimental configurable indentation and support for newer Nix pipe operators.
Alejandra's official README documents installation from Nixpkgs, Nix flakes, NixOS configurations, Homebrew, and prebuilt binaries. The supplied package facts also list Homebrew and Nix packages, which fits its primary audience: people already managing tools declaratively.
The README lists integrations for VS Code, Vim, Neovim, GNU Emacs, Doom Emacs, pre-commit, and pre-commit-hooks.nix. That adoption history matters because formatters become useful only when they are cheap to run in editors, CI, and repository hooks.
Users run `alejandra` against Nix files, stdin, or repository trees, and often wire it into editor format-on-save or pre-commit hooks. The project treats the CLI, formatting rules, flags, exit codes, and stdout as its public API under semantic versioning.
Configuration is intentionally limited. The README documents an experimental `alejandra.toml` discovered in the current working directory, or supplied explicitly with `--experimental-config`.
Alejandra is a package-nerd package because it formats the language used to describe packages in Nix. It is both a normal CLI package and a tool that shapes the readability of package expressions.
It also has the useful distribution trifecta for developer tools: Rust source, prebuilt binaries, and native Nix/Homebrew packaging, plus editor and hook integrations.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
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.
Config paths the tool may read or write during local use.
alejandra.tomlexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
alejandra | cli | global executable |
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.
https://github.com/kamadorueda/alejandra
install metadata
| Package key | brew:alejandra |
|---|---|
| Version | 4.0.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/alejandra |
| Homepage | https://kamadorueda.com/alejandra/ |
| Repository | https://github.com/kamadorueda/alejandra |
| Upstream docs | https://github.com/kamadorueda/alejandra#readme |
| License | Unlicense |
| Source archive | https://github.com/kamadorueda/alejandra/archive/refs/tags/4.0.0.tar.gz |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | alejandra |
| 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 |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
alejandra
nix profile install nixpkgs#alejandrasource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.