# 使用 Homebrew, apk, Nix 安装 kcgi

查看 kcgi 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kcgi
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add kcgi
```

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:kcgi
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/kcgi>
- **版本:** 1.0.1
- **来源摘要:** Minimal CGI and FastCGI library for C/C++
- **主页:** <https://kristaps.bsd.lv/kcgi/>
- **仓库:** <https://github.com/kristapsdz/kcgi>
- **上游文档:** <https://kristaps.bsd.lv/kcgi>
- **许可证:** ISC
- **源码归档:** <https://kristaps.bsd.lv/kcgi/snapshots/kcgi-1.0.1.tgz>
- **已生成:** 2026-07-26T07:20:29+00:00

## 可执行文件

- kfcgi (cli)
- kfcgi (别名)

## 构建依赖

- bmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-26
- 管理器版本: 1.0.1
- 本地数据: OK
- 上游仓库: https://kristaps.bsd.lv/kcgi/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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.

### 时间线

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

### 来源

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


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

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

## 其他软件包管理器记录

- 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


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [bmake](https://www.automicvault.com/zh-hans/pkg/brew/bmake/) - Build dependency declared by Homebrew.
- [angular-cli](https://www.automicvault.com/zh-hans/pkg/brew/angular-cli/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [apr](https://www.automicvault.com/zh-hans/pkg/brew/apr/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [cdecl](https://www.automicvault.com/zh-hans/pkg/brew/cdecl/) - Shares av.db curated category or tags: c, cli, cplusplus, developer-tools.
- [check](https://www.automicvault.com/zh-hans/pkg/brew/check/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [chmlib](https://www.automicvault.com/zh-hans/pkg/brew/chmlib/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [commandbox](https://www.automicvault.com/zh-hans/pkg/brew/commandbox/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [cppunit](https://www.automicvault.com/zh-hans/pkg/brew/cppunit/) - Shares av.db curated category or tags: c, cli, developer-tools, library.
- [css-crush](https://www.automicvault.com/zh-hans/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)


## 来源

- 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
