Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

npm-check-updates

$ ncu Community Low Risk
Raine Virta · Code & DevOps · Apache-2.0 · macos / linux / windows

npm-check-updates (ncu) inspects package.json dependencies against npm registries without modifying node_modules by default. Its --jsonUpgraded flag emits clean JSON diffs, while --doctor iteratively runs tests to isolate breaking upgrades automatically.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g npm-check-updates
CLI vs MCP Decision CLI Preferred vs MCP

ncu reads local package.json files, respects .npmrc registries, and can run --doctor against local test suites—workflows impractical via MCP.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Read-only by default, emits clean machine-readable --jsonUpgraded and --jsonAll, supports --no-color, and avoids interactive prompts unless -i is passed.

  • ncu --jsonUpgraded returns pure JSON key-value upgrade map
  • Default invocation performs zero file writes unless -u is explicitly passed
Trust & Safety 21 / 25

Safe read-only default behavior; -u only edits package.json, and --doctor rolls back breaking upgrades automatically using the project test script.

  • Read-only unless -u (--upgrade) is specified
  • --doctor bisects and reverts failing dependency upgrades
Setup & Portability 13 / 15

Available globally via npm or zero-install npx npm-check-updates on any machine with Node.js.

  • Run directly via npx npm-check-updates across macOS, Linux, and Windows
Utility & Efficiency 13 / 15

Solves bulk dependency auditing and targeted semver upgrades (--target minor, --filter) far faster than manual registry lookups.

  • Supports workspace (--workspaces) and semver-target filtering in one pass
Maintenance & Lineage 7 / 10

Long-running community project (raineorshine/npm-check-updates) under Apache-2.0 with consistent maintenance.

  • Established raineorshine/npm-check-updates repository
Docs & Verifiability 9 / 10

Thorough README option reference and clear --help output.

  • Complete CLI flags documented in README and --help

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Public registry checks require no auth; private registries inherit credentials from .npmrc.

Side Effects
Read-Only Local Write
Cost & Quotas

Apache-2.0 open-source CLI; free to use against npm and private registries.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# npm-check-updates (ncu) Agent Rules
- Always run `ncu --jsonUpgraded` (read-only) before passing `-u`.
- Prefer `--target minor` or `--doctor -u` when upgrading dependencies autonomously.

Agent-Ready Command Recipes

Safe Read-Only Queries

Check available upgrades as JSON
ncu --jsonUpgraded

Read-only check returning a JSON map of upgradable package names to target versions.

Check minor/patch updates only as JSON
ncu --target minor --jsonUpgraded

Filters out major breaking bumps and outputs safe minor/patch candidates in JSON.

Controlled Writes & Previews

Upgrade package.json only for non-breaking updates
ncu -u --target minor --jsonUpgraded

Writes minor/patch version updates into package.json without running npm install.

Strengths for Agents

  • + Read-only by default and supports --jsonUpgraded for clean JSON parsing.
  • + --doctor automates upgrade-test-rollback bisection for breaking dependencies.
  • + --target minor / --target patch and --filter constrain upgrade blast radius.

Caveats & Pitfalls

  • ! Requires Node.js runtime and network access to the configured npm registry.
  • ! Updating package.json with -u still requires a separate npm/pnpm/yarn install to refresh lockfiles.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI