Installation

You can install npm-check-updates globally to use the ncu command, or run it directly with npx.

Global Install

To have the ncu command available in your terminal, install it globally using npm:

npm install -g npm-check-updates

This will make both npm-check-updates and its shorter alias ncu available.

NPX

You can run npm-check-updates without a global installation using npx. Note that only the long form is supported with npx.

npx npm-check-updates

Docker

You can also use npm-check-updates within a Docker container. This is useful for isolated environments or CI/CD pipelines.

Build the Docker Image

From the root of a cloned npm-check-updates repository, build the image:

docker build -t npm-check-updates .

Run Against a Project

Mount your project's directory to the /app volume in the container to run ncu against it.

# Check for updates
docker run -it -v /path/to/your/project:/app npm-check-updates

# Pass any ncu command-line arguments after the image name
docker run -it -v /path/to/your/project:/app npm-check-updates -u --format group