Install Peers CLI

2.2.0 · active · verified Wed Apr 22

install-peers-cli is a command-line interface (CLI) tool designed to manage and install a project's `peerDependencies` without unintended side effects. Currently at stable version 2.2.0, it supports both `npm` and `yarn` package managers, including `yarn workspaces`. A key differentiator is its "pure" approach: it installs peer dependencies without modifying the project's `package.json` file or updating lock files (like `package-lock.json` or `yarn.lock`). This ensures a clean development environment and predictable dependency resolution, allowing developers to manage peer dependencies manually or through CI/CD pipelines without altering the project's core dependency manifests. The release cadence appears irregular, driven by contributions and specific feature needs, rather than a fixed schedule.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to add `install-peers-cli` as a development dependency and use a `package.json` script to install declared `peerDependencies`.

{
  "name": "my-project",
  "version": "1.0.0",
  "peerDependencies": {
    "react": ">=16.8.0",
    "react-dom": ">=16.8.0"
  },
  "scripts": {
    "install-peers": "install-peers"
  },
  "devDependencies": {
    "install-peers-cli": "^2.2.0"
  }
}

// Install the CLI tool as a devDependency
$ npm install --save-dev install-peers-cli

// Then, run the script to install peer dependencies
$ npm run install-peers
// or using yarn
$ yarn add --dev install-peers-cli
$ yarn install-peers

view raw JSON →