# Install cppi with Homebrew, apt, dnf, Nix, zypper

Indent C preprocessor directives to reflect their nesting. Version 1.18 via Homebrew; verified from local package data.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cppi
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install cppi
```

  Evidence: 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
```

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

- Nix (92%):

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

  Evidence: 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
```

  Evidence: openSUSE Tumbleweed package metadata: cppi from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:cppi
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cppi>
- **Version:** 1.18
- **Source summary:** Indent C preprocessor directives to reflect their nesting
- **Homepage:** <https://www.gnu.org/software/cppi/>
- **Repository:** <https://git.savannah.gnu.org/git/cppi.git>
- **Upstream docs:** <https://www.gnu.org/software/cppi>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/cppi/cppi-1.18.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cppi (cli)
- cppi (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.18
- Local data: ok
- Upstream repository: https://www.gnu.org/software/cppi/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

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

### Sources

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


## 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:** cppi
- **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

- 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-28.fc44: normalized package name match | Fedora Rawhide package metadata: cppi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | C preprocessor directive indenter | http://savannah.gnu.org/projects/cppi/
- zypper - cppi - 1.18-2.33: normalized package name match | openSUSE Tumbleweed package metadata: cppi from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | C preprocessor directive indenter | https://savannah.gnu.org/projects/cppi
- zypper - cppi-lang - 1.18-2.33: normalized package name match | openSUSE Tumbleweed package metadata: cppi-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Translations for package cppi | https://savannah.gnu.org/projects/cppi


## Related links

- [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.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [reorder-python-imports](https://www.automicvault.com/pkg/brew/reorder-python-imports/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, linting.
- [source-highlight](https://www.automicvault.com/pkg/brew/source-highlight/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, gnu.
- [swift-format](https://www.automicvault.com/pkg/brew/swift-format/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, linting.
- [air](https://www.automicvault.com/pkg/brew/air/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools.
- [alejandra](https://www.automicvault.com/pkg/brew/alejandra/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools.
- [astyle](https://www.automicvault.com/pkg/brew/astyle/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools.
- [black](https://www.automicvault.com/pkg/brew/black/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools.
- [cbfmt](https://www.automicvault.com/pkg/brew/cbfmt/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools.
- [cflow](https://www.automicvault.com/pkg/brew/cflow/) - Local package facts share a topical domain. Shared terms: cli, code, developer, developer-tools, gnu.
- [gnu-indent](https://www.automicvault.com/pkg/brew/gnu-indent/) - Local package facts share a topical domain. Shared terms: cli, code, developer, developer-tools, gnu.

## Combined YAML source

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