# 使用 Homebrew, apk, apt, Nix, zypper 安装 smenu

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

## 安装

```sh
sudo av install brew:smenu
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install smenu
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add smenu
```

  证据: Alpine Linux edge package indexes: smenu from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install smenu
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#smenu
```

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

- zypper (92%):

```sh
sudo zypper install smenu
```

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

## 软件包事实

- **软件包键:** brew:smenu
- **软件包管理器:** Homebrew
- **版本:** 1.5.0
- **来源摘要:** Powerful and versatile CLI selection tool for interactive or scripting use
- **主页:** <https://github.com/p-gen/smenu>
- **仓库:** <https://github.com/p-gen/smenu>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- smenu (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

smenu is a terminal selection filter: it reads words from standard input or a file, displays them as an interactive terminal menu, and writes the selected value back to the shell pipeline. It is a package-nerd tool because it turns ordinary POSIX pipelines into small interactive workflows without requiring a full TUI framework.

### 项目历史

The official repository describes smenu as starting as a lightweight and flexible terminal menu generator before evolving into a versatile CLI selection tool for interactive or scripting use. Its README compares it to `sed`, but for selection rather than editing.

### 采用历史

The README notes that some Linux distributions already package smenu and that it can be built on Unix-like systems with a functional terminfo development platform. The supplied package metadata records Homebrew, Alpine, Debian, Ubuntu, Nix, and openSUSE package names.

### 使用方式

A common pattern is command substitution: pipe text into `smenu`, let the user choose with keyboard or mouse in a scrolling terminal window, and store the result in a shell variable. The README examples select fields from `/proc` and `/etc/passwd` output.

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

Package maintainers care because smenu depends on terminal capabilities, terminfo, UTF-8 behavior, and interactive shell ergonomics. It is a compact example of packaging a C-based CLI that must behave correctly across many terminals.

### 时间线

- 2018: Earliest GitHub release returned by the releases API was v0.9.11.
- 2020s: README documents distribution packaging and builds on Unix-like systems.
- 2020s: Repository presents smenu as a mature selection filter with manpage and wiki documentation.

### Related projects

- The README frames smenu by analogy to classic Unix filters such as `sed`; it also depends on terminal capabilities from the terminfo ecosystem.

### 来源

- GitHub releases API for p-gen/smenu: earliest listed release v0.9.11 on 2018-01-26.
- <https://github.com/p-gen/smenu README: origin statement, selection-filter description, terminal and UTF-8 behavior, build/install notes, examples.>
- <https://github.com/p-gen/smenu/blob/master/smenu.1: official manpage documentation.>
- input source_facts.package-manager: Homebrew, Alpine, Debian, Ubuntu, Nix, and zypper package names.


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - smenu - 1.2.0-1+b1: normalized package name match | Debian stable package indexes: smenu from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | curse-based CLI selection box | https://github.com/p-gen/smenu
- Nix - smenu: normalized package name match | nixpkgs package indexes: pkgs/by-name/sm/smenu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - smenu - 1.2.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: smenu from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | curse-based CLI selection box | https://github.com/p-gen/smenu
- apk - smenu - 1.5.0-r0: normalized package name match | Alpine Linux edge package indexes: smenu from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A standard input word picker | https://github.com/p-gen/smenu
- apk - smenu-doc - 1.5.0-r0: normalized package name match | Alpine Linux edge package indexes: smenu-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A standard input word picker (documentation) | https://github.com/p-gen/smenu
- zypper - smenu - 1.5.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: smenu from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A standard input word picker | https://github.com/p-gen/smenu
- zypper - smenu-tests - 1.5.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: smenu-tests from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Testing system for smenu | https://github.com/p-gen/smenu


## Combined YAML source

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