npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nvm-npx

v0.2.0

Published

A tiny shell wrapper that runs npx under a specific Node.js version managed by nvm.

Readme

nvm-npx

轻量级 Shell 封装,让你用一行命令执行 nvm exec <版本> npx …,无需额外依赖。

📘 若需要英文说明,请查看 README.md

✨ 特性亮点

  • 第一个参数指定 Node.js 版本,其余参数原样传给 npx
  • 纯 Bash 实现,在自动化或 MCP 等前置步骤里也能运行。
  • 支持 nvm-npx-22 这类带版本后缀的符号链接或别名。
  • 通过 --nvm-dir 自定义 nvm 安装路径。

🚀 快速开始

临时使用

npx nvm-npx@latest 22 -y chrome-devtools-mcp@latest

全局安装

npm install -g nvm-npx
nvm-npx 20 -y chrome-devtools-mcp@latest

MCP mcpServers 配置示例

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "nvm-npx",
      "args": ["22", "-y", "chrome-devtools-mcp@latest"]
    }
  }
}

请确保 nvm-npx 已在 PATH 中(例如全局安装或创建到 PATH 目录的符号链接)。

🛠️ 使用方式

nvm-npx [选项] <Node版本> [npx 参数...]

如果通过 nvm-npx-18 这类名称调用,可省略 <Node版本> 参数,程序会自动解析 -18 部分。

常用选项

| 选项 | 说明 | | ------------------ | ---------------------------------------------------- | | -h, --help | 显示帮助信息 | | -V, --version | 输出当前 nvm-npx 版本 | | --nvm-dir <路径> | 指定 nvm 安装位置(默认读取 $NVM_DIR~/.nvm) | | -- | 停止解析选项,后续参数全部传给 npx |

⚙️ 工作原理

  1. 从参数或可执行文件名解析目标 Node.js 版本。
  2. 按优先级 --nvm-dir$NVM_DIR~/.nvm 查找并加载 nvm.sh
  3. 调用 nvm exec <版本> npx … 完成执行。

💡 示例

# 在 Node 22 环境下安装 chrome-devtools MCP
nvm-npx 22 -y chrome-devtools-mcp@latest

# 指定自定义的 nvm 安装目录
nvm-npx --nvm-dir /opt/nvm 18 create-vite@latest my-app -- --template react

# 借助符号链接省略版本参数
ln -s $(which nvm-npx) ~/.local/bin/nvm-npx-lts
nvm-npx-lts -y typescript@latest -- --init

❗ 常见问题

提示找不到 nvm.sh

示例输出:

nvm-npx: nvm.sh not found at /Users/you/.nvm/nvm.sh

请检查:

  1. 机器上已正确安装 nvm。
  2. nvm.sh 位于 $NVM_DIR(默认 ~/.nvm)目录下。
  3. 如果使用了自定义路径,请通过 --nvm-dir 明确指定。

📄 许可证

MIT