📦 npm / yarn / pnpm / bun 命令互转npm ⇄ yarn ⇄ pnpm ⇄ bun Command Converter
输入任意 npm、yarn、pnpm、bun 或 npx 命令,立即得到另外三种包管理器的等价写法:安装依赖、添加/删除包、-D 开发依赖、-g 全局安装、精确版本、运行脚本、npx 与 dlx/bunx、create 脚手架、更新、CI 安装、依赖原因查询等,并附常用命令对照表,Yarn v1 与 v2+ 的差异会注明。Type any npm, yarn, pnpm, bun or npx command to get the equivalent in the other three: install, add/remove, dev and global deps, exact versions, scripts, npx vs dlx/bunx, create, update, CI installs and “why” — with a cheat sheet and Yarn v1 vs v2+ differences noted.
常用命令对照表Command cheat sheet
支持 npm、Yarn(v1 Classic 与 Berry 2+ 有差异的命令会注明)、pnpm 和 Bun 之间互转:安装依赖、添加/删除包、开发依赖、全局安装、运行脚本、npx 临时执行、create 脚手架、更新、CI 安装等。Converts between npm, Yarn (Classic v1 vs Berry 2+ differences noted), pnpm and Bun: install, add/remove, dev deps, global installs, scripts, npx-style one-off runs, create, update and CI installs.
使用说明与常见问题How-to & FAQ
「npm / yarn / pnpm / bun 命令互转」是什么?What is the npm ⇄ yarn ⇄ pnpm ⇄ bun Command Converter?
输入任意 npm、yarn、pnpm、bun 或 npx 命令,立即得到另外三种包管理器的等价写法:安装依赖、添加/删除包、-D 开发依赖、-g 全局安装、精确版本、运行脚本、npx 与 dlx/bunx、create 脚手架、更新、CI 安装、依赖原因查询等,并附常用命令对照表,Yarn v1 与 v2+ 的差异会注明。Type any npm, yarn, pnpm, bun or npx command to get the equivalent in the other three: install, add/remove, dev and global deps, exact versions, scripts, npx vs dlx/bunx, create, update, CI installs and “why” — with a cheat sheet and Yarn v1 vs v2+ differences noted.
如何使用「npm / yarn / pnpm / bun 命令互转」?How do I use the npm ⇄ yarn ⇄ pnpm ⇄ bun Command Converter?
在输入框粘贴命令,下方四张卡片分别是 npm、yarn、pnpm、bun 的写法,点 📋 复制。Paste a command; the four cards show npm, yarn, pnpm and bun versions — press 📋 to copy.
npm ci 对应什么?What replaces npm ci?
pnpm install --frozen-lockfile、bun install --frozen-lockfile;Yarn v1 是 yarn install --frozen-lockfile,Yarn 2+ 是 yarn install --immutable。pnpm/bun install --frozen-lockfile; Yarn v1 yarn install --frozen-lockfile, Yarn 2+ yarn install --immutable.
npx 对应什么?What replaces npx?
pnpm 用 pnpm dlx,bun 用 bunx,Yarn 2+ 用 yarn dlx(Yarn v1 没有 dlx,可继续用 npx)。pnpm dlx, bunx, and yarn dlx on Yarn 2+ (Yarn v1 has none — keep using npx).
「npm / yarn / pnpm / bun 命令互转」免费吗?文件会上传吗?Is the npm ⇄ yarn ⇄ pnpm ⇄ bun Command Converter free? Are my files uploaded?
「npm / yarn / pnpm / bun 命令互转」完全免费,无需注册。你输入的内容只在本机浏览器里处理(部分设置会保存在本机方便下次使用),不会上传到任何服务器。The npm ⇄ yarn ⇄ pnpm ⇄ bun Command Converter is free with no sign-up. What you enter is processed only in this browser (some settings are kept locally for next time) and is never uploaded.