# Install cdecl with Homebrew, apt, dnf, MacPorts, Nix, zypper

Turn English phrases to C or C++ declarations. Version 18.7.2 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:cdecl
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cdecl
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cdecl
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install cdecl
```

  Evidence: Debian stable package indexes: cdecl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install cdecl
```

  Evidence: Fedora Rawhide package metadata: cdecl 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#cdecl
```

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

- zypper (92%):

```sh
sudo zypper install cdecl
```

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

## Package facts

- **Package key:** brew:cdecl
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cdecl>
- **Version:** 18.7.2
- **Source summary:** Turn English phrases to C or C++ declarations
- **Homepage:** <https://github.com/paul-j-lucas/cdecl>
- **Repository:** <https://github.com/paul-j-lucas/cdecl>
- **Upstream docs:** <https://github.com/paul-j-lucas/cdecl#readme>
- **License:** GPL-3.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Homebrew-public-domain
- **Source archive:** <https://github.com/paul-j-lucas/cdecl/releases/download/cdecl-18.7.2/cdecl-18.7.2.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- c++decl (cli)
- cdecl (cli)
- c++decl (alias)
- cdecl (alias)

## Uses from macOS

- ncurses

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

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

cdecl is a classic command-line helper for translating between C or C++ declarations and pseudo-English descriptions. The current maintained version also helps develop and debug C preprocessor macros.

### Project history

The upstream README says cdecl was originally written by Graham Ross sometime in the mid-1980s, and that Tony Hansen posted source with his changes to comp.sources.unix in 1988. The AUTHORS file records a long chain of contributors who added ANSI C, C++ declarations, GNU readline support, Apple blocks, and modern C/C++ language support.

Paul J. Lucas's maintained codebase was created on GitHub in 2017. The README says this codebase fixes deficiencies in earlier versions and adds many features, including Autotools, long options, modern C and C++ language distinctions through C23/C++26, macro expansion, better diagnostics, and extensive type support.

### Adoption history

cdecl is one of those small developer tools that survives because C declarator syntax remains hard to read. The Homebrew input records packages in Homebrew, Debian/Ubuntu, Fedora, MacPorts, Nix, and openSUSE-family packaging, matching its role as a long-running Unix developer aid.

### How it is used

Users can run cdecl interactively, pass declarations on the command line, read standard input, or invoke it as c++decl. It explains declarations such as pointers to arrays and emits declarations from English-like commands. The current version also expands macros step by step for preprocessor debugging.

### Why package nerds care

cdecl is package-nerd catnip because it carries living Unix history: mid-1980s origins, 1988 Usenet distribution, unclear inherited source licensing, and modern maintenance that teaches new C and C++ standards to an old interface. It is tiny, weird, useful, and exactly the sort of program distributions keep around.

### Timeline

- Mid-1980s: Original cdecl written by Graham Ross, according to the upstream README.
- 1988: Tony Hansen posted source with changes to comp.sources.unix.
- 2017: Paul J. Lucas's current GitHub repository created.
- 2018-2026: NEWS records maintained user-visible changes in the modern series.
- 2026: NEWS for Cdecl 18.8 records updated XDG configuration paths.

### Related projects

- The program includes cdecl and c++decl entry points and is historically related to explain, cast, and declare-style links mentioned in the AUTHORS file. Its modern feature set tracks C and C++ language standards rather than depending on a large plugin ecosystem.

### Sources

- <https://api.github.com/repos/paul-j-lucas/cdecl>
- <https://github.com/paul-j-lucas/cdecl>
- <https://github.com/paul-j-lucas/cdecl#readme>
- <https://formulae.brew.sh/api/formula/cdecl.json>
- <https://github.com/paul-j-lucas/cdecl/blob/master/AUTHORS>
- <https://github.com/paul-j-lucas/cdecl/blob/master/NEWS>
- <https://github.com/paul-j-lucas/cdecl/blob/master/share/man/man1/cdecl.1>


## Security Notes

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.cdeclrc, $XDG_CONFIG_HOME/cdecl/cdeclrc, ~/.config/cdecl/cdeclrc, $XDG_CONFIG_DIRS/*/cdecl/cdeclrc, /etc/xdg/cdecl/cdeclrc
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cdecl
- **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 - cdecl - 2.5-15+b1: normalized package name match | Debian stable package indexes: cdecl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Turn English phrases to C or C++ declarations
- Nix - cdecl: normalized package name match | nixpkgs package indexes: pkgs/by-name/cd/cdecl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cdecl - 2.5-13.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: cdecl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Turn English phrases to C or C++ declarations
- dnf - cdecl - 18.7.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: cdecl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Translator for C gibberish | https://github.com/paul-j-lucas/cdecl/
- zypper - cdecl - 18.7.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: cdecl from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | C/C++ function declaration translator | https://github.com/paul-j-lucas/cdecl/
- MacPorts - cdecl: normalized package name match | MacPorts ports tree: devel/cdecl/Portfile from https://api.github.com/repos/macports/macports-ports/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.
- [check](https://www.automicvault.com/pkg/brew/check/) - Shares av.db curated category or tags: c, cli, developer-tools.
- [flatcc](https://www.automicvault.com/pkg/brew/flatcc/) - Shares av.db curated category or tags: c, cli, developer-tools.
- [gnu-indent](https://www.automicvault.com/pkg/brew/gnu-indent/) - Shares av.db curated category or tags: c, cli, developer-tools.
- [c](https://www.automicvault.com/pkg/brew/c/) - Shares av.db curated category or tags: c, cli, developer-tool, developer-tools.
- [ccheck](https://www.automicvault.com/pkg/brew/ccheck/) - Shares av.db curated category or tags: c, cli, developer-tool, developer-tools.
- [cryptol](https://www.automicvault.com/pkg/brew/cryptol/) - Shares av.db curated category or tags: cli, developer-tools, programming-languages.
- [doublecpp](https://www.automicvault.com/pkg/brew/doublecpp/) - Shares av.db curated category or tags: cli, developer-tools, programming-languages.
- [gawk](https://www.automicvault.com/pkg/brew/gawk/) - Shares av.db curated category or tags: cli, developer-tools, programming-languages.
- [dcd](https://www.automicvault.com/pkg/brew/dcd/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tool, developer-tools, programming.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- 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
