Skip to main content

npm/Yarn/pnpm Cheatsheet

New

Common commands for npm, Yarn, and pnpm side by side — install, scripts, workspaces, and more.

npmyarnpnpmreferencecheatsheet
Read the guide
Shortcuts:⌘ KSearch
0 workflows

Frequently Asked Questions

Does this compare npm, Yarn, and pnpm side by side?

Yes. Every workflow card renders three separate command blocks so you can compare the npm, Yarn, and pnpm version of the same task at a glance.

What is the difference between compact and full syntax on this page?

Compact mode shows a concrete example like npm install pkg. Full mode swaps that for placeholder-style commands such as npm install <package>.

Does it include CI-safe install commands from a lockfile?

Yes. The Security & Flags area includes npm ci, yarn install --immutable, and pnpm install --frozen-lockfile for lockfile-enforced installs.

Can I use it for monorepo workspace commands?

Yes. It has separate workspace entries for adding a dependency to one package, running a script in all workspaces, and running a script in just one workspace.

If I press Copy npm or Copy pnpm, what exactly gets copied?

It copies the currently displayed command for that package manager on that card. So the copied text changes with both the selected workflow and the compact/full toggle state.

Related Tools