Command referencegh issue view
gh issue view command (Linux & Windows / GitHub CLI)
What it does
Show details for a GitHub issue in the terminal or open it on the web. When people search for gh issue view, 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.
Show details for a GitHub issue in the terminal or open it on the web.
Syntax
gh issue view {<number> | <url>} [flags]Common options
| Flag / option | Meaning |
|---|---|
| -w, --web | Open the issue in a browser. |
| -c, --comments | Include comment threads in the output. |
| --json | Select fields for scripted output. |
Practical examples
View by number
gh issue view 42
Prints title, body, labels, and metadata for issue 42.
With comments
gh issue view 42 --comments
Includes discussion comments in the terminal view.
Open web
gh issue view 42 -w
Opens the issue page in your browser.
Common mistakes
- Passing a PR number to `gh issue view` — use `gh pr view` for pull requests.
- Expecting `--comments` to post a new comment; it only displays them.
Related commands
- gh issue listList issues in the current or specified GitHub repository with filters.
- gh issue commentAdd a comment to an existing GitHub issue.
- gh issue closeClose one or more GitHub issues from the command line.
- gh pr viewDisplay pull request metadata, body, and checks in the terminal or browser.
- gh auth loginAuthenticate the GitHub CLI with GitHub.com or GitHub Enterprise so other gh commands can run.
- gh pr createCreate a pull request from the current branch with title, body, reviewers, and base branch options.
- gh pr mergeMerge a pull request using merge commit, squash, or rebase strategies.
- gitTrack source history and collaborate through distributed repositories.
FAQ
What does gh issue view do in GitHub CLI?
Show details for a GitHub issue in the terminal or open it on the web.
Does gh issue view 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 view example?
Try `gh issue view 42` — Prints title, body, labels, and metadata for issue 42.
Do I need a token in the command line for gh issue view?
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.