# 使用 Homebrew, MacPorts, pacman, apt 安装 hindent

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

## 安装

```sh
sudo av install brew:hindent
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install hindent
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install hindent
```

  证据: MacPorts ports tree: textproc/hindent/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- pacman (92%):

```sh
sudo pacman -S hindent
```

  证据: Arch Linux sync databases: hindent from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Ubuntu apt (92%):

```sh
sudo apt install hindent
```

  证据: Ubuntu 24.04 LTS package indexes: hindent from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

## 软件包事实

- **软件包键:** brew:hindent
- **软件包管理器:** Homebrew
- **版本:** 6.3.0
- **来源摘要:** Haskell pretty printer
- **主页:** <https://github.com/mihaimaruseac/hindent>
- **仓库:** <https://github.com/mihaimaruseac/hindent>
- **最后更新:** 2026-07-22T14:05:15Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- hindent (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 6.3.0
## 项目历史与用法

hindent is a Haskell pretty-printer and source formatter distributed as both a Haskell package and a CLI executable. Its package-manager role is straightforward: it gives editors, hooks, and shell pipelines a stable `hindent` command for reformatting Haskell source.

### 项目历史

The repository history begins on 2014-08-24 with a first commit and rapid follow-up commits for printer structure, expression constructors, pattern support, declarations, where clauses, and a basic executable. The first visible tag, 1.0, followed on 2014-08-30, and the project iterated quickly through 2.x, 3.x, and 4.x tags in late 2014.

Hackage describes hindent as an extensible Haskell pretty printer, both a library and an executable, and points users to the GitHub repository for usage. Over time the package continued through 5.x and 6.x releases while tracking parser and language-extension needs in the Haskell ecosystem.

### 采用历史

hindent's adoption is tied to Haskell editor and build workflows. Its README documents use in pipeline style, Emacs `hindent-mode`, Vim `formatprg`, a Vim plugin, and JetBrains File Watchers. Hackage lists the package under development, library, and program tags, which reflects its dual role as code and executable.

The package appears in Homebrew, MacPorts, Arch, Ubuntu, Hackage, and Stackage contexts, making it familiar to developers who expect language formatters to be installable from their OS or language package manager.

### 使用方式

The basic usage model is `cat path/to/sourcefile.hs | hindent` or passing filenames to the CLI. Options cover line length, indent or tab size, import sorting, trailing newline behavior, validation, and GHC language extensions.

The README documents project- or home-level `.hindent.yaml` customization with indentation, line length, import sorting, line breaks, and extensions. Editor integrations use the same CLI, so the package works without a separate daemon or language-server dependency.

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

hindent matters to package nerds because it is a classic formatter package: tiny surface area, editor-friendly, pipeline-friendly, and available in multiple package systems. It represents the era when language communities standardized formatting through standalone executables before formatter support was expected inside every language server.

It is also a useful Haskell packaging specimen because it lives simultaneously on Hackage and GitHub, depends on parser libraries, and must follow language evolution as GHC syntax grows.

### 时间线

- 2014-08-24: Repository history begins with the first commit.
- 2014-08-30: 1.0 is tagged.
- 2014-09: 2.x and 3.x releases are tagged during rapid early development.
- 2014-11: 4.0 is tagged.
- 2026-01-24: Hackage records upload of hindent 6.3.0.

### Related projects

- Hackage and Stackage are the package registry and curated package-set surfaces where many Haskell developers encounter hindent.
- Editor integrations include the repository's Emacs mode, Vim `formatprg`, vim-hindent, and JetBrains File Watchers.
- Related Haskell formatting tools include stylish-haskell, ormolu, fourmolu, and brittany, though hindent's official materials focus on its own formatter and editor integrations.

### 来源

- Hackage package page for package description, versions, maintainer, upload, source repo, license, and distribution context.
- Official Git repository tags and commits for early timeline.
- Official README for usage, editor integration, and customization.


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Ubuntu apt - hindent - 5.3.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: hindent from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Extensible Haskell pretty printer | https://github.com/mihaimaruseac/hindent
- pacman - hindent - 6.2.0-3: normalized package name match | Arch Linux sync databases: hindent from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Extensible Haskell pretty printer | https://github.com/mihaimaruseac/hindent
- MacPorts - hindent: normalized package name match | MacPorts ports tree: textproc/hindent/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
