# Install cproto with Homebrew, apk, apt, dnf, MacPorts, Nix

Generate function prototypes for functions in input files. Version 4.8a via Homebrew; verified 2026-07-27. Also installable with debian: sudo apt install cproto.

## Install

```sh
sudo av install brew:cproto
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cproto
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cproto
```

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

### Linux

- apk (92%):

```sh
sudo apk add cproto
```

  Evidence: Alpine Linux edge package indexes: cproto from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install cproto
```

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

- dnf (92%):

```sh
sudo dnf install cproto
```

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

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

## Package facts

- **Package key:** brew:cproto
- **Package manager:** Homebrew
- **Version:** 4.8a
- **Source summary:** Generate function prototypes for functions in input files
- **Homepage:** <https://invisible-island.net/cproto/>
- **Last updated:** 2026-07-27T01:51:16Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- cproto (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 4.8a
## Project history and usage

cproto is a long-lived C source utility for generating function prototypes and declarations from C input files. It also supports conversions between old-style K&R function definitions and ANSI C style, plus lint-library generation.

### Project history

The official history says Chin Huang wrote and maintained cproto while at the University of Waterloo, with the first public version posted to comp.sources.unix in October 1989. Updates followed on comp.sources.misc through the early 1990s.

Thomas E. Dickey began working on cproto in June 1993, sending fixes and improvements to Huang. His work added lint-library support, GNU configure support, regression tests, diagnostics, and ports including VAX/VMS and HP/Apollo.

The modern Invisible Island page documents Dickey's continued maintenance, occasional fixes, generated documentation, release archives, and an official GitHub snapshots repository.

### Adoption history

cproto spread through the Unix source-sharing ecosystem before modern package managers, with releases posted to comp.sources.unix and comp.sources.misc. The official page later cataloged downstream package references for Debian, RPM-based systems, SlackBuilds, FreshPorts, NetBSD pkgsrc, AIX, HP-UX, and Repology.

### How it is used

The manpage describes cproto as reading C source files or standard input and writing generated function prototypes to standard output. It can process K&R or ANSI-style definitions, optionally emit variable declarations, convert source forms, and generate lint-library source.

### Why package nerds care

cproto is a classic small Unix development tool: it predates Git hosting, has Usenet-release provenance, uses generated manpage documentation, and remains packaged because it solves a narrow C maintenance problem that still appears in legacy codebases.

### Timeline

- 1989: Chin Huang's first cproto release was posted to comp.sources.unix volume 20, issue 39.
- 1991: cproto 2.0 and 2.2 updates appeared on comp.sources.misc.
- 1992: cproto 3.x updates continued on comp.sources.misc.
- 1993: Thomas E. Dickey began contributing fixes and improvements.
- 1994: cproto 4.0 appeared with Dickey's contributions including lint-library work, configure support, and additional ports.
- 2016: Thomas Dickey's cproto-snapshots GitHub repository was created for release and interim labels.

### Related projects

- The official history contrasts cproto with protoize and notes cproto's role in generating lint libraries.
- Dickey's page says he currently uses cproto to generate lint libraries for ncurses.

### Sources

- <https://invisible-island.net/cproto/cproto.html>
- <https://invisible-island.net/cproto/manpage/cproto.html>
- <https://github.com/ThomasDickey/cproto-snapshots>
- <https://api.github.com/repos/ThomasDickey/cproto-snapshots>


## Security Notes

No matching local secret-handling manifest was found for cproto. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Other Package-Manager Records

- Debian apt - cproto - 4.7x-1: normalized package name match | Debian stable package indexes: cproto from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | utilities to generate C function prototypes from C source code | https://invisible-island.net/cproto/cproto.html
- Nix - cproto: normalized package name match | nixpkgs package indexes: pkgs/by-name/cp/cproto/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cproto - 4.7v-2: normalized package name match | Ubuntu 24.04 LTS package indexes: cproto from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | utilities to generate C function prototypes from C source code | https://invisible-island.net/cproto/cproto.html
- apk - cproto - 4.8a-r0: normalized package name match | Alpine Linux edge package indexes: cproto from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generate C function prototypes from C source code | https://invisible-island.net/cproto/
- apk - cproto-doc - 4.8a-r0: normalized package name match | Alpine Linux edge package indexes: cproto-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generate C function prototypes from C source code (documentation) | https://invisible-island.net/cproto/
- dnf - cproto - 4.8-2.fc45: normalized package name match | Fedora Rawhide package metadata: cproto from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Generates function prototypes and variable declarations from C code | http://invisible-island.net/
- MacPorts - cproto: normalized package name match | MacPorts ports tree: devel/cproto/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/cproto.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cproto.yml)


## Sources

- 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
