# Install gengetopt with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Generate C code to parse command-line arguments via getopt_long. Version 2.23 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:gengetopt
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gengetopt
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gengetopt
```

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

### Linux

- apk (92%):

```sh
sudo apk add gengetopt
```

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

- Debian apt (92%):

```sh
sudo apt install gengetopt
```

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

- dnf (92%):

```sh
sudo dnf install gengetopt
```

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

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

- pacman (92%):

```sh
sudo pacman -S gengetopt
```

  Evidence: Arch Linux sync databases: gengetopt from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install gengetopt
```

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

## Package facts

- **Package key:** brew:gengetopt
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gengetopt>
- **Version:** 2.23
- **Source summary:** Generate C code to parse command-line arguments via getopt_long
- **Homepage:** <https://www.gnu.org/software/gengetopt/>
- **Upstream docs:** <https://www.gnu.org/software/gengetopt>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/gengetopt/gengetopt-2.23.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gengetopt (cli)
- gengetopt (alias)

## Build dependencies

- texinfo

## 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: 2.23
- Local data: ok
- Upstream repository: https://www.gnu.org/software/gengetopt/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GNU Gengetopt is a GNU programming tool that generates C command-line option parsers from declarative option descriptions. Its generated code uses getopt_long and fills a struct, saving C and C++ programmers from hand-writing the same option parsing, validation, help, and configuration-file plumbing.

### Project history

The Savannah README says Gengetopt was originally written by Roberto Arturo Tena Sanchez and later maintained by Tomas Volf. The manual positions it as a tool for C and C++ programmers and documents .ggo input files, generated parsers, generated help output, configuration-file parsing, multiple parsers, and operation on systems without getopt_long.

### Adoption history

Gengetopt's adoption came through the GNU toolchain ecosystem: GNU FTP hosted regular tarball releases from the early 2000s through the 2.23 release in 2019, and the tool appears in Unix package managers as a code generator for projects that want generated C parsers without taking on a larger framework.

### How it is used

Practitioners write a .ggo file describing short and long options, defaults, required values, groups, modes, and help text, then run gengetopt to produce C source and header files. Autoconf and Automake projects use it when generated parser code is preferable to a hand-maintained getopt_long loop.

### Why package nerds care

Gengetopt is a classic small GNU build dependency: it is rarely the star of a system, but it sits in source-release and distribution workflows where reproducible generated C code is easier to audit and package than bespoke argument parsers.

### Timeline

- 2003: GNU FTP listed gengetopt 2.10 tarballs.
- 2009: version 2.22.4 switched the project repository from CVS to Git.
- 2012: version 2.22.6 added versiontext and strict-hidden support while fixing Mac OS X compilation.
- 2019: GNU FTP listed the 2.23 release.

### Related projects

- Related tools and standards include getopt_long, GNU Coding Standards, GNU Autoconf, GNU Automake, and Doxygen comments in generated files.

### Sources

- <https://formulae.brew.sh/formula/gengetopt>
- <https://ftp.gnu.org/gnu/gengetopt/>
- <https://git.savannah.gnu.org/cgit/gengetopt.git/plain/NEWS?h=master>
- <https://git.savannah.gnu.org/cgit/gengetopt.git/plain/README?h=master>
- <https://www.gnu.org/software/gengetopt/>
- <https://www.gnu.org/software/gengetopt/gengetopt.html>


## 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:** gengetopt
- **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 - gengetopt - 2.23+dfsg1-1: normalized package name match | Debian stable package indexes: gengetopt from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | skeleton main.c generator | https://www.gnu.org/software/gengetopt/
- Nix - gengetopt: normalized package name match | nixpkgs package indexes: pkgs/by-name/ge/gengetopt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gengetopt - 2.23+dfsg1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gengetopt from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | skeleton main.c generator | https://www.gnu.org/software/gengetopt/
- apk - gengetopt - 2.23-r2: normalized package name match | Alpine Linux edge package indexes: gengetopt from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to write command line option parsing code for C programs | https://www.gnu.org/software/gengetopt/
- apk - gengetopt-dev - 2.23-r2: normalized package name match | Alpine Linux edge package indexes: gengetopt-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to write command line option parsing code for C programs (development files) | https://www.gnu.org/software/gengetopt/
- apk - gengetopt-doc - 2.23-r2: normalized package name match | Alpine Linux edge package indexes: gengetopt-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to write command line option parsing code for C programs (documentation) | https://www.gnu.org/software/gengetopt/
- dnf - gengetopt - 2.23-17.fc44: normalized package name match | Fedora Rawhide package metadata: gengetopt from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tool to write command line option parsing code for C programs | http://www.gnu.org/software/gengetopt/
- pacman - gengetopt - 2.23-4: normalized package name match | Arch Linux sync databases: gengetopt from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool to write command line option parsing code for C programs | https://www.gnu.org/software/gengetopt/gengetopt.html
- zypper - gengetopt - 2.23-1.24: normalized package name match | openSUSE Tumbleweed package metadata: gengetopt from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Commandline parser generator | https://www.gnu.org/software/gengetopt/
- MacPorts - gengetopt: normalized package name match | MacPorts ports tree: devel/gengetopt/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 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.
- [texinfo](https://www.automicvault.com/pkg/brew/texinfo/) - Build dependency declared by Homebrew.
- [cproto](https://www.automicvault.com/pkg/brew/cproto/) - Shares av.db curated category or tags: c, cli, code-generation, developer-tools.
- [crcany](https://www.automicvault.com/pkg/brew/crcany/) - Shares av.db curated category or tags: c, cli, code-generation, developer-tools.
- [gperf](https://www.automicvault.com/pkg/brew/gperf/) - Shares av.db curated category or tags: c, cli, code-generation, developer-tools.
- [autogen](https://www.automicvault.com/pkg/brew/autogen/) - Shares av.db curated category or tags: cli, code-generation, developer-tools.
- [configen](https://www.automicvault.com/pkg/brew/configen/) - Shares av.db curated category or tags: cli, code-generation, developer-tools.
- [counterfeiter](https://www.automicvault.com/pkg/brew/counterfeiter/) - Shares av.db curated category or tags: cli, code-generation, developer-tools.
- [create-api](https://www.automicvault.com/pkg/brew/create-api/) - Shares av.db curated category or tags: cli, code-generation, developer-tools.
- [dhall-bash](https://www.automicvault.com/pkg/brew/dhall-bash/) - Shares av.db curated category or tags: cli, code-generation, developer-tools.
- [treecc](https://www.automicvault.com/pkg/brew/treecc/) - Local package facts share a topical domain. Shared terms: cli, code, code-generation, developer, developer-tools.
- [cflow](https://www.automicvault.com/pkg/brew/cflow/) - Local package facts share a topical domain. Shared terms: c, cli, code, developer, developer-tools.

## Combined YAML source

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