npm, yarn, pnpm, bun: one command, four spellings
You opened a README and it says `pnpm install`. Your project uses npm. You start guessing: is it `npm install`? `npm i`? With `-D` or `--save-dev`? The same problem the other way around, you wrote a tutorial for npm and a reader on bun asks "what does this look like for me".
This translator does the boring part. Pick the source manager, type the command you know (`npm install --save-dev typescript`, `yarn add react`, `pnpm dlx create-next-app`...), and you get the exact equivalents for all 4 package managers in one row. Verbs, flags, package names, all mapped.
It's a pure dictionary, no command ever runs in your browser, no requests leave the page. Open DevTools and check. Useful when you migrate from yarn to pnpm, when you maintain docs in multiple flavors, or just when you want to remember "how do you uninstall in bun".
How to use it
- Pick the source manager in the segmented bar at the top: npm, yarn, pnpm or bun. This tells the translator what spelling your command is written in.
- Type the command in the input. Full form (`npm install --save-dev typescript`) or a short alias (`npm i -D typescript`). The leading manager name is optional, `add react` works the same as `yarn add react`.
- The translator detects the verb (install, add, remove, run, dlx, init, audit, update, outdated) and preserves the package name plus all flags in the right syntax for each target.
- Read the 4-row output below: each row is one manager (npm / yarn / pnpm / bun) with the equivalent command. Click copy on a row to grab it to clipboard.
- For one-off binary runs (the `npx`/`yarn dlx`/`pnpm dlx`/`bunx` family), type `npx create-next-app` and you get `yarn dlx create-next-app`, `pnpm dlx create-next-app`, `bunx create-next-app`.
- Scroll down to the quick reference table: the 11 most common actions side by side, scannable when you only need a reminder.
- Nothing runs, this is a pure text translator. To actually execute the command, paste it into your terminal.
When this is useful
Six typical situations where the translator saves you a tab in StackOverflow:
- Migrating a project from one manager to another. You're moving a yarn classic project to pnpm because pnpm's hard links save 5 GB of `node_modules`. Every `yarn install`, `yarn add`, `yarn dev` in your README, CI, scripts and team's muscle memory needs a counterpart. Paste them in batch and rewrite the docs in one sitting.
- Following a tutorial written for a different manager. The Next.js docs say `npx create-next-app`. You use bun. You type `npx create-next-app` in the translator and copy `bunx create-next-app` straight to your terminal. No guessing.
- Maintaining open-source docs that target multiple managers. Your library README needs `npm install` and `yarn add` and `pnpm add` and `bun add` side by side. The translator gives you all 4 in one row, copy them into your docs and stay consistent.
- Onboarding a new developer who knows yarn but joined an npm shop. You point them to the translator. Within a day they have a mental conversion table for the 10 commands they actually use.
- Cross-team scripts in a monorepo. Frontend uses pnpm, backend uses npm, infra scripts use yarn. The translator helps you write a one-liner that all 3 teams can read.
- Writing a blog post or Stack Overflow answer. You write the command in your preferred manager, then paste the quick reference table under it so every reader can find their flavor without complaining in the comments.
For the manager itself, see also the unit converter style tools, this one is the same idea applied to JavaScript package managers.