# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix 安装 nq

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

## 安装

```sh
sudo av install brew:nq
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nq
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nq
```

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

### Linux

- apk (92%):

```sh
sudo apk add nq
```

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

- Debian apt (92%):

```sh
sudo apt install nq
```

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

- dnf (92%):

```sh
sudo dnf install nq
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#nq
```

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

## 软件包事实

- **软件包键:** brew:nq
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nq>
- **版本:** 1.0
- **来源摘要:** Unix command-line queue utility
- **主页:** <https://github.com/leahneukirchen/nq>
- **仓库:** <https://github.com/leahneukirchen/nq>
- **上游文档:** <https://github.com/leahneukirchen/nq#readme>
- **许可证:** CC0-1.0
- **源码归档:** <https://github.com/leahneukirchen/nq/archive/refs/tags/v1.0.tar.gz>
- **已生成:** 2026-07-26T07:20:29+00:00

## 可执行文件

- nq (cli)
- nqtail (cli)
- nqterm (cli)
- nq (别名)
- nqtail (别名)
- nqterm (别名)

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-26
- 管理器版本: 1.0
- 本地数据: OK
- 上游仓库: https://github.com/leahneukirchen/nq
- 检测到的最新版本: v1.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

nq is a tiny Unix command-line queue utility by Leah Neukirchen. Its GitHub repository was created on 2015-07-31, and its first listed tag, v0.1, points to a commit dated 2015-08-28.

### 项目历史

The README positions nq as a set of small utilities for lightweight job queues with no setup, maintenance, supervision, or long-running daemon. It depends on POSIX.1-2008 behavior plus flock(2), and the README records testing across Linux, OpenBSD, FreeBSD, NetBSD, Mac OS X, and SmartOS.

The design is deliberately Unixy: jobs are represented by timestamp/PID log files, ordering is enforced with file locks, output is redirected to the job file, and environment variable NQDIR can move queues out of the current directory. The v1.0 tag points to a 2024-07-03 commit that renamed fq to nqtail and tq to nqterm because another fq project created packaging conflicts.

### 采用历史

nq has more mindshare than its tiny code size suggests. The GitHub metadata consulted for this batch reported about 3.1k stars and 70 forks, and the input record shows packages across Alpine, Homebrew, Debian, Fedora/DNF, MacPorts, Nix, and Ubuntu.

Homebrew analytics reported only 52 installs over its 365-day window, so Homebrew is not the best measure of its audience. Its broader adoption signal is distro packaging and repeated mentions in command-line communities as a no-daemon alternative to heavier queue systems or ad hoc nohup chains.

### 使用方式

Practical use is simple: prefix a long-running command with nq, get a job id, and let it run in the background in queue order. Users inspect output with nqtail, wait with nq -w, test pending jobs with nq -t, kill by PID-like filename conventions, and set NQDIR when they want named queues.

Package nerds like nq because it solves a real shell annoyance without a service, config file, database, or scheduler. It is especially handy for serializing downloads, builds, benchmark runs, or one-off maintenance commands on machines where installing and supervising a queue daemon would be silly.

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

nq is significant as a minimal Unix tool: it uses filesystem locks and process semantics instead of owning an infrastructure layer. That makes it attractive to users who prefer composable command-line primitives.

### 时间线

- 2015-07-31: GitHub repository leahneukirchen/nq created.
- 2015-08-28: v0.1 tag commit date.
- 2024-07-03: v1.0 tag commit renames fq to nqtail and tq to nqterm to avoid packaging conflicts.

### Related projects

- task-spooler
- nohup
- flock
- tmux
- screen

### 来源

- <https://api.github.com/repos/leahneukirchen/nq>
- <https://api.github.com/repos/leahneukirchen/nq/commits/2556453d844f9d5224abd843ea2de3df1e8a0d42>
- <https://api.github.com/repos/leahneukirchen/nq/commits/2bb551efd8b3e50d715482a8f3b89f88bae74397>
- <https://api.github.com/repos/leahneukirchen/nq/tags?per_page=10>
- <https://formulae.brew.sh/api/formula/nq.json>
- <https://github.com/leahneukirchen/nq>


## 安全说明

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:** nq
- **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

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

- Debian apt - nq - 1.0-0.2: normalized package name match | Debian stable package indexes: nq from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Lightweight queue system | https://git.vuxu.org/nq/about/
- Nix - nq: normalized package name match | nixpkgs package indexes: pkgs/by-name/nq/nq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - nq - 0.3.1-4: normalized package name match | Ubuntu 24.04 LTS package indexes: nq from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Lightweight queue system | https://git.vuxu.org/nq/about/
- apk - nq - 1.0-r2: normalized package name match | Alpine Linux edge package indexes: nq from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Unix command line queue utility | https://github.com/leahneukirchen/nq
- apk - nq-doc - 1.0-r2: normalized package name match | Alpine Linux edge package indexes: nq-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Unix command line queue utility (documentation) | https://github.com/leahneukirchen/nq
- dnf - nq - 1.0-5.fc44: normalized package name match | Fedora Rawhide package metadata: nq from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Unix command line queue utility | https://github.com/leahneukirchen/nq
- MacPorts - nq: normalized package name match | MacPorts ports tree: sysutils/nq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [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.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [bash](https://www.automicvault.com/zh-hans/pkg/brew/bash/) - Shares av.db curated category or tags: cli, shell, system, unix.
- [dash-shell](https://www.automicvault.com/zh-hans/pkg/brew/dash-shell/) - Shares av.db curated category or tags: cli, shell, system, unix.
- [etsh](https://www.automicvault.com/zh-hans/pkg/brew/etsh/) - Shares av.db curated category or tags: cli, shell, system, unix.
- [tcsh](https://www.automicvault.com/zh-hans/pkg/brew/tcsh/) - Shares av.db curated category or tags: cli, shell, system, unix.
- [yash](https://www.automicvault.com/zh-hans/pkg/brew/yash/) - Shares av.db curated category or tags: cli, shell, system, unix.
- [agedu](https://www.automicvault.com/zh-hans/pkg/brew/agedu/) - Shares av.db curated category or tags: cli, system, unix.
- [ansiweather](https://www.automicvault.com/zh-hans/pkg/brew/ansiweather/) - Shares av.db curated category or tags: cli, shell, system.
- [archey4](https://www.automicvault.com/zh-hans/pkg/brew/archey4/) - Shares av.db curated category or tags: cli, system, unix.
- [pueue](https://www.automicvault.com/zh-hans/pkg/brew/pueue/) - Local package facts share a topical domain. Shared terms: cli, command-line, line, queue, shell.
- [clifm](https://www.automicvault.com/zh-hans/pkg/brew/clifm/) - Local package facts share a topical domain. Shared terms: cli, command-line, line, shell, system.
- [xclip](https://www.automicvault.com/zh-hans/pkg/brew/xclip/) - Local package facts share a topical domain. Shared terms: cli, command-line, line, system, unix.

## Combined YAML source

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