Skip to content

Install the CLI

The CLI is distributed on npm as all-contributors-cli, and the command it installs is called all-contributors. It needs Node.js 22.22.0 or later. Because you use it as part of your project’s workflow, you normally install it as a development dependency of that project.

Run the install command of your package manager in the root of the project:

npm install --save-dev all-contributors-cli

Arch Linux users can install the all-contributors-cli package from the AUR instead.

Once the package is installed, run the all-contributors command through your package manager so that it finds the local copy:

npx all-contributors --help

You can also call the executable directly with ./node_modules/.bin/all-contributors. The rest of this documentation writes all-contributors for the command, and you add the prefix that matches your setup.

To try the CLI or to run it once, use the full package name. The name matters, because the all-contributors package on npm is a different package that isn’t this CLI:

npx all-contributors-cli init

If you add contributors often, shortcuts in the scripts field of your package.json save typing:

{
"scripts": {
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate"
}
}

With those entries you run npm run contributors:add -- jane doc or pnpm contributors:add jane doc. With npm the -- is needed so that the arguments reach the command and not npm itself.

  • Quick start prepares a project and adds a first contributor.
  • If your project doesn’t use Node.js and you would rather not add it as a dependency, the app works from comments on GitHub and needs nothing installed.