pare-npm
v0.24.2Pare npm ג€” Structured npm/pnpm operations (install, audit, outdated, list, run) as typed JSON.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
install Install Packages
Runs npm/pnpm/yarn install and returns available package counts and vulnerability information. Set pnpmReporter to 'silent' for quiet pnpm output; package statistics are omitted in this mode. Auto-detects package manager via lock files (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). Lifecycle scripts (preinstall/postinstall) are skipped by default for safety. Set ignoreScripts to false if packages need postinstall scripts to work (e.g., esbuild, sharp).
| Parameter | Type | Description |
|---|---|---|
args | array | Additional arguments (e.g., package names to install) |
dryRun | boolean | Preview what would be installed without actually installing (maps to --dry-run) |
exact | boolean | Save exact versions instead of semver ranges (maps to --save-exact / -E) |
filter | string | pnpm workspace filter pattern (e.g., '@scope/pkg', './packages/foo'). Only used with pnpm. |
force | boolean | Force reinstallation of all packages (maps to --force) |
frozenLockfile | boolean | Fail if lockfile needs updating — for CI workflows (maps to --frozen-lockfile for pnpm/yarn, --ci for npm) |
global | boolean | Install packages globally (maps to --global / -g). Use with caution — may require elevated permissions. |
ignoreScripts | boolean | Skip lifecycle scripts (preinstall/postinstall). Defaults to true for safety. Set to false if packages need postinstall scripts to run (e.g., esbuild, sharp). |
legacyPeerDeps | boolean | Ignore peer dependency conflicts (maps to --legacy-peer-deps, npm only) |
noAudit | boolean | Skip the automatic audit step to speed up installation. Only npm runs an audit during install, so this maps to --no-audit on npm. On pnpm and yarn it is a silent no-op (audit is a separate command, no… |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
path | string | Project root path |
pnpmReporter | string | pnpm-only reporter (maps to --reporter=silent). Omits package counts and other output-derived statistics. Rejected for npm/yarn. |
production | boolean | Install only production dependencies (maps to --omit=dev for npm, --prod for pnpm, --production for yarn) |
registry | string | Registry URL to install from (maps to --registry, e.g., 'https://npm.pkg.github.com') |
saveDev | boolean | Install as dev dependency (maps to --save-dev / -D) |
audit Audit Dependencies
Runs npm/pnpm/yarn audit and returns structured vulnerability data. Auto-detects package manager via lock files (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm).
| Parameter | Type | Description |
|---|---|---|
args | array | Escape-hatch for PM-specific flags not modeled in the schema |
fix | boolean | When true, run `npm audit fix` (or `pnpm audit --fix`) to automatically fix vulnerabilities. Returns counts of fixed and remaining vulnerabilities. |
level | string | Minimum severity level to report (maps to --audit-level for npm/pnpm) |
omit | array | Dependency groups to omit from the audit (maps to --omit for npm, e.g. ['dev', 'optional']) |
packageLockOnly | boolean | Audit from lockfile without requiring node_modules (maps to --package-lock-only for npm) |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
path | string | Project root path |
production | boolean | Audit only production (runtime) dependencies (maps to --production for npm, --prod for pnpm, --groups=dependencies for yarn) |
workspace | string | Workspace to audit (maps to --workspace for npm) |
outdated Outdated Packages
Checks for outdated packages and returns structured update information. Auto-detects package manager via lock files (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm).
| Parameter | Type | Description |
|---|---|---|
all | boolean | Show all nested outdated dependencies (maps to --all for npm) |
args | array | Escape-hatch for PM-specific flags not modeled in the schema |
compatible | boolean | Show only semver-compatible updates (maps to --compatible for pnpm) |
devOnly | boolean | Check only dev dependencies (maps to --dev for pnpm) |
filter | string | pnpm workspace filter pattern (e.g., '@scope/pkg', './packages/foo'). Only used with pnpm. |
long | boolean | Show extended info such as homepage and repository URLs (maps to --long for npm/pnpm) |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
packages | array | Specific package names to check for updates |
path | string | Project root path |
production | boolean | Check only production dependencies (maps to --omit=dev for npm, --prod for pnpm) |
workspace | string | Workspace to check (maps to --workspace for npm) |
list List Packages
Lists installed packages as structured dependency data. Auto-detects package manager via lock files (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm).
| Parameter | Type | Description |
|---|---|---|
all | boolean | Show complete dependency tree (maps to --all for npm) |
args | array | Escape-hatch for PM-specific flags not modeled in the schema |
compact | boolean | Prefer compact output |
depth | number | Dependency tree depth (default: 0, top-level only) |
filter | string | pnpm workspace filter pattern (e.g., '@scope/pkg', './packages/foo'). Only used with pnpm. |
global | boolean | List globally installed packages (maps to --global) |
long | boolean | Show extended info such as description and homepage (maps to --long) |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
packages | array | Specific package names to check if installed and at what version |
path | string | Project root path |
production | boolean | Show only production dependencies (maps to --omit=dev for npm, --prod for pnpm) |
workspace | string | Workspace to list packages for (maps to --workspace for npm) |
run Run Script
Runs a package.json script via `npm run <script>`, `pnpm run <script>`, or `yarn run <script>` and returns structured output with exit code, stdout, stderr, and duration. Auto-detects package manager via lock files (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm).
| Parameter | Type | Description |
|---|---|---|
script * | string | The package.json script name to run |
args | array | Additional arguments passed after -- to the script |
filter | string | pnpm workspace filter pattern (e.g., '@scope/pkg', './packages/foo'). Only used with pnpm. |
ifPresent | boolean | Don't error if the script is missing — useful in heterogeneous monorepos (maps to --if-present) |
ignoreScripts | boolean | Skip pre/post lifecycle hooks (maps to --ignore-scripts) |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
parallel | boolean | Run workspace scripts in parallel (maps to --parallel for pnpm) |
path | string | Project root path |
recursive | boolean | Run script in all workspace packages (maps to --recursive for pnpm, --workspaces for npm) |
scriptShell | string | Override the shell used to run scripts (maps to --script-shell) |
silent | boolean | Strip npm/pnpm log chrome from output (maps to --silent) |
stream | boolean | Stream output with package name prefixes (maps to --stream for pnpm) |
workspace | Workspace target(s) — maps to npm --workspace or pnpm --filter for unified workspace targeting |
test Run Tests
Runs `npm test`, `pnpm test`, or `yarn test` and returns structured output with exit code, stdout, stderr, and duration. Auto-detects package manager via lock files (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). Shorthand for running the test script defined in package.json. Automatically parses test framework output (jest, vitest, mocha, tap) to extract pass/fail/skip counts.
| Parameter | Type | Description |
|---|---|---|
args | array | Additional arguments passed after -- to the test script |
filter | string | pnpm workspace filter pattern (e.g., '@scope/pkg', './packages/foo'). Only used with pnpm. |
ifPresent | boolean | Don't error if the test script is missing — useful in heterogeneous monorepos (maps to --if-present) |
ignoreScripts | boolean | Skip pretest/posttest lifecycle hooks (maps to --ignore-scripts) |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
parallel | boolean | Run workspace tests in parallel (maps to --parallel for pnpm) |
path | string | Project root path |
recursive | boolean | Run tests in all workspace packages (maps to --recursive for pnpm, --workspaces for npm) |
silent | boolean | Strip npm/pnpm log chrome for cleaner output (maps to --silent) |
stream | boolean | Stream output with package name prefixes (maps to --stream for pnpm) |
workspace | Workspace target(s) — maps to npm --workspace or pnpm --filter for unified workspace targeting |
init Init Package
Initializes a new package.json in the target directory. Works with npm, pnpm, and yarn. Returns structured output with the package name, version, and path.
| Parameter | Type | Description |
|---|---|---|
authorEmail | string | Set author email (maps to --init-author-email) |
authorName | string | Set author name (maps to --init-author-name) |
authorUrl | string | Set author URL (maps to --init-author-url) |
force | boolean | Overwrite existing package.json (maps to --force) |
license | string | Set the license field at init time (maps to --init-license) |
module | string | Set default module entry point (maps to --init-module) |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
path | string | Directory to initialize |
private | boolean | Set private: true in package.json (maps to yarn --private) |
scope | string | npm scope for the package (e.g., '@myorg') |
version | string | Override default version '1.0.0' (maps to --init-version) |
workspace | string | Create a workspace package (maps to npm --workspace) |
yes | boolean | Use -y flag for non-interactive init with defaults (default: true) |
info Package Info
Shows detailed package metadata from the npm registry. Works with npm, pnpm, and yarn (all query the same registry).
| Parameter | Type | Description |
|---|---|---|
package * | string | Package name to look up (e.g. 'express', 'lodash@4.17.21') |
compact | boolean | Prefer compact output |
field | string | Query a single field (e.g., 'engines', 'peerDependencies', 'versions') |
packageManager | string | Package manager to use. Auto-detected from lock files if not specified (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm). |
path | string | Project root path |
registry | string | Registry URL to query (maps to --registry, e.g., 'https://npm.pkg.github.com') |
workspace | string | Workspace for scoped queries (maps to --workspace for npm) |
search Search npm Registry
Searches the npm registry for packages matching a query. Note: pnpm and yarn do not have a search command, so this always uses npm.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query string |
compact | boolean | Prefer compact output |
exclude | string | Exclude packages matching this text from results (maps to --searchexclude) |
limit | number | Maximum number of results to return (default: 20) |
path | string | Project root path |
preferOnline | boolean | Bypass cache and fetch fresh results from the registry (maps to --prefer-online) |
registry | string | Registry URL to search (maps to --registry, e.g., 'https://npm.pkg.github.com') |
searchopts | string | Advanced search filtering options (maps to --searchopts) |
nvm Node Version Manager
Manages Node.js versions via nvm. Supports listing installed versions, showing the current version, listing remote versions, and executing commands with a specific Node.js version. Supports both Unix nvm and nvm-windows. SECURITY: The 'exec' action runs arbitrary commands under a specific Node version. Use PARE_NPM_ALLOWED_COMMANDS or PARE_ALLOWED_COMMANDS to restrict which commands can be executed.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action: 'list' shows installed versions, 'current' shows active version, 'ls-remote' lists available remote versions, 'exec' runs a command with a specific Node version, 'version' resolves a version a… |
args | array | Arguments for the command in 'exec' action |
command | string | Command to run for 'exec' action (e.g., 'node', 'npm') |
majorVersions | integer | For 'ls-remote': limit to last N major Node.js versions (default: 4). Reduces output size significantly. |
path | string | Working directory for .nvmrc detection |
version | string | Node.js version for 'exec' action (e.g., '20', '20.11.1', 'lts/iron') |