LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gh-label

manage issue and PR labels

TLDR

List labels in the current repository
$ gh label list
copy
List labels with a search query
$ gh label list --search "[bug]"
copy
Create a label with color and description
$ gh label create [name] -c [color] -d "[description]"
copy
Edit a label's name
$ gh label edit [name] --name [new_name]
copy
Edit a label's color and description
$ gh label edit [name] -c [ff0000] -d "[new description]"
copy
Delete a label (with confirmation)
$ gh label delete [name]
copy
Clone labels from another repository
$ gh label clone [owner/repo]
copy
Force-clone labels, overwriting existing ones
$ gh label clone [owner/repo] --force
copy

SYNOPSIS

gh label command [options]

DESCRIPTION

gh label manages repository labels used for categorizing and filtering issues and pull requests. Labels provide visual organization with customizable colors and descriptions, helping teams triage work and track issue types.Common label patterns include bug/feature categorization, priority levels, status indicators, and area tags. The clone command copies an entire label scheme from another repository, useful for maintaining consistency across projects or setting up new repositories.

PARAMETERS

-c, --color color

Label color as hex value (without the # prefix).
-d, --description text
Label description text.
--name name
New label name (used with edit).
--force
Overwrite existing labels when cloning.
--search query
Filter labels by search query.
-L, --limit int
Maximum number of labels to list (default 30).
--sort field
Sort by: created, name (default: created).
--order direction
Order: asc, desc (default: asc).
-w, --web
Open the labels page in the web browser.
-R, --repo owner/repo
Select a different repository.

SUBCOMMANDS

list

List labels in the repository.
create
Create a new label.
edit
Edit an existing label.
delete
Delete a label.
clone
Clone labels from another repository.

SEE ALSO

gh(1), gh-issue(1), gh-pr(1)

Copied to clipboard
Kai