Useful npm shorthands

Rakesh Kumar Shaw
1 min readSep 15, 2021

Today I will inform about some npm CLI shorthand commands that we basically encounter in our daily development activities. Below are few shorthand npm CLIcommands

Install a package

## Longhand npm install package-name## shorthandnpm i package-name

Install a package globally

## Longhandnpm install --global package-name## shorthandnpm i -g package-name

Install a package as a dev dependency

## Longhandnpm install --save-dev package-name## shorthandnpm i -D package-name

Update a package

## Longhandnpm update package-name## shorthandnpm up package-name

Uninstall a package

## Longhandnpm uninstall package-name## shorthandnpm un package-name

Check for a node version

## Longhandnpm --version## shorthandnpm -v

Default package.json

## Longhandnpm init --yes## shorthandnpm init -y

Get help

## Longhandnpm help## shorthandnpm

Thanks a lot for reading this article. Hope it will of some gains to you all !

--

--