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 a jq expression 🧚
  • --json <fields> β€” outputs JSON with exactly the fields you specify 🌈
  • -L, --limit <int> (default 30) β€” 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; see gh help formatting for 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/REPO format. 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