GH-DISCUSSION-LIST(1)

πŸ’¬ gh-discussion-list β€” the GitHub CLI manual page, but make it cute πŸŽ€

okay so bestie, this is the manual page for gh-discussion-list, straight out of the GitHub CLI manual ✨. It's currently in preview, which is giving "we're still cooking, don't @ me" energy, but honestly it already slays. Sit down, grab a strawberry πŸ“, and let's go.


🌸 NAME 🌸

gh-discussion-list β€” lists discussions in a repository πŸ’… (preview, bestie β€” it's new new)


✨ SYNOPSIS ✨

gh discussion list [flags]

that's it. that's the whole vibe. flags are optional but they're where the fun lives πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

So like β€” this lists the discussions in a GitHub repository. And by default, only open discussions are shown. Not closed ones. Not all of them. Just the open ones, bestie. If you want the closed ones you gotta ask nicely with a flag, okay? 😭 Lowkey iconic default behavior, no cap.


πŸ‘‘ OPTIONS πŸ‘‘

here's the whole flag family, every single one, no gatekeeping 🫢

  • --after <string> β€” the cursor for the next page of results. it's giving "pagination but make it a string" ✨
  • --answered β€” filter by answered state. yep, that's the whole thing πŸ’€
  • -A, --author <string> β€” filter by author. only discussions from that person, main character energy πŸ‘‘
  • -c, --category <string> β€” filter by category name or slug. either works, she's flexible 🌸
  • -q, --jq <expression> β€” filter the JSON output using a jq expression. chef's kiss for the data girlies πŸ”₯
  • --json <fields> β€” output JSON with the specified fields. choose your own adventure ✨
  • -l, --label <strings> β€” filter by label. plurals everywhere, we love to see it πŸŽ€
  • -L, --limit <int> (default 30) β€” maximum number of discussions to fetch. thirty. that's the default. respect it πŸ’…
  • --order <string> (default "desc") β€” order of results: {asc|desc}. descending by default, we're going down bestie πŸ¦‹
  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. go visit someone else's repo, respectfully πŸ™ˆ
  • -S, --search <query> β€” search discussions with a query. detective mode πŸ”
  • --sort <string> (default "updated") β€” sort by field: {created|updated}. updated is the default, so fresh-to-death first ⭐
  • -s, --state <string> (default "open") β€” filter by state: {open|closed|all}. defaults to open, remember? told you 😌
  • -t, --template <string> β€” format JSON output using a Go template; see gh help formatting. fancy formatting era πŸŽ€
  • -w, --web β€” list discussions in the web browser. bye, going to the browser 🌈

πŸ¦‹ ALIASES πŸ¦‹

gh discussion ls

yes, ls works too. because of course it does. iykyk πŸ’œ


🌟 JSON FIELDS 🌟

these are the fields you can request with --json, all of them, copy-paste ready:

answerChosenAt, answerChosenBy, answered, author, body, category,
closed, closedAt, createdAt, id, labels, locked, number, stateReason,
title, updatedAt, url

look at that lineup. answerChosenAt? stateReason? absolutely ate πŸ”₯


πŸ’€ EXIT CODES πŸ’€

  • 0 β€” successful execution. slay πŸ’…
  • 1 β€” error. it's giving oops 😭
  • 2 β€” command canceled. you changed your mind, that's valid 🫢
  • 4 β€” authentication required. log in bestie, we can't get in like that πŸ™ˆ
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. so like, don't come for me if there's a 5 somewhere, check the command's own help fr fr πŸ’–

πŸ“ EXAMPLE πŸ“

real commands, real copy-paste energy, exactly as written:

# List open discussions
$ gh discussion list

# List discussions with a specific category
$ gh discussion list --category General

# List closed discussions by author
$ gh discussion list --state closed --author monalisa

# List all discussions (closed or open) by label
$ gh discussion list --state all --label bug,enhancement

# List answered Q&A discussions as JSON
$ gh discussion list --answered --json number,title,url

# List unanswered Q&A discussions as JSON
$ gh discussion list --answered=false --json number,title,url

the --answered=false one is so underrated btw. unanswered Q&A hunting era 🌸


🧚 SEE ALSO 🧚


and that's the page!! you made it, bestie 🌈 this was GitHub CLI v2.102.0, dated Oct 2026 β€” mwah, love that for us, go list some discussions πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from