# Install kcgi with Homebrew, apk, Nix

Minimal CGI and FastCGI library for C/C++. Version 1.0.1 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#kcgi.

## Install

```sh
sudo av install brew:kcgi
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install kcgi
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add kcgi
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#kcgi
```

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

## Package facts

- **Package key:** brew:kcgi
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/kcgi>
- **Version:** 1.0.1
- **Source summary:** Minimal CGI and FastCGI library for C/C++
- **Homepage:** <https://kristaps.bsd.lv/kcgi/>
- **Repository:** <https://github.com/kristapsdz/kcgi>
- **Upstream docs:** <https://kristaps.bsd.lv/kcgi>
- **License:** ISC
- **Source archive:** <https://kristaps.bsd.lv/kcgi/snapshots/kcgi-1.0.1.tgz>
- **Generated:** 2026-07-26T07:20:29+00:00

## Executables

- kfcgi (cli)
- kfcgi (alias)

## Build dependencies

- bmake

## 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-26
- Package-manager version: 1.0.1
- Local data: ok
- Upstream repository: https://kristaps.bsd.lv/kcgi/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

kcgi is Kristaps Dzonsons's minimal CGI and FastCGI library for C and C++ web applications. Its canonical site emphasizes security, auditability, and use in the BCHS stack.

### Project history

The public GitHub repository was created in January 2016, while the project site serves as the canonical release and documentation surface. kcgi grew around a conservative C web-programming model: parse CGI/FastCGI requests, validate inputs, produce HTTP output, and keep the untrusted request path small enough to audit.

The release archive shows a long 0.x series before 1.0.0 on November 10, 2025. Notable evolution includes bearer-token validation in 2021, seccomp maintenance changes in 2021, asynchronous FastCGI descriptor support in 2023, CORS header support in 2024, and fetch metadata/Priority header support in the 1.0.0 release.

### Adoption history

The official installation page names system packages for OpenBSD, FreeBSD, Homebrew, Arch Linux, and other systems. The batch input also records Alpine, Homebrew, and Nix packages, reflecting its niche but durable role in BSD-flavored C web stacks.

### How it is used

kcgi is used as a C/C++ library rather than primarily as a standalone command. The documentation centers on CGI and FastCGI request parsing, HTTP headers and bodies, typed input validation, formatted writers for JSON/XML/HTML output, compression, authentication helpers, and sandboxing or process separation for untrusted input.

### Why package nerds care

kcgi is interesting to package nerds because it preserves a small-C, manpage-first, BSD-style approach to web development while still being packaged for modern Unix systems. Its release archive is unusually explicit about ABI, platform, and security tradeoffs.

### Timeline

- 2016-01-20: GitHub repository created.
- 2021-05-08: 0.12.5 added bearer-token authorization support.
- 2021-09-23: 0.13.0 changed Linux seccomp defaults.
- 2023-11-19: 0.13.1 added asynchronous FastCGI descriptor support.
- 2025-11-10: 1.0.0 release published.
- 2025-11-17: 1.0.1 hot-fix release published.

### Related projects

- The project site groups kcgi with the BCHS-oriented BSD.lv tools sqlbox and openradtool, and its README notes development primarily on OpenBSD.

### Sources

- <https://github.com/kristapsdz/kcgi>
- <https://kristaps.bsd.lv/kcgi>
- <https://kristaps.bsd.lv/kcgi/archive.html>
- <https://kristaps.bsd.lv/kcgi/kcgi.3.html>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** kcgi
- **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

- Nix - kcgi: normalized package name match | nixpkgs package indexes: pkgs/by-name/kc/kcgi/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - kcgi - 1.0.1-r0: normalized package name match | Alpine Linux edge package indexes: kcgi from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CGI and FastCGI library for C/C++ web applications | https://kristaps.bsd.lv/kcgi
- apk - kcgi-dev - 1.0.1-r0: normalized package name match | Alpine Linux edge package indexes: kcgi-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CGI and FastCGI library for C/C++ web applications (development files) | https://kristaps.bsd.lv/kcgi
- apk - kcgi-doc - 1.0.1-r0: normalized package name match | Alpine Linux edge package indexes: kcgi-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CGI and FastCGI library for C/C++ web applications (documentation) | https://kristaps.bsd.lv/kcgi
- apk - kcgi-static - 1.0.1-r0: normalized package name match | Alpine Linux edge package indexes: kcgi-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | CGI and FastCGI library for C/C++ web applications (static library) | https://kristaps.bsd.lv/kcgi


## 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.
- [bmake](https://www.automicvault.com/pkg/brew/bmake/) - Build dependency declared by Homebrew.
- [angular-cli](https://www.automicvault.com/pkg/brew/angular-cli/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [apr](https://www.automicvault.com/pkg/brew/apr/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [cdecl](https://www.automicvault.com/pkg/brew/cdecl/) - Shares av.db curated category or tags: c, cli, cplusplus, developer-tools.
- [check](https://www.automicvault.com/pkg/brew/check/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [chmlib](https://www.automicvault.com/pkg/brew/chmlib/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [commandbox](https://www.automicvault.com/pkg/brew/commandbox/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [cppunit](https://www.automicvault.com/pkg/brew/cppunit/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [css-crush](https://www.automicvault.com/pkg/brew/css-crush/) - Shares av.db curated category or tags: cli, developer-tools, web-development.

## Combined YAML source

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