# 使用 Homebrew 安装 nats

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

## 安装

```sh
sudo av install brew:nats
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nats
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:nats
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nats>
- **版本:** 0.5.1
- **来源摘要:** Utility for NATS Server and JetStream administration
- **主页:** <https://github.com/nats-io/natscli>
- **仓库:** <https://github.com/nats-io/natscli>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/nats-io/natscli/archive/refs/tags/v0.5.1.tar.gz>
- **最后更新:** 2026-10-26T18:50:54Z
- **已生成:** 2026-11-04T12:20:42+00:00

## 可执行文件

- nats (cli)
- nats (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-11-04
- 管理器版本: 0.5.1
- 管理器更新时间: 2026-10-26
- 本地数据: OK
- 上游仓库: https://github.com/nats-io/natscli
- 检测到的最新版本: v0.5.1 (当前)
## 项目历史与用法

NATS CLI is the official command-line utility for interacting with NATS, administering JetStream resources, inspecting servers, managing contexts, and testing messaging workloads.

### 项目历史

NATS CLI was developed as the official command-line client and administrative utility for the NATS ecosystem. It consolidates messaging operations, JetStream management, monitoring, benchmarking, and server inspection in the `nats` executable.

The project stores named connection contexts as JSON documents, allowing server URLs and authentication settings to be reused across commands.

### 采用历史

The CLI is maintained in the official nats-io organization and is distributed through Homebrew as well as release archives and installation channels documented by the project.

Its scope expanded with the NATS ecosystem, providing administrative workflows for JetStream, Key-Value stores, Object Stores, services, server monitoring, and authentication contexts.

### 使用方式

Operators use `nats pub`, `nats sub`, and `nats request` for messaging; `nats stream`, `consumer`, `kv`, and `object` commands for JetStream resources; and `nats server` commands for inspection and administration.

Named contexts created with `nats context add` retain server and authentication settings. Credentials files may be referenced by a context, but the official CLI does not prescribe one fixed credentials-file location.

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

The package gives operators one official executable for both everyday publish/subscribe testing and substantial NATS or JetStream administration. Named contexts make multiple servers and authentication profiles manageable from a package-installed CLI.

### 时间线

- Early 2020s: The official natscli project established the `nats` command as the unified NATS administrative CLI.
- 2024: The v0.1 series continued expanding operational and authentication functionality.
- 2026: Official releases continue to add JetStream, reporting, monitoring, and server-management improvements.

### Related projects

- Related official projects include nats-server, NATS client libraries, the nsc account-management tool, and the wider JetStream ecosystem.

### 来源

- Official NATS documentation: https://docs.nats.io/
- Official releases: https://github.com/nats-io/natscli/releases
- Official repository and README: https://github.com/nats-io/natscli


## 安全说明

没有找到 nats 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/nats/context
## 源数据库详情

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


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [nats-server](https://pkg.so/zh-hans/brew/nats-server/) - NATS CLI is the documented client and administrative companion for NATS Server, providing publish/subscribe tests and management of the server's built-in JetStream features.

  来源: <https://docs.nats.io/concepts/getting-started/> · <https://github.com/nats-io/natscli#readme> · <https://github.com/nats-io/nats-server#readme>

## Combined YAML source

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


## 来源

- pkg.so package database
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
