npm install -g package

Category: Node.js & npm/yarn

npm install -g package

Install a package globally so its command is available anywhere in your terminal

Installs a package globally on your machine so its CLI command is available in any directory. You won't find it in node_modules — it goes to a system-wide folder.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.