# Install djhtml with Homebrew, Nix

Django/Jinja template indenter. Version 3.0.11 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:djhtml
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install djhtml
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#djhtml
```

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

## Package facts

- **Package key:** brew:djhtml
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/djhtml>
- **Version:** 3.0.11
- **Source summary:** Django/Jinja template indenter
- **Homepage:** <https://github.com/rtts/djhtml>
- **Repository:** <https://github.com/rtts/djhtml>
- **Upstream docs:** <https://github.com/rtts/djhtml#readme>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://files.pythonhosted.org/packages/22/57/5771714b5961b7ee275a5696cabc3bd8c4a602d7cca103a44016109509fd/djhtml-3.0.11.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- djcss (cli)
- djhtml (cli)
- djjs (cli)
- djtxt (cli)
- djcss (alias)
- djhtml (alias)
- djjs (alias)
- djtxt (alias)

## Dependencies

- python@3.14

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.0.11
- Local data: ok
- Upstream repository: https://github.com/rtts/djhtml
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

DjHTML is a pure-Python indenter for Django and Jinja templates, with companion commands for CSS, JavaScript, and text-like template files. It intentionally calls itself an indenter rather than a formatter: it changes leading whitespace but does not restructure markup.

### Project history

The official repository was created in May 2021 and describes DjHTML as a dependency-free template indenter. Its README positions the tool near formatters such as Black while making a narrower promise: fix indentation for already well-structured mixed HTML, CSS, JavaScript, Django, and Jinja templates.

DjHTML's design is conservative for template-heavy projects because it avoids inserting newlines or other non-whitespace characters. The same repository ships multiple entry points: `djhtml` for template files, `djcss` for style sections or CSS mode, `djjs` for script sections or JavaScript mode, and `djtxt` for text-oriented indentation.

### Adoption history

Adoption has been strongest in Python web projects that already use pre-commit. The README provides a `.pre-commit-config.yaml` example using the official repository as the hook source, which lets teams run DjHTML automatically without adding a broader HTML formatter to the application runtime.

Package-manager interest is modest but durable: the Homebrew package exposes the CLI tools for users who prefer system package managers, while the upstream project remains a small Python utility with regular 3.x releases.

### How it is used

Users run `djhtml template.html` or `djhtml .` to rewrite indentation, and use `--check` in automation when they want a nonzero status if files would change. The `fmt:off` and `fmt:on` markers, plus ignored pre/comment blocks, keep generated or intentionally odd sections out of the indenter.

### Why package nerds care

DjHTML is package-nerd interesting because it occupies the narrow space between no formatter and a full syntax-changing HTML formatter. Its no-dependency Python implementation, pre-commit hook, and separate mode commands make it a small, easy-to-package tool for template repositories.

### Timeline

- 2021-05-08: Official GitHub repository created.
- 2023-02: 3.0.x releases appear in official GitHub release metadata.
- 2026-03-26: 3.0.11 release published.

### Related projects

- Related template-formatting tools include djLint, djangofmt, Black for Python style culture, and pre-commit as the hook runner commonly used to apply DjHTML.

### Sources

- <https://github.com/rtts/djhtml>
- <https://raw.githubusercontent.com/rtts/djhtml/main/README.md>
- <https://api.github.com/repos/rtts/djhtml>
- <https://api.github.com/repos/rtts/djhtml/releases?per_page=10>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** djhtml
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [black](https://www.automicvault.com/pkg/brew/black/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, pre-commit.
- [gersemi](https://www.automicvault.com/pkg/brew/gersemi/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, pre-commit.
- [isort](https://www.automicvault.com/pkg/brew/isort/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, pre-commit.
- [darker](https://www.automicvault.com/pkg/brew/darker/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter, python.
- [djlint](https://www.automicvault.com/pkg/brew/djlint/) - Shares av.db curated category or tags: cli, developer-tools, django, formatter, html.
- [reorder-python-imports](https://www.automicvault.com/pkg/brew/reorder-python-imports/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, pre-commit, python.
- [air](https://www.automicvault.com/pkg/brew/air/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [alejandra](https://www.automicvault.com/pkg/brew/alejandra/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.

## Combined YAML source

View the package source record on GitHub. [combined/djhtml.yml](https://github.com/automic-vault/db/blob/main/combined/djhtml.yml)


## Sources

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