# 使用 Homebrew, scoop 安装 capnp

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

## 安装

```sh
sudo av install brew:capnp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install capnp
```

  证据: local Homebrew formula metadata

### Windows

- Scoop (92%):

```sh
scoop install main/capnp
```

  证据: Scoop official bucket manifest trees: bucket/capnp.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:capnp
- **软件包管理器:** Homebrew
- **版本:** 1.5.0
- **来源摘要:** Data interchange format and capability-based RPC system
- **主页:** <https://capnproto.org/>
- **仓库:** <https://github.com/capnproto/capnproto>
- **最后更新:** 2026-07-10T03:17:47Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- capnp (别名)
- capnpc (别名)
- capnpc-c++ (别名)
- capnpc-capnp (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.5.0
## 项目历史与用法

Cap'n Proto is a binary data interchange format, schema language, code generator, and capability-based RPC system designed around zero-copy access, fast generated code, and object-capability RPC.

### 项目历史

Cap'n Proto was announced in 2013 by Kenton Varda, who had been the primary author of Protocol Buffers version 2 at Google. The official introduction presents Cap'n Proto as an answer to years of experience with Protocol Buffers: a binary format that avoids a separate encode/decode step by making the serialized format suitable as an in-memory representation.

The first official release, v0.1, was published on June 27, 2013. At that point the C++ implementation already covered schema files, code generation, file descriptor and stream I/O, text-format output, reflection, dynamic schemas, code-generator plugins, and Linux/macOS testing, while RPC and non-C++ implementations were still developing.

Over the following decade, Cap'n Proto grew from serialization into a full RPC stack and companion C++ toolkit, KJ. The official 1.0 announcement in July 2023 described Cap'n Proto as production-proven and released 1.0 as a long-term-support point before future C++ API work.

### 采用历史

The official introduction says Cap'n Proto was built for Sandstorm.io and is heavily used in Cloudflare Workers. The 1.0 announcement adds that Cloudflare had used it before employing Varda and that Cap'n Proto encoded enormous volumes of messages and data in production.

Cap'n Proto spread through package managers because it is both a compiler tool and a runtime library. The package metadata in this batch shows Homebrew and Scoop coverage, while the official site documents C++ plus implementations or bindings for other languages.

### 使用方式

Users write .capnp schema files, compile them with capnp and language-specific plugins such as capnpc-c++, then use generated accessors to build, read, and traverse messages without a normal parse step.

Beyond local serialization, Cap'n Proto RPC is used for capability-style distributed object calls, promise pipelining, and patterns such as streaming through temporary RPC objects. It is commonly considered alongside Protocol Buffers, FlatBuffers, SBE, Thrift, Ice, and gRPC depending on whether the problem is schema encoding, RPC, or both.

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

Cap'n Proto is a package-nerd landmark because a tiny command-line compiler sits at the intersection of ABI concerns, wire formats, generated code, language bindings, and RPC semantics. Packaging it correctly means shipping both the capnp compiler and the libraries plugins expect.

It is also one of the clearest examples of a serialization package becoming infrastructure: originally interesting for zero-copy encoding, then important as part of Cloudflare Workers and KJ's async C++ ecosystem.

### 时间线

- 2013-03: capnproto/capnproto repository is created on GitHub.
- 2013-04-01: Cap'n Proto is announced.
- 2013-06-27: First official release, v0.1, is published.
- 2013-12: Cap'n Proto v0.4 introduces time-traveling RPC.
- 2014: v0.5 adds features including generics, Visual C++, Java, C#, and Sandstorm.io-related work.
- 2021: v0.9 announcement says Cloudflare Workers Durable Objects make heavy use of Cap'n Proto RPC.
- 2023-07-28: Cap'n Proto 1.0 is released.

### Related projects

- Protocol Buffers is the explicit comparison point and personal predecessor for Kenton Varda.
- Sandstorm.io is named by the official introduction as an original target environment.
- Cloudflare Workers and workerd are named in official Cap'n Proto news as major production users and drivers of KJ work.
- KJ is the C++ toolkit developed with Cap'n Proto.
- FlatBuffers and SBE are serialization formats compared in Cap'n Proto's official news.

### 来源

- <https://api.github.com/repos/capnproto/capnproto>
- <https://capnproto.org/>
- <https://capnproto.org/news/2013-04-01-announcing-capn-proto.html>
- <https://capnproto.org/news/2013-06-27-capn-proto-beta-release.html>
- <https://capnproto.org/news/2021-08-14-capnproto-0.9.html>
- <https://capnproto.org/news/2023-07-28-capnproto-1.0.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

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

- Scoop - main/capnp: normalized package name match | Scoop official bucket manifest trees: bucket/capnp.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/capnp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/capnp.yml)


## 来源

- 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
