# 使用 Homebrew, apt, MacPorts, Nix, dnf 安装 nvi

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

## 安装

```sh
sudo av install brew:nvi
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nvi
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nvi
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install nvi
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#nvi
```

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

- dnf (92%):

```sh
sudo dnf install nex
```

  证据: Fedora Rawhide package metadata: nex from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

## 软件包事实

- **软件包键:** brew:nvi
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nvi>
- **版本:** 1.81.6
- **来源摘要:** 44BSD re-implementation of vi
- **主页:** <https://repo.or.cz/nvi.git>
- **仓库:** <https://repo.or.cz/nvi.git>
- **上游文档:** <https://repo.or.cz/nvi.git>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://deb.debian.org/debian/pool/main/n/nvi/nvi_1.81.6.orig.tar.gz>
- **最后更新:** 2026-06-28T21:02:37+01:00
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- nex (cli)
- nvi (cli)
- nview (cli)
- nex (别名)
- nvi (别名)
- nview (别名)

## 依赖

- berkeley-db@5

## 构建依赖

- autoconf
- automake
- libtool
- xz

## macOS 提供的库

- ncurses

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.81.6
- 管理器更新时间: 2026-06-28
- 本地数据: OK
- 上游仓库: https://repo.or.cz/nvi
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

nvi is the Berkeley-line reimplementation of ex/vi: a small, traditional vi rather than a Vim-family editor. In package-manager terms it is the BSD vi option people install when they want historical ex/vi behavior with nvi's later conveniences.

### 项目历史

The nvi source describes the editor as a reimplementation of the ex/vi editors from 4BSD. Keith Bostic's Berkeley Vi page says the source is freely available and redistributable, and lists features that distinguished nvi from old vi, including multiple edit buffers, command-line editing, path completion, tag stacks with cscope support, extended regular expressions, infinite undo, horizontal scrolling, message catalogs, and early Perl/Tcl scripting support.

The repo.or.cz README records the deeper lineage: nvi was originally derived from Steve Kirkendall's elvis vi clone, uses Henry Spencer's POSIX-style regular expression code, and retains acknowledgements to Bill Joy and Mark Horton from original vi. The maintained repo also shows ongoing maintenance by Sven Verdoolaege.

### 采用历史

nvi's adoption is mostly Unix/BSD preservation rather than hype-cycle growth. It appears in Homebrew, Debian, MacPorts, Nix, and related package sets as the classic 44BSD vi reimplementation, while Homebrew's formula distributes version 1.81.6 as bottled packages for macOS and Linux.

Homebrew marks the formula deprecated. That does not erase nvi's historical role, but it does show the Homebrew package has become a legacy editor package rather than an actively expanding developer-tool ecosystem.

### 使用方式

Users run nvi directly as `nvi`, `nex`, or `nview` for vi, ex, and read-only view workflows. Package nerds pick it for low-dependency POSIX-ish editing, scripts or muscle memory built around vi/ex behavior, and systems where Vim or Neovim would be more editor than needed.

The practical distinction is that nvi aims to preserve ex/vi semantics while adding careful terminal-era quality-of-life features. It is a good fit for editing config files, working over remote shells, and testing vi-compatible behavior.

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

nvi is significant because it carries the Berkeley vi branch into modern package managers. It is not the most popular vi implementation, but it is one of the reference points for what 'real vi' means on BSD-like systems.

Its package story is also a reminder that some important packages are maintained as infrastructure memory: small install counts, old code, and still useful when compatibility matters.

### 时间线

- 4BSD era: ex/vi originated in the Berkeley Software Distribution lineage.
- 1990s: nvi became the freely redistributable Berkeley vi reimplementation associated with Keith Bostic.
- 2001-04-30: the repo.or.cz README revision identifies the tree as nvi 1.80-era source.
- 2000s: repo.or.cz tags record the 1.81.x line, including nvi-1.81.6.

### Related projects

