Skip to main content

Command referencegh issue create

gh issue create command (Linux & Windows / GitHub CLI)

Linux & WindowsGitHub CLIgitbeginner

What it does

Open a new GitHub issue from the terminal with title, body, labels, and assignees. When people search for gh issue create, they usually want practical GitHub CLI flags, safe examples, and how this subcommand fits everyday PR and repo workflows on Linux, Windows, and macOS. Syntax, options, and copyable examples are below.

Open a new GitHub issue from the terminal with title, body, labels, and assignees.

Syntax

gh issue create [flags]

Common options

Flag / optionMeaning
-t, --titleIssue title.
-b, --bodyIssue body text.
-F, --body-fileRead body from a file.
-l, --labelAdd labels.
-a, --assigneeAssign users (`@me` supported).
-w, --webCreate the issue in the browser editor.

Practical examples

Quick issue

gh issue create --title "Login timeout" --body "Repro steps…"

Creates an issue with an inline title and body.

Labeled bug

gh issue create -t "Null crash" -l bug -a @me

Opens a bug and assigns it to yourself.

From file

gh issue create -t "RFC" -F ./issue.md

Uses a markdown file as the issue body.

Browser editor

gh issue create -w

Opens GitHub’s web UI to finish drafting.

Common mistakes

  • Putting secrets or customer PII into the issue body.
  • Creating duplicates instead of searching with `gh issue list -S` first.

FAQ

What does gh issue create do in GitHub CLI?

Open a new GitHub issue from the terminal with title, body, labels, and assignees.

Does gh issue create work on Windows and Linux?

Yes. The GitHub CLI (`gh`) runs on Linux, Windows, and macOS with the same subcommand syntax after you authenticate with `gh auth login`.

What is a practical gh issue create example?

Try `gh issue create --title "Login timeout" --body "Repro steps…"` — Creates an issue with an inline title and body.

Do I need a token in the command line for gh issue create?

Prefer `gh auth login` so credentials stay in the system keyring or secure storage. Avoid pasting personal access tokens into shell history.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.