# 使用 Homebrew 安装 nmstatectl

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

## 安装

```sh
sudo av install brew:nmstatectl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nmstatectl
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:nmstatectl
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nmstatectl>
- **版本:** 2.2.61
- **来源摘要:** Command-line tool that manages host networking settings in a declarative manner
- **主页:** <https://nmstate.io/>
- **仓库:** <https://github.com/nmstate/nmstate>
- **上游文档:** <https://nmstate.io/>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/nmstate/nmstate/releases/download/v2.2.61/nmstate-2.2.61.tar.gz>
- **最后更新:** 2026-07-13T12:48:17Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- nmstatectl (cli)
- nmstatectl (别名)

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.2.61
- 管理器更新时间: 2026-07-13
- 本地数据: OK
- 上游仓库: https://github.com/nmstate/nmstate
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

nmstatectl is the command-line front end to Nmstate, a declarative API and library for describing and applying Linux host network state.

### 项目历史

Nmstate grew around the idea that host networking should be described as desired state rather than a series of imperative commands. The official project describes a predefined schema where both current state and desired state conform to the same model, with NetworkManager as the main southbound provider.

The nmstatectl tool exists for users who want to try or operate Nmstate without writing directly against libnmstate. It exposes show, edit, apply, rollback, and commit workflows using YAML or JSON state files.

### 采用历史

Nmstate's adoption story is strongest in enterprise Linux. Red Hat documents it in RHEL networking guides as a declarative network manager API with atomic and transactional operations, partial editing, and plugin support. Fedora documentation and articles also present it as an Infrastructure-as-Code-friendly approach to host networking.

The ecosystem extends beyond the CLI. The upstream README lists Rust, Python, Go, and C bindings, and the nmstate organization also maintains Kubernetes-oriented declarative node-networking work. That makes nmstatectl both a standalone admin command and a diagnostic/manual entry point into a larger network-state stack.

### 使用方式

Practical nmstatectl use starts with nmstatectl show to inspect YAML state, then nmstatectl apply state.yaml to converge the system toward a desired configuration. Operators use it for Ethernet, bonds, bridges, VLANs, routes, DNS, and similar host-network declarations where a checked-in YAML file is clearer than a sequence of nmcli commands.

The rollback behavior is a major package-nerd detail: by default, if the applied state does not verify against the desired state, nmstatectl rolls back. For risky remote-network changes, the manual transaction flow with apply --no-commit, commit, and rollback gives administrators a guardrail against locking themselves out.

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

nmstatectl is significant because it turns Linux host networking into data. That makes it fit config management, CI validation, RHEL system roles, and Kubernetes-node workflows better than one-off command transcripts.

### 时间线

- {'event': "The upstream README installation note names Fedora 29+ as a supported package target, anchoring Nmstate's early Linux distribution integration.", 'year': '2018'}
- {'date': '2021-08-09', 'event': 'Fedora Magazine published a practical introduction to Nmstate as a declarative networking configuration tool.'}

### Related projects

- NetworkManager
- libnmstate
- RHEL network system role
- kubernetes-nmstate

### 来源

- <https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/assembly_introduction-to-nmstate_configuring-and-managing-networking>
- <https://fedoramagazine.org/nmstate-a-declarative-networking-config-tool/>
- <https://github.com/nmstate/kubernetes-nmstate>
- <https://github.com/nmstate/nmstate>
- <https://nmstate.io/>
- <https://nmstate.io/cli_guide.html>


## 安全说明

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

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

## 源数据库详情

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


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [libproxy](https://pkg.so/zh-hans/brew/libproxy/) - Shares pkgdb curated category or tags: cli, configuration, networking.
- [assh](https://pkg.so/zh-hans/brew/assh/) - Shares pkgdb curated category or tags: cli, networking, yaml.
- [hostdb](https://pkg.so/zh-hans/brew/hostdb/) - Shares pkgdb curated category or tags: cli, network-configuration, networking.
- [c-ares](https://pkg.so/zh-hans/brew/c-ares/) - Shares pkgdb curated category or tags: cli, networking.
- [unbound](https://pkg.so/zh-hans/brew/unbound/) - Shares pkgdb curated category or tags: cli, networking.
- [curl](https://pkg.so/zh-hans/brew/curl/) - Shares pkgdb curated category or tags: cli, networking.
- [libidn2](https://pkg.so/zh-hans/brew/libidn2/) - Shares pkgdb curated category or tags: cli, networking.
- [openldap](https://pkg.so/zh-hans/brew/openldap/) - Shares pkgdb curated category or tags: cli, networking.
- [boring](https://pkg.so/zh-hans/brew/boring/) - Local package facts share a topical domain. Shared terms: cli, command-line, line, networking, that.
- [nfdump](https://pkg.so/zh-hans/brew/nfdump/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, command-line, line, network, networking.

## Combined YAML source

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


## 来源

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