Command referencegh issue create
gh issue create command (Linux & Windows / GitHub CLI)
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 / option | Meaning |
|---|---|
| -t, --title | Issue title. |
| -b, --body | Issue body text. |
| -F, --body-file | Read body from a file. |
| -l, --label | Add labels. |
| -a, --assignee | Assign users (`@me` supported). |
| -w, --web | Create 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.
Related commands
- gh issue listList issues in the current or specified GitHub repository with filters.
- gh issue viewShow details for a GitHub issue in the terminal or open it on the web.
- gh issue commentAdd a comment to an existing GitHub issue.
- gh pr createCreate a pull request from the current branch with title, body, reviewers, and base branch options.
- gh auth loginAuthenticate the GitHub CLI with GitHub.com or GitHub Enterprise so other gh commands can run.
- gh pr mergeMerge a pull request using merge commit, squash, or rebase strategies.
- gitTrack source history and collaborate through distributed repositories.
- gh repo cloneClone a GitHub repository to your machine using your authenticated gh settings.
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.