← 全部工具

alejandra

热度 85 更新于 开发与构建

Command-line tool for formatting Nix Code

homebrewauto-collected

安装

Homebrew
brew install alejandra

通过 Homebrew 安装。

<h1 align="center"Alejandra 💅</h2

<p align="center"The Uncompromising Nix Code Formatter</p

<p align="center" <a href="https://buildkite.com/kamadorueda/alejandra" <img alt="CI/CD" src="https://badge.buildkite.com/67d170860f5630bbc776a97fb0be9c88a97c92860c91f77aa0.svg?branch=main" </img </a <a href="https://coveralls.io/github/kamadorueda/alejandra?branch=main" <img alt="Coverage" src="https://coveralls.io/repos/github/kamadorueda/alejandra/badge.svg?branch=main" </img </a <a href="https://github.com/kamadorueda/alejandra/blob/main/UNLICENSE" <img alt="License: The Unlicense" src="https://img.shields.io/badge/license-The Unlicense-green.svg" </a <a href="https://github.com/kamadorueda/alejandra" <img alt="style: Alejandra" src="https://img.shields.io/badge/code%20style-Alejandra-green.svg" </a

</p <p align="center" Try it on your browser! <a href="https://kamadorueda.github.io/alejandra/" here </a </p

Features

  • ✔️ Fast

It's written in Rust and formats Nixpkgs in just a few seconds. [^benchmark-specs]

  • ✔️ Powerful

We define a comprehensive style for all possible combinations of the Nix expression language.

  • ✔️ Reliable

High coverage, battle tested.

From Nix's eyes, code is just the same. [^semantic-changes]

  • ✔️ Beautiful

Beauty is subjective, right?

We started from the original style of Nixpkgs, and then we applied the feedback of developers who have used Nix at scale for several years, producing a very well-grounded style guide. For everything else, some pieces of the style are configurable.

  • ✔️ Transparent

You won't notice the formatter after a while.

Humans care about the content, machines about the style!