# 使用 Homebrew, Nix 安装 djlint

查看 djlint 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:djlint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install djlint
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#djlint
```

  证据: nixpkgs package indexes: pkgs/by-name/dj/djlint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:djlint
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/djlint>
- **版本:** 1.43.2
- **来源摘要:** Lint & Format HTML Templates
- **主页:** <https://djlint.com>
- **仓库:** <https://github.com/djlint/djLint>
- **上游文档:** <https://djlint.com>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://files.pythonhosted.org/packages/62/33/7efcde4581d1295c1e64a75b6d1ac444b4c2557b668e73032070ff5fc081/djlint-1.43.2.tar.gz>
- **最后更新:** 2026-08-02T20:58:18Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- djlint (cli)
- djlint (别名)

## 依赖

- libyaml
- python@3.14

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.43.2
- 管理器更新时间: 2026-08-02
- 本地数据: OK
- 上游仓库: https://djlint.com
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

djLint is an HTML template linter and formatter for Django, Jinja, Nunjucks, Twig, Handlebars, Mustache, Go templates, Angular, and related template syntaxes. It fills the gap between generic HTML tooling and framework-aware template code that contains tags ordinary HTML formatters do not understand.

### 项目历史

The official repository was created in July 2021 and describes djLint as a formatter and linter for HTML templates. The README frames the project as a response to template files being left out while many programming languages already had standard formatters and linters.

The project grew around both formatting and linting modes: users can lint, check formatting, reformat, run pre-commit hooks, and configure behavior through `pyproject.toml`, `djlint.toml`, `.djlint.toml`, or `.djlintrc`. The official docs and README also show multilingual documentation and integrations as part of the public surface.

### 采用历史

djLint adoption is visible in its packaging spread: the official README documents PyPI, Homebrew, npm experimental installation, and pre-commit hooks. That mix fits web teams that want the same tool in Python environments, JavaScript-heavy repositories, and system package managers.

The official release metadata shows continued activity through the mid-2020s, including the 1.36 series in 2024 and the 1.39 series in 2026. The project also advertises downloads and community links from the README, signaling that it had moved beyond a one-off formatter experiment.

### 使用方式

Typical use is `djlint . --lint`, `djlint . --check`, or `djlint . --reformat`, often with an explicit template extension such as `html.j2`. Teams put options in project config files and use pre-commit hooks for automatic reformatting and lint checks.

### 为什么软件包爱好者会关心

djLint matters to package nerds because it packages a messy cross-template problem into one CLI while still fitting Python, npm, Homebrew, and pre-commit ecosystems. It also sits next to smaller tools like DjHTML, making the template-formatting space unusually visible in package-manager catalogs.

### 时间线

- 2021-07-12: Official GitHub repository created.
- 2024-12-24: v1.36.4 release published.
- 2026-06-04: v1.37.0 and v1.38.0 releases published.
- 2026-06-30: v1.39.6 release published.

### Related projects

- Related projects include DjHTML for indentation-only Django and Jinja templates, HTMLHint for HTML linting, curlylint for template linting, Black as a formatting-culture reference point, and pre-commit for hook-based adoption.

### 来源

- <https://github.com/djlint/djLint>
- <https://raw.githubusercontent.com/djlint/djLint/master/README.md>
- <https://djlint.com/docs/getting-started/>
- <https://djlint.com/docs/configuration/>
- <https://api.github.com/repos/djlint/djLint>
- <https://api.github.com/repos/djlint/djLint/releases?per_page=12>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## 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

- Unix: pyproject.toml, djlint.toml, .djlint.toml, .djlintrc
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** djlint
- **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:** head, stable

## 其他软件包管理器记录

- Nix - djlint: normalized package name match | nixpkgs package indexes: pkgs/by-name/dj/djlint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [panache](https://pkg.so/zh-hans/brew/panache/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, linter, linting-formatting.
- [djhtml](https://pkg.so/zh-hans/brew/djhtml/) - Shares pkgdb curated category or tags: cli, developer-tools, django, formatter, html.
- [tidy-html5](https://pkg.so/zh-hans/brew/tidy-html5/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, html.
- [biome](https://pkg.so/zh-hans/brew/biome/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, linter.
- [rumdl](https://pkg.so/zh-hans/brew/rumdl/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, linter.
- [ktlint](https://pkg.so/zh-hans/brew/ktlint/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, linter.
- [sqlfluff](https://pkg.so/zh-hans/brew/sqlfluff/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, linter.
- [tombi](https://pkg.so/zh-hans/brew/tombi/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, linter.
- [gdtoolkit](https://pkg.so/zh-hans/brew/gdtoolkit/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, formatter, libyaml.

## Combined YAML source

View the package source record on GitHub. [combined/djlint.yml](https://github.com/mxcl/pkgdb/blob/main/combined/djlint.yml)


## 来源

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