GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • All Contributors
  • GitHub
  • App
  • CLI
  • Configuration
  • Project
  • Installation
  • Quick start
  • Add contributors
  • Check contributors
  • Commit automatically
  • Authenticate
  • Commands

This view

  • Original page
  • New address

GeezerVison is showing allcontributors.org — Commands

Commands

The CLI installs one executable, all-contributors, and it takes a command as its first argument. This page lists the commands and the flags they share. The examples write all-contributors and leave out the prefix that your package manager needs, such as npx or pnpm, which Install the CLI explains.

If you run all-contributors without a command, it shows a menu with add, generate and check. The init command is only available when you name it.

Commands

Section titled “Commands”

all-contributors init

Section titled “all-contributors init”

Prepares a project to use the CLI. It asks a series of questions, then creates .all-contributorsrc in the current directory with your answers. It also creates the file for the contributors if it doesn’t exist, adds a contributors section with markers to it, and adds a badge to the badge file when you asked for one. The command reads your origin remote to suggest the repository name and owner, so it fails in a directory without one.

If the file already has a second-level heading called “Contributors”, the CLI adds the markers below that heading. Otherwise it appends a “Contributors” section at the end of the file.

all-contributors add

Section titled “all-contributors add”
Terminal window
all-contributors add <username> <contributions>

Adds a contributor, or changes the contributions of someone who is already listed, and then regenerates the files. contributions is a comma-separated list of the keywords from the emoji key. If you leave out the username or the contributions, the command asks for them. The behaviour for existing contributors is described in Add contributors.

Flag Description
--url <address> Makes the contributions you add link to this address.
--commit Commits the changed files, as the commit option does.

all-contributors generate

Section titled “all-contributors generate”
Terminal window
all-contributors generate

Reads the contributors list from .all-contributorsrc and rewrites the table and the badge between their markers in every file listed under files. A file without a pair of markers keeps that part unchanged, and the command doesn’t report it. A file in the files list that doesn’t exist makes the command fail.

all-contributors check

Section titled “all-contributors check”
Terminal window
all-contributors check

Compares the contributors of the repository on the host with the contributors in .all-contributorsrc and prints the differences. Check for missing contributors explains the output.

Flags for every command

Section titled “Flags for every command”
Flag Alias Description Default
--config <path> -c The path of the configuration file. .all-contributorsrc in the current directory
--contributorsSortAlphabetically Sorts the generated table by name. false
--help -h Prints the help.
--version -v Prints the version.

Configuration file

Section titled “Configuration file”

The CLI reads .all-contributorsrc from the current directory, and --config points it to a file elsewhere. The configuration file must be JSON. If the default file doesn’t exist, the CLI starts without it, which is what init relies on, but a file you name with --config must exist. When the file contains small JSON errors, such as a trailing comma, the CLI fixes them and saves the corrected file.

The configuration options lists every setting.

Tip

Flags on the command line override the same settings in the configuration file. This allows you to override options one-off, such as --contributorsSortAlphabetically or --commit, for a single run.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.