# 使用 Homebrew, MacPorts 安装 gnu-indent

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

## 安装

```sh
sudo av install brew:gnu-indent
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gnu-indent
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gindent
```

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

## 软件包事实

- **软件包键:** brew:gnu-indent
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gnu-indent>
- **版本:** 2.2.13
- **来源摘要:** C code prettifier
- **主页:** <https://www.gnu.org/software/indent/>
- **上游文档:** <https://www.gnu.org/software/indent/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://ftpmirror.gnu.org/gnu/indent/indent-2.2.13.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gindent (cli)
- gindent (别名)

## 依赖

- gettext

## 构建依赖

- texinfo

## 安装行为

- post-install 钩子: 未定义
- 注意事项: GNU "indent" has been installed as "gindent". If you need to use it as "indent", you can add a "gnubin" directory to your PATH from your bashrc like: PATH="$HOMEBREW_PREFIX/opt/gnu-indent/libexec/gnubin:$PATH"
- Bottle: 可用 于 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.2.13
- 本地数据: OK
- 上游仓库: https://www.gnu.org/software/indent/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

GNU indent is the GNU Project's C source formatter, a command-line tool for changing whitespace and layout without changing program meaning. Its manual describes it as a formatter for C programs that can make code easier to read and convert between styles.

### 项目历史

The GNU manual records Free Software Foundation copyright years beginning in 1989 and describes behavioral changes across early GNU indent releases, including GNU-style indentation as the default from version 1.2 and a revised command format from version 1.3. The formatter retained compatibility concepts from older indent implementations, including an option preset for the original Berkeley style, while making GNU style a first-class default.

### 采用历史

GNU indent became part of the long-lived GNU command-line toolchain for projects that wanted reproducible C formatting before newer formatters became widespread. Its homepage points users to GNU mirrors, Savannah development, Info and man documentation, and the GNU bug-tracking workflow, placing it in the same distribution culture as other standalone GNU utilities.

### 使用方式

Practitioners use GNU indent to reformat C source files, write formatted output to a separate file or standard output, and select known style presets such as GNU, K&R, Berkeley, or Linux. It also supports a profile file mechanism, so teams or individual developers can keep repeated formatting options outside the command line.

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

For package maintainers, GNU indent is a small but characteristic GNU utility: mostly invoked as a build or maintenance tool, sensitive to C dialect details, and useful when a project wants GNU formatting behavior rather than the indent variant supplied by another Unix.

### 时间线

- 1989: GNU indent manual copyright history begins in the Free Software Foundation manual.
- Version 1.2: GNU style became the default indentation style.
- Version 1.3: GNU indent adopted the command forms documented in later manuals.
- 2023: Release notes for version 2.2.13 describe fixes and translation updates.

### Related projects

- GNU indent belongs to the family of Unix source-formatting tools and is often compared with BSD indent and newer C-family formatters such as clang-format.

### 来源

- <https://git.savannah.gnu.org/cgit/indent.git/plain/NEWS>
- <https://www.gnu.org/software/indent/>
- <https://www.gnu.org/software/indent/manual/indent.html>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gnu-indent
- **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

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

- MacPorts - gindent: installed executable or alias match | MacPorts ports tree: devel/gindent/Portfile from https://api.github.com/repos/macports/macports-ports/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.
- [gettext](https://pkg.so/zh-hans/brew/gettext/) - Runtime dependency declared by Homebrew.
- [texinfo](https://pkg.so/zh-hans/brew/texinfo/) - Build dependency declared by Homebrew.
- [astyle](https://pkg.so/zh-hans/brew/astyle/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools, formatter.
- [ccache](https://pkg.so/zh-hans/brew/ccache/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [swig](https://pkg.so/zh-hans/brew/swig/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [swiftformat](https://pkg.so/zh-hans/brew/swiftformat/) - Shares pkgdb curated category or tags: cli, code-style, developer-tools, formatter.
- [black](https://pkg.so/zh-hans/brew/black/) - Shares pkgdb curated category or tags: cli, code-style, developer-tools, formatter.
- [gdb](https://pkg.so/zh-hans/brew/gdb/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [enchant](https://pkg.so/zh-hans/brew/enchant/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [emscripten](https://pkg.so/zh-hans/brew/emscripten/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [gnu-complexity](https://pkg.so/zh-hans/brew/gnu-complexity/) - Package names and metadata indicate a similar tool family. Shared terms: c, cli, code, developer, developer-tools.
- [gnu-barcode](https://pkg.so/zh-hans/brew/gnu-barcode/) - Package names and metadata indicate a similar tool family. Shared terms: cli, developer, developer-tools, gnu.

## Combined YAML source

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


## 来源

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