# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 cpuid

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

## 安装

```sh
sudo av install brew:cpuid
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cpuid
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cpuid
```

  证据: MacPorts ports tree: sysutils/cpuid/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install cpuid
```

  证据: Debian stable package indexes: cpuid from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install cpuid
```

  证据: Fedora Rawhide package metadata: cpuid 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#cpuid
```

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

- zypper (92%):

```sh
sudo zypper install cpuid
```

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

## 软件包事实

- **软件包键:** brew:cpuid
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cpuid>
- **版本:** 2.4.0
- **来源摘要:** CPU feature identification for Go
- **主页:** <https://github.com/klauspost/cpuid>
- **仓库:** <https://github.com/klauspost/cpuid>
- **上游文档:** <https://github.com/klauspost/cpuid#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/klauspost/cpuid/archive/refs/tags/v2.4.0.tar.gz>
- **最后更新:** 2026-06-30T15:04:20Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- cpuid (cli)
- cpuid (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 2.4.0
- 管理器更新时间: 2026-06-30
- 本地数据: OK
- 上游仓库: https://github.com/klauspost/cpuid
- 检测到的最新版本: v2.4.0 (当前)
## 项目历史与用法

cpuid is a Go package and command-line tool for detecting CPU information and CPU feature flags at runtime without cgo.

### 项目历史

The official GitHub repository was created in 2015. The README describes startup CPU detection cached for fast access during a Go program's lifetime, with support for x86/x64, ARM/ARM64, and RISC-V.

### 采用历史

cpuid fits Go module distribution as a library imported with github.com/klauspost/cpuid/v2, while also offering an installable cpuid binary via go install, GitHub release binaries, and Homebrew for macOS/Linux users.

### 使用方式

Go programs use the shared cpuid.CPU value to inspect brand, cores, cache, frequency, and feature sets, then call Supports, Has, or HasAll to gate optimized code paths. The command-line binary prints CPU details and supports JSON output.

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

For packagers and Go maintainers, cpuid is notable because it combines a Go module API with a packaged diagnostic binary, avoids external C code, and exposes runtime feature detection useful to compression, crypto, and other optimized Go libraries.

### 时间线

- 2015: The klauspost/cpuid repository was created.
- 2024: v2.2.8 and v2.2.9 releases were published.
- 2025: v2.2.10, v2.2.11, and v2.3.0 releases were published.

### Related projects

- pkg.go.dev provides generated API documentation for the github.com/klauspost/cpuid/v2 Go module.

### 来源

- <https://github.com/klauspost/cpuid>
- <https://raw.githubusercontent.com/klauspost/cpuid/master/README.md>
- <https://pkg.go.dev/github.com/klauspost/cpuid/v2>
- <https://api.github.com/repos/klauspost/cpuid>
- <https://github.com/klauspost/cpuid/releases/tag/v2.3.0>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cpuid
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - cpuid - 20250316-1: normalized package name match | Debian stable package indexes: cpuid from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tool to dump x86 CPUID information about the CPU(s) | https://www.etallen.com/cpuid.html
- Nix - cpuid: normalized package name match | nixpkgs package indexes: pkgs/by-name/cp/cpuid/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cpuid - 20240330-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: cpuid from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | tool to dump x86 CPUID information about the CPU(s) | https://www.etallen.com/cpuid.html
- dnf - cpuid - 20250419-4.fc44: normalized package name match | Fedora Rawhide package metadata: cpuid from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Dumps information about the CPU(s) | http://www.etallen.com/cpuid.html
- zypper - cpuid - 20260220-1.2: normalized package name match | openSUSE Tumbleweed package metadata: cpuid from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | x86 CPU identification tool | http://etallen.com/cpuid.html
- MacPorts - cpuid: normalized package name match | MacPorts ports tree: sysutils/cpuid/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/zh-hans/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://www.automicvault.com/zh-hans/pkg/brew/go/) - Build dependency declared by Homebrew.
- [cpu_features](https://www.automicvault.com/zh-hans/pkg/brew/cpu-features/) - Shares av.db curated category or tags: cli, cpu, cpu-features, hardware-detection, library.
- [augeas](https://www.automicvault.com/zh-hans/pkg/brew/augeas/) - Shares av.db curated category or tags: cli, library, system.
- [cahute](https://www.automicvault.com/zh-hans/pkg/brew/cahute/) - Shares av.db curated category or tags: cli, library, system.
- [chmlib](https://www.automicvault.com/zh-hans/pkg/brew/chmlib/) - Shares av.db curated category or tags: cli, library, system.
- [confd](https://www.automicvault.com/zh-hans/pkg/brew/confd/) - Shares av.db curated category or tags: cli, go, system.
- [cpufetch](https://www.automicvault.com/zh-hans/pkg/brew/cpufetch/) - Shares av.db curated category or tags: cli, cpu, system.
- [cpulimit](https://www.automicvault.com/zh-hans/pkg/brew/cpulimit/) - Shares av.db curated category or tags: cli, cpu, system.
- [dbus-glib](https://www.automicvault.com/zh-hans/pkg/brew/dbus-glib/) - Shares av.db curated category or tags: cli, library, system.
- [libcpuid](https://www.automicvault.com/zh-hans/pkg/brew/libcpuid/) - Local package facts share a topical domain. Shared terms: cli, cpu, cpuid, detection, feature.

## Combined YAML source

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