Compare npm packages side-by-side
compare_packagesCompare 2-5 candidate packages for the same job (e.g. "axios vs got vs node-fetch") side by side and get a deterministic pick. More than 5 names is rejected, never truncated; duplicate names are rejected. Use search_packages first if you have no shortlist.
Per candidate: downloads and trend, popularity/maintenance tiers, GitHub stars, TypeScript support, license, deprecation, latest-version vulnerabilities, a tarball-free installScriptRisk (scores preinstall/install/postinstall; a prepare-only package scores 0 since prepare never runs on install — use analyze_install_script for the deep scan), and installSize (own size plus a transitive rollup up to depth 2 / 60 nodes; truncated/sizeUnknownCount mark a partial sum).
differentiators names who stands out on each dimension. recommendation.pick comes from a weighted score (popularity, maintenance, deprecation, vulnerabilities, typosquat flag, install-script risk, TypeScript, stars; size is reported, not scored) — never a deprecated or typosquat-flagged candidate — with a rationale and a confidence from how close the top two scored.
Before trusting the result: vulnerabilityCheckFailed: true means the safe/not-safe answer is unknown, not clean; a name that cannot be resolved stays in candidates with found: false and resolutionError.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | 2-5 exact npm package names to compare, e.g. ["axios", "got", "node-fetch"]. More than 5 is rejected with an error, not truncated. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| candidates | Yes | ||
| recommendation | Yes | ||
| differentiators | Yes |