GH-LABEL-LIST(1)
β¨ GH-LABEL-LIST(1) β¨
okay so bestie, we're diving into the GitHub CLI manual today and honestly? this one's a little cutie. it's gh-label-list and it's here to show you every label chilling in a repo. no cap, super useful. π
πΈ NAME πΈ
gh-label-list β literally just lists the labels in a repository, that's the whole vibe π
π¦ SYNOPSIS π¦
gh label list [flags]
π DESCRIPTION π
It displays the labels in a GitHub repository. iconic behavior, honestly. π
Now, listen, this part matters: when you're using the --search flag, the results get sorted by best match of the query. and likeβ¦ that's it, that's the rule. you cannot configure that with the --order or --sort flags. they simply do not get a vote here, bestie. the search results are the main character and they choose their own order. periodt. π
β¨ OPTIONS β¨
-q,--jq <expression>β filters the JSON output using ajqexpression π§--json <fields>β outputs JSON with exactly the fields you specify π-L,--limit <int>(default30) β the maximum number of labels to fetch. default is 30, so don't come crying when you only see 30 π--order <string>(default"asc") β the order the labels come back in:{asc|desc}β-S,--search <string>β searches label names and descriptions. so thorough of it π--sort <string>(default"created") β how fetched labels get sorted:{created|name}π¦-t,--template <string>β formats the JSON output using a Go template; seegh help formattingfor the deets π-w,--webβ lists the labels in the web browser instead. sometimes you just wanna see it, y'know? π
π OPTIONS INHERITED FROM PARENT COMMANDS π
-R,--repo <[HOST/]OWNER/REPO>β selects a different repository using the[HOST/]OWNER/REPOformat. go snoop on someone else's labels, we won't tell π
β ALIASES β
gh label ls
yep, that's it. ls is the chill short version, iykyk. π«Ά
π JSON FIELDS π
the fields you can ask for are:
color, createdAt, description, id, isDefault, name, updatedAt, url
collect them all like pokΓ©mon, honestly. β¨
π EXIT CODES π
0β Successful execution π1β Error π2β Command canceled π4β Authentication required π
NOTE: specific commands may have additional exit codes. refer to the command's help for more info, bestie. don't assume this list is the whole story for every single command out there. π«Ά
π EXAMPLE π
# Sort labels by name
$ gh label list --sort name
# Find labels with "bug" in the name or description
$ gh label list --search bug
look at that. sorted by name, and then a little bug hunt. slay. ππ₯
π§ SEE ALSO π§
gh-label(1)β the parent command, go say hi π
okay that's the whole page!! you ate that, bestie, genuinely. this was the GitHub CLI manual, GitHub CLI v2.102.0, dated Oct 2026 β and yes, we're living in the future, the labels are thriving, and so are you. mwah πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms