GH-DISCUSSION-CREATE(1)
π¬ gh-discussion-create β the GitHub CLI manual, bestie edition β¨
okay so real talk, this page is from the GitHub CLI manual, and it's all about gh-discussion-create β the lil command that spins up a brand new discussion. it's still in preview btw, so don't come for me if things shift π
β¨ SYNOPSIS β¨
gh discussion create [flags]
like, that's it. that's the whole vibe. flags optional-ish (we'll get to that π).
π¦ DESCRIPTION π¦
So gh discussion create makes a new GitHub Discussion in a repository. slay.
Here's the tea tho β there are two whole modes and you gotta pick your fighter:
- non-interactive mode π
β if you pass
--title,--body(or--body-file), and--category, the discussion just gets created, no questions asked. iconic, efficient, main character behavior. - interactive mode π β the second you leave any of those flags out, you get hit with interactive prompts β but only when you're connected to a terminal, iykyk.
fr fr: all three of those flags together = no prompts. miss even one = prompts (if you're in a terminal). no cap.
πΈ OPTIONS πΈ
-b,--body <string>β the actual body text of your discussion. the words. the content. the moment π-F,--body-file <string>β read the body from a file instead. and yes bestie,"-"means read it from stdin π«Ά-c,--category <string>β the category for the discussion, by name or by slug-l,--label <strings>β labels to slap on the discussion (plural, so you can stack 'em like stickers on a laptop β)-R,--repo <[HOST/]OWNER/REPO>β point at a different repo using the[HOST/]OWNER/REPOformat π¦-t,--title <string>β the title of your discussion. make it good, make it clickbait-adjacent π
π EXIT CODES π
these are the numbers it throws at you when it's done (or not):
0β successful execution π everything ate, no crumbs1β error π2β command canceled π4β authentication required π (go log in bestie)
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. i don't make the rules π
π₯ EXAMPLE π₯
# Create interactively
$ gh discussion create
# Create non-interactively
$ gh discussion create --title "My question" --category "Q&A" --body "Details here"
see how the second one has all three? yeah. that's the non-interactive trifecta β¨ first one? just vibes and prompts π
π SEE ALSO π
gh-discussion(1)β the parent, the icon, the blueprint π§
k bye, go start a discussion, be brave, be iconic π
π this has been the GitHub CLI manual β GitHub CLI v2.102.0, dated Oct 2026. drink water, read the docs, 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