- elvis is the vi clone from which the nvi README says the project was originally derived.
- Vim and Neovim are larger vi-family editors with much broader plugin ecosystems.
- nvi2 is a multibyte-oriented fork of nvi.

### 来源

- <https://formulae.brew.sh/formula/nvi>
- <https://repo.or.cz/nvi.git>
- <https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page>
- <https://sites.google.com/a/bostic.com/keithbostic/the-berkeley-vi-editor-home-page/nvi-faq>


## 安全说明

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:** nvi
- **Version Scheme:** 0
- **Revision:** 6
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** yes
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - nvi - 1.81.6-23: normalized package name match | Debian stable package indexes: nvi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | 4.4BSD re-implementation of vi | https://repo.or.cz/nvi.git
- Debian apt - nvi-doc - 1.81.6-23: normalized package name match | Debian stable package indexes: nvi-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | 4.4BSD re-implementation of vi - documentation files | https://repo.or.cz/nvi.git
- Nix - nvi: normalized package name match | nixpkgs package indexes: pkgs/by-name/nv/nvi/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - nvi - 1.81.6-21: normalized package name match | Ubuntu 24.04 LTS package indexes: nvi from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | 4.4BSD re-implementation of vi | https://repo.or.cz/nvi.git
- Ubuntu apt - nvi-doc - 1.81.6-21: normalized package name match | Ubuntu 24.04 LTS package indexes: nvi-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | 4.4BSD re-implementation of vi - documentation files | https://repo.or.cz/nvi.git
- MacPorts - nvi: normalized package name match | MacPorts ports tree: editors/nvi/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - nex - 0.0.0+git.2021.03.30.1a3320dab9-3: installed executable or alias match | Debian stable package indexes: nex from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | lexer similar to Lex/Flex - cli | https://github.com/blynn/nex
- Nix - nex: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/ne/nex/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - nex - 0.0.0+git.2021.03.30.1a3320dab9-2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: nex from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | lexer similar to Lex/Flex - cli | https://github.com/blynn/nex
- dnf - nex - 20210330-18.fc44: installed executable or alias match | Fedora Rawhide package metadata: nex from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A lexer generator for Go that is similar to Lex/Flex | http://www-cs-students.stanford.edu/~blynn/nex/


## 相关链接

- [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.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [autoconf](https://www.automicvault.com/zh-hans/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/zh-hans/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/zh-hans/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [xz](https://www.automicvault.com/zh-hans/pkg/brew/xz/) - Build dependency declared by Homebrew.
- [vis](https://www.automicvault.com/zh-hans/pkg/brew/vis/) - Shares av.db curated category or tags: cli, developer-tools, text-editor, text-editors, vi.
- [ex-vi](https://www.automicvault.com/zh-hans/pkg/brew/ex-vi/) - Shares av.db curated category or tags: cli, developer-tools, terminal, text-editor, vi.
- [bvi](https://www.automicvault.com/zh-hans/pkg/brew/bvi/) - Shares av.db curated category or tags: cli, developer-tools, terminal, vi.
- [micro](https://www.automicvault.com/zh-hans/pkg/brew/micro/) - Shares av.db curated category or tags: cli, developer-tools, terminal, text-editor.
- [mle](https://www.automicvault.com/zh-hans/pkg/brew/mle/) - Shares av.db curated category or tags: cli, developer-tools, terminal, text-editor.
- [msedit](https://www.automicvault.com/zh-hans/pkg/brew/msedit/) - Shares av.db curated category or tags: cli, developer-tools, terminal, text-editor.
- [nano](https://www.automicvault.com/zh-hans/pkg/brew/nano/) - Shares av.db curated category or tags: cli, developer-tools, terminal, text-editor.
- [orbiton](https://www.automicvault.com/zh-hans/pkg/brew/orbiton/) - Shares av.db curated category or tags: cli, developer-tools, terminal, text-editor.
- [neatvi](https://www.automicvault.com/zh-hans/pkg/brew/neatvi/) - Local package facts share a topical domain. Shared terms: cli, editor, editors, ex, text.

## Combined YAML source

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