GH-DISCUSSION(1)

πŸ’¬ gh-discussion β€” bestie's guide to GitHub Discussions (preview!!)

okay so this is gh-discussion from the GitHub CLI manual, and yes it is in preview so like… behave accordingly πŸ’…

gh discussion <command> [flags]

🌸 DESCRIPTION 🌸

Working with discussions in the GitHub CLI is in preview and subject to change without notice. no cap β€” that means it could shift under your feet at any moment, so don't come for me if the flags ghost you later πŸ™ˆ


🫢 GENERAL COMMANDS 🫢

  • gh-discussion-create(1) β€” Create a new discussion (preview) ✨ like literally bringing a whole conversation into existence, main character energy
  • gh-discussion-list(1) β€” List discussions in a repository (preview) πŸŽ€ the vibe check of "what's everyone talking about in here"

🎯 TARGETED COMMANDS 🎯

  • gh-discussion-comment(1) β€” Add, edit, or delete a comment or a reply on a discussion (preview) πŸ’¬ yeah you can add, edit, and delete β€” three moods, one command
  • gh-discussion-edit(1) β€” Edit a discussion (preview) ✏️ glow-up time
  • gh-discussion-view(1) β€” View a discussion (preview) πŸ¦‹ just vibing and reading, no notes

⭐ OPTIONS ⭐

  • -R, --repo <[HOST/]OWNER/REPO> β€” Select another repository using the [HOST/]OWNER/REPO format πŸ‘‘ notice the format stays exactly like that, square brackets and slashes included, don't get creative

πŸ’€ EXIT CODES πŸ’€

  • 0: Successful execution β€” slay, you ate πŸŽ‰
  • 1: Error β€” it's giving "something went wrong" 😭
  • 2: Command canceled β€” you hit Ctrl+C or otherwise bailed, no judgement 🫢
  • 4: Authentication required β€” you gotta log in first, bestie πŸ”‘
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. iykyk β€” always check the specific command's own help

🌈 EXAMPLE 🌈

$ gh discussion list
$ gh discussion create --category "General" --title "Hello" --body "Hello World!"
$ gh discussion view 123

literally just list 'em, create one with a --category of "General" and a --title of "Hello" and a --body of "Hello World!", then view number 123. iconic πŸ“


πŸ‘€ SEE ALSO πŸ‘€

  • gh(1) β€” the parent, the blueprint, the icon πŸ’œ

that's the whole page, bestie! brought to you by GitHub CLI v2.102.0, dated Oct 2026 🌸 go forth and discuss πŸ’…βœ¨

πŸ“¦ where this page comes from