CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-npm-check-updates

Find newer versions of dependencies than what your package.json allows

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

cli-interface.mddocs/

CLI Interface

Command-line interface providing access to all npm-check-updates functionality through terminal commands. Supports comprehensive configuration options for dependency management.

Capabilities

Basic Commands

Primary command-line interface with multiple binary names.

# Full command name
npm-check-updates [options] [filter...]

# Short alias
ncu [options] [filter...]

Usage Examples:

# Check for updates
ncu

# Upgrade package.json
ncu -u

# Check specific packages
ncu express lodash

# Use filter patterns
ncu "react*" "@types/*"

Core Options

Essential options for basic upgrade operations.

--upgrade, -u                    # Overwrite package file with upgraded versions
--interactive, -i                # Enable interactive prompts for each dependency
--global, -g                     # Check global packages instead of local project
--packageFile <file>             # Package file location (default: ./package.json)
--packageManager <manager>       # npm, yarn, pnpm, deno, bun, staticRegistry

Usage Examples:

# Upgrade package.json
ncu --upgrade

# Interactive selection
ncu --interactive

# Global packages
ncu --global

# Specific package file
ncu --packageFile ./packages/core/package.json

# Use yarn
ncu --packageManager yarn

Version Targeting

Control which versions to upgrade to.

--target <target>                # latest, newest, greatest, minor, patch, semver, @tag
--peer                          # Check peer dependencies
--dep <dep>                     # Check specific dependency sections (prod, dev, optional, peer)

Usage Examples:

# Only minor updates
ncu --target minor

# Only patch updates  
ncu --target patch

# Specific npm tag
ncu --target @beta

# Only production dependencies
ncu --dep prod

# Multiple dependency types
ncu --dep prod,dev

Filtering Options

Control which packages to check and upgrade.

--filter <pattern>               # Include only package names matching pattern
--reject <pattern>               # Exclude package names matching pattern
--filterVersion <pattern>        # Include only versions matching pattern

Usage Examples:

# Include only React packages
ncu --filter "react*"

# Exclude dev tools
ncu --reject "eslint*,prettier"

# Complex regex pattern
ncu --filter "/^@myorg\//"

# Filter by version pattern
ncu --filterVersion "/^1\./"

Output Formatting

Control the display and format of upgrade information.

--format <format>                # table, group, ownerChanged, repo, time, lines
--color, --no-color              # Enable/disable colored output
--loglevel <level>               # silent, error, minimal, warn, info, verbose, silly
--json                          # Output upgrades as json
--jsonUpgraded                  # Output only upgraded dependencies as json

Usage Examples:

# Grouped output
ncu --format group

# No colors
ncu --no-color

# JSON output
ncu --json

# Only upgraded packages as JSON
ncu --jsonUpgraded

# Verbose logging
ncu --loglevel verbose

Advanced Features

Specialized functionality for complex upgrade scenarios.

--doctor                        # Iteratively install upgrades and run tests
--deep                         # Run recursively in current working directory
--workspaces                   # Check all workspaces
--workspace <workspace>        # Check specific workspace(s)
--timeout <ms>                 # Global timeout in milliseconds

Usage Examples:

# Doctor mode - test after each upgrade
ncu --doctor --upgrade

# Check all subdirectories
ncu --deep

# All workspaces
ncu --workspaces

# Specific workspace
ncu --workspace packages/core

# 30 second timeout
ncu --timeout 30000

Caching Options

Manage version caching for improved performance.

--cache                         # Cache versions to local cache file
--cacheFile <file>             # Filepath for cache file
--cacheClear                   # Clear cache before running

Usage Examples:

# Enable caching
ncu --cache

# Custom cache file
ncu --cacheFile ~/.ncu-cache-custom.json

# Clear cache first
ncu --cacheClear

Installation Options

Control automatic installation after upgrading.

--install <mode>               # always, never, prompt

Usage Examples:

# Always install after upgrade
ncu --upgrade --install always

# Never prompt for install
ncu --upgrade --install never

# Prompt in interactive mode
ncu --interactive --install prompt

Registry and Authentication

Configure package registry and authentication.

--registry <url>               # Third-party npm registry
--registryType <type>         # npm, yarn, pnpm

Usage Examples:

# Private registry
ncu --registry https://npm.company.com

# Use yarn registry config
ncu --registryType yarn

Error Handling

Control error reporting and exit codes.

--errorLevel <level>           # 1: exit with error on uncaught errors
                              # 2: exit with error if any packages can be upgraded
--retry <count>               # Number of times to retry failed network requests

Usage Examples:

# Exit with error if upgrades available
ncu --errorLevel 2

# Retry failed requests
ncu --retry 3

Help and Information

Get help and version information.

--help, -h                     # Display help
--version, -V                  # Output version number

Usage Examples:

# Show help
ncu --help

# Show version
ncu --version

Configuration Files

Support for configuration files to avoid repeating options.

# Configuration file support (.ncurc.js, .ncurc.json, .ncurc.yml)
--configFileName <filename>    # Config file name (default: .ncurc)
--configFilePath <path>       # Config file path
--mergeConfig                 # Merge config with CLI options

Usage Examples:

# Use custom config file
ncu --configFileName myconfig

# Specific config path
ncu --configFilePath /path/to/config.json

# Merge config with CLI options
ncu --mergeConfig --target minor

Install with Tessl CLI

npx tessl i tessl/npm-npm-check-updates

docs

cli-interface.md

configuration.md

index.md

package-managers.md

programmatic-api.md

types.md

tile.json