gh issue create
File an issue without the browser
gh issue create opens a new issue in the current repository from your terminal. Provide the title and body up front, attach labels and assignees, or run it interactively and let gh walk you through your repository's issue templates.
gh issue create --title "Bug: crash on startup" --body "Steps to reproduce..."Syntax
gh issue create [flags]Examples
Interactive create with templates
gh issue createSet title and body directly
gh issue create --title "Crash on startup" --body "Steps: ..."Assign to yourself and label it
gh issue create --title "Docs typo" --assignee @me --label docsRead the body from a file
gh issue create --title "RFC" --body-file rfc.mdFinish creating it in the browser
gh issue create --webOptions & flags
| Flag | What it does |
|---|---|
| -t, --title | Issue title. |
| -b, --body | Issue body text. |
| -F, --body-file | Read the body from a file (- for stdin). |
| -a, --assignee | Assign people. Use @me for yourself. |
| -l, --label | Add labels by name. |
| -m, --milestone | Add the issue to a milestone. |
| -p, --project | Add the issue to a project. |
| -T, --template | Use a specific issue template. |
| -w, --web | Continue in the browser. |
How to use gh issue create, step by step
- Run
gh issue createinside the repository. - Choose an issue template if the repo has them.
- Fill in the title and body, or pass them as flags.
- gh prints the new issue URL when it's created.
Common errors and fixes
could not determine base repo
Run inside a cloned repo, or pass --repo owner/name.
GraphQL: Issues are disabled for this repository
The repo has issues turned off in its settings. Enable Issues under the repository's Features, or file it elsewhere.
Related commands
Frequently asked questions
How do I create a GitHub issue from the command line?
Run gh issue create inside the repository. Pass --title and --body to set it directly, or answer the prompts to pick a template and write the issue interactively.
Can I assign labels and people when creating an issue?
Yes. Use --label and --assignee, e.g. gh issue create --title "Bug" --label bug --assignee @me. @me assigns it to you.
How do I write the issue body from a file?
Use --body-file: gh issue create --title "RFC" --body-file rfc.md. Pass - to read the body from standard input.