# 使用 Homebrew 安装 hz

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

## 安装

```sh
sudo av install brew:hz
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install hz
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:hz
- **软件包管理器:** Homebrew
- **版本:** 0.9.7
- **来源摘要:** Golang HTTP framework for microservices
- **主页:** <https://www.cloudwego.io>
- **仓库:** <https://github.com/cloudwego/hertz>
- **最后更新:** 2026-07-25T20:56:31-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- hz (别名)
- protoc-gen-hertz (别名)
- thrift-gen-hertz (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

hz is the command-line generator distributed with CloudWeGo Hertz, ByteDance's Go HTTP framework for microservices. In package-manager form it installs the hz executable and its protocol compiler plugins, making Hertz scaffolding available as a standalone developer tool.

### 项目历史

Hertz began inside ByteDance as a high-performance HTTP framework shaped by internal microservice requirements. CloudWeGo's README says Hertz was originally forked from fasthttp, inspired by Gin and Echo, and paired with ByteDance's Netpoll network library.

CloudWeGo announced Hertz as an open source project on June 21, 2022, after more than a year of internal use. The same announcement describes hz as the one-click command-line tool that generates project scaffolding from interface definition files.

The Homebrew formula packages the command-line side of the project from the cloudwego/hertz repository, installing hz along with protoc-gen-hertz and thrift-gen-hertz.

### 采用历史

Before public release, Hertz had already become a large internal ByteDance HTTP framework, with CloudWeGo reporting more than 10,000 online services and peak traffic above 40 million QPS. Public adoption grew around the CloudWeGo ecosystem, where Hertz, Kitex, Netpoll, examples, and hertz-contrib extensions form a Go microservice toolkit.

For package managers, hz is the convenient entry point: developers can install the generator without manually building the Hertz repository, then generate or update service scaffolding from Thrift or Protobuf IDL.

### 使用方式

hz is used to create and maintain Hertz projects from service definitions. The CloudWeGo announcement says it supports Thrift and Protobuf, depends on the official Protobuf compiler and Thriftgo, and can update generated scaffolding after IDL changes.

The surrounding Hertz framework targets high-usability, high-performance, extensible HTTP services with middleware, streaming, protocol support, observability hooks, and optional Netpoll or Go net transport behavior.

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

hz is package-nerd significant because it packages a generator rather than only a runtime library. It gives Homebrew users the same style of one-command workflow familiar from protoc plugins, thrift generators, and framework CLIs, while leaving application code in normal Go modules.

It also represents a common packaging pattern for large Go frameworks: the repository contains libraries, examples, generated-code support, and release tags, but package managers expose the small set of executables developers actually need on PATH.

### 时间线

- 2021: Hertz launched internally at ByteDance according to CloudWeGo's open source announcement.
- 2022-05: The cloudwego/hertz GitHub repository was created.
- 2022-06: CloudWeGo announced Hertz as an open source project and described hz as the Hertz code-generation command.
- 2025: Homebrew tracked the cmd/hz v0.9.x tag series for the standalone hz formula.
- 2026: Hertz releases continued on the v0.10.x line.

### Related projects

- Related CloudWeGo projects include Netpoll, Kitex, Hertz examples, hertz-benchmark, and hertz-contrib. The README also names fasthttp, Gin, and Echo as important influences.

### 来源

- <https://formulae.brew.sh/formula/hz>
- <https://github.com/cloudwego/hertz>
- <https://www.cloudwego.io/blog/2022/06/21/hertz-an-ultra-large-scale-enterprise-level-microservice-http-framework-is-now-officially-open-source/>
- <https://www.cloudwego.io/docs/hertz/overview/>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
