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.
Install it in your project
섹션 제목: “Install it in your project”Run the install command of your package manager in the root of the project:
npm install --save-dev @all-contributors/clipnpm add --save-dev @all-contributors/cliyarn add --dev @all-contributors/cliArch Linux users can install the @all-contributors/cli package from the AUR instead.
Run the command
섹션 제목: “Run the command”Once the package is installed, run the all-contributors command through your package manager so that it finds the local copy:
npx all-contributors --helppnpm all-contributors --helpyarn all-contributors --helpYou 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.
Run it without installing it
섹션 제목: “Run it without installing it”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 initpnpm dlx @all-contributors/cli inityarn dlx @all-contributors/cli initAdd shortcuts to your scripts
섹션 제목: “Add shortcuts to your scripts”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.
Next steps
섹션 제목: “Next steps”- 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.
