# 使用 Homebrew, apt, dnf, Nix, zypper 安装 cppi

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

## 安装

```sh
sudo av install brew:cppi
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cppi
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install cppi
```

  证据: Debian stable package indexes: cppi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install cppi
```

  证据: Fedora Rawhide package metadata: cppi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#cppi
```

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

- zypper (92%):

```sh
sudo zypper install cppi
```

  证据: openSUSE Tumbleweed package metadata: cppi from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:cppi
- **软件包管理器:** Homebrew
- **版本:** 1.18
- **来源摘要:** Indent C preprocessor directives to reflect their nesting
- **主页:** <https://www.gnu.org/software/cppi/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cppi (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

GNU cppi is a small GNU developer tool for indenting C preprocessor directives so their nesting is visible.

### 项目历史

The package is maintained as a GNU program, with Savannah hosting its project and source repository and GNU publishing the user manual and release tarballs.

### 采用历史

Its adoption is typical of compact GNU command-line utilities: it appears in Unix package collections as a formatting and lint-adjacent aid for C and C++ source trees.

### 使用方式

cppi is used from the command line on source files to make conditional-preprocessor structure easier to review by aligning directives with their nesting level.

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

The package matters to maintainers because it is narrowly scoped, reproducibly distributed through GNU release archives, and useful in style or cleanup pipelines without pulling in a full C formatter.

### 时间线

- 2010: GNU FTP archive lists cppi 1.14 and 1.15 release tarballs.
- 2013: GNU FTP archive lists cppi 1.18 release tarballs.

### Related projects

- cppi sits near C formatting and linting tools, but its official scope is specifically C preprocessor directive indentation.

### 来源

- <https://www.gnu.org/software/cppi/>
- <https://www.gnu.org/software/cppi/manual>
- <https://savannah.gnu.org/projects/cppi/>
- <https://ftp.gnu.org/gnu/cppi/>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - cppi - 1.18-3: normalized package name match | Debian stable package indexes: cppi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | adjusts or checks indentation of C and C++ preprocessor directives | https://www.gnu.org/software/cppi/
- Nix - cppi: normalized package name match | nixpkgs package indexes: pkgs/by-name/cp/cppi/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - cppi - 1.18-29.fc45: normalized package name match | Fedora Rawhide package metadata: cppi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | C preprocessor directive indenter | http://savannah.gnu.org/projects/cppi/
- zypper - cppi - 1.18-2.35: normalized package name match | openSUSE Tumbleweed package metadata: cppi from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | C preprocessor directive indenter | https://savannah.gnu.org/projects/cppi
- zypper - cppi-lang - 1.18-2.35: normalized package name match | openSUSE Tumbleweed package metadata: cppi-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Translations for package cppi | https://savannah.gnu.org/projects/cppi


## Combined YAML source

View the package source record on GitHub. [combined/cppi.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cppi.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
