# 使用 Homebrew, Nix 安装 nak

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

## 安装

```sh
sudo av install brew:nak
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nak
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#nak
```

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

## 软件包事实

- **软件包键:** brew:nak
- **软件包管理器:** Homebrew
- **版本:** 0.20.2
- **来源摘要:** CLI for doing all things nostr
- **主页:** <https://github.com/fiatjaf/nak>
- **仓库:** <https://github.com/fiatjaf/nak>
- **最后更新:** 2026-07-26T19:43:12+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- nak (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

nak is fiatjaf's "nostr army knife": a Go command-line tool for creating, signing, publishing, querying, validating, and otherwise plumbing Nostr protocol events.

### 项目历史

The GitHub repository was created on 2022-02-09, during the early growth period of the Nostr ecosystem. Its README presents it as a general-purpose command-line tool for Nostr work, installable via a shell installer, Go, binaries, Homebrew, Arch, and Nix.

The release stream shows active maintenance through the 0.19 and 0.20 series, including v0.20.0 on 2026-06-21. That cadence fits a protocol utility that follows NIP additions and real relay/client usage rather than a one-off demo.

### 采用历史

nak's audience is narrower than mainstream networking tools, but it sits in an important niche for Nostr developers and power users. The repository metadata consulted on 2026-07-01 showed 389 GitHub stars and 46 forks, and the Homebrew page listed 673 installs over the prior 365 days.

Its adoption is tied to Nostr's preference for simple event and relay primitives: a CLI that can emit JSON, sign events, query relays, manage keys, and script relay operations is useful for debugging clients, writing shell workflows, and testing protocol behavior.

### 使用方式

The README examples show the core workflow: `nak event` creates a signed event; options can set secret keys, content, tags, timestamps, and relay targets; `nak req` queries relays and emits JSON that users commonly pipe to tools like `jq`.

Package nerds reach for nak when they want a reproducible Nostr command in a script: publish a test note, inspect relay responses, validate an event, talk to relay management APIs, experiment with bunker/nsec flows, or use Nostr as a transport for other artifacts.

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

nak is significant less as a mass-market CLI and more as a protocol workbench. It gives Nostr's event model a Unix-shaped interface, which is exactly what packagers and shell people want when a network protocol is still evolving.

### 时间线

- 2022-02-09: GitHub repository created.
- 2026-06-21: v0.20.0 release published.
- 2026-07-01: Homebrew Formulae page listed version 0.20.0 and 673 installs over the prior 365 days.

### Related projects

- Nostr
- nostr-tools
- noscl

### 来源

- <https://api.github.com/repos/fiatjaf/nak>
- <https://api.github.com/repos/fiatjaf/nak/releases?per_page=5>
- <https://formulae.brew.sh/formula/nak>
- <https://github.com/fiatjaf/nak>
- <https://stuff.fiatjaf.com/>


## 安全说明

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


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

- Nix - nak: normalized package name match | nixpkgs package indexes: pkgs/by-name/na/nak/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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