百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

nrr

> 包管理
开源

最小、运行速度极快的 npm 脚本运行器

178 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

最小、运行速度极快的 npm 脚本运行器

nrr

Minimal, blazing fast npm scripts runner.

Features • Installation • Usage

Features

Performance

nrr initializes and resolves scripts way faster than other package managers and script runners. It achieves this by providing the largest feature coverage possible while keeping it simple and performant.

Benchmark of nrr, npm, yarn, pnpm, node --run, deno, bun, and dum running a simple true script

Command Mean [ms] Min [ms] Max [ms] Relative
nrr v0.10.2 1.6 ± 0.1 1.4 2.5 1.00
dum v0.1.20 2.0 ± 0.1 1.8 3.8 1.24 ± 0.13
bun v1.2.12 4.2 ± 0.5 3.9 12.3 2.70 ± 0.38
node --run v24.0.2 6.1 ± 0.4 5.4 11.2 3.86 ± 0.41
deno v2.2.12 9.6 ± 0.4 8.9 12.4 6.11 ± 0.53
npm v11.3.0 154.6 ± 6.9 147.5 169.5 98.13 ± 8.68
yarn v4.9.1 306.1 ± 7.9 296.5 317.4 194.24 ± 15.64
pnpm v10.11.0 463.2 ± 18.7 440.6 495.2 293.90 ± 25.38

Benchmarks run on an AWS EC2 t4g.micro instance with the command hyperfine --shell=none --warmup=5 --output=pipe --export-markdown=benchmark.md 'npm run dev' -n 'npm' 'yarn run dev' -n 'yarn' 'pnpm run dev' -n 'pnpm' 'node --run dev' -n 'node --run' 'bun run dev' -n 'bun' 'dum run dev' -n 'dum' 'nrr dev' -n 'nrr'

Package and script metadata display

nrr provides a better-looking display of package details and the command being run than most, and also prints this information to stderr instead of stdout like some of the package managers do (erroneously).

Command execution

On top of the standard script runner functionality that runs your scripts in package.json, nrr can also execute arbitrary commands in your npm package environments! You can use the nrr exec and nrr x commands to execute commands, similar to how npx or pnpm exec works (but faster, of course).

Do note, however, that nrr cannot run commands from remote packages. That feature falls within the purview of package managers, which nrr is not.

[!TIP]

If you create a symlink that has a name of nrx (or, on Windows, a hard link that has a name of nrx.exe) in your PATH, you can execute commands through the nrx binary without using a subcommand!

Script listing

Running nrr without any arguments or running the nrr list subcommand will try to find any packages in the current working directory and its ancestors, and list the scripts available from them, both name and command.

Tooling compatibility

nrr has compatibility functionality that patches npm_execpath so that tools like npm-run-all2 use it instead of package managers for running sub-scripts.

[!WARNING]

This may cause unexpected behavior when npm_execpath is used for non-script running purposes; open an issue if you encounter any bugs.

When running nested scripts with nrr, nrr has specialized behavior that prints nesting depth information while staying minimal and performant:

[email protected]
$ run-s lint format:check
[email protected] lint
$$ eslint .

Completions

nrr provides smart completions for Bash, Elvish, Fish, PowerShell, and Zsh. In addition to basic completions for subcommands and options, nrr also dynamically completes script names when using nrr / nrr run and executables when using nrx / nrr exec.

Spelling suggestions

If you mistype a script name (e.g. buils instead of build), nrr will intelligently suggest the right script to run in the error message using the Jaro similarity algorithm from the strsim crate.

Installation

Nix

Add the overlay or package from the github:ryanccn/nrr flake to your own system flake. Alternatively, install the package declaratively:

bash
nix profile install github:ryanccn/nrr

nrr is also available in Nixpkgs as nixpkgs#nrr.

Installer

This installer script works on Linux and macOS and downloads binaries from GitHub Releases, falling back to cargo install if a prebuilt binary cannot be found.

bash
curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/ryanccn/nrr/refs/heads/main/install.sh | sh

Cargo

nrr supports cargo-binstall, which downloads a binary if possible from GitHub Releases instead of compiling the crate from source.

bash
cargo binstall nrr

If you do want to compile from source, install the crate with Cargo directly:

bash
cargo install nrr

GitHub Releases

You can download pre-compiled binaries for Linux, macOS, and Windows from the latest GitHub Release. Linux binaries are statically linked to musl; Windows binaries require MSVC.

Usage

bash
$ nrr dev
$ nrr run dev
bash
$ nrx eslint --version
$ nrr x eslint --version
$ nrr exec eslint --version
bash
$ nrr
$ nrr list
bash
# Bash
echo "source > ~/.bashrc

# Elvish
echo "eval (E:COMPLETE=elvish nrr | slurp)" >> ~/.elvish/rc.elv

# Fish
echo "source (COMPLETE=fish nrr | psub)" >> ~/.config/fish/config.fish

# PowerShell
$env:COMPLETE = "powershell"
echo "nrr | Out-String | Invoke-Expression" >> $PROFILE
Remove-Item Env:\COMPLETE

# Zsh
echo "source > ~/.zshrc

This section only provides an overview of nrr's command-line functionality. For more options and information, run nrr --help!

License

GPLv3

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustbunclapclinodejs

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类包管理
定价开源

> 相关工具

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image