Forrest logo
back to the gh tool

gh-label:tldr:f17f1

gh-label: Create a label with a specific name, description and color in hexadecimal format for the repository in the current directory.
$ gh label create ${name} --description "${description}" --color ${color_hex}
try on your machine

This command is used to create a new label on a GitHub repository using the GitHub CLI (Command Line Interface). Here is an explanation of the different parts of the command:

  • gh label create: This is the main command that instructs the GitHub CLI to create a new label.
  • ${name}: This is a placeholder for the name of the label. You need to replace ${name} with an actual name surrounded by double quotes.
  • --description "${description}": This flag sets the description of the label. Replace ${description} with the desired description inside double quotes.
  • --color ${color_hex}: This flag sets the color of the label. Replace ${color_hex} with the hexadecimal code for the desired color (e.g., #FF0000 for red).

By executing this command with the appropriate values for name, description, and color_hex, a new label will be created on the specified GitHub repository with the given attributes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gh tool