Skip to main content

Command referencegh issue view

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

Linux & WindowsGitHub CLIgitbeginner

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 / optionMeaning
-w, --webOpen the issue in a browser.
-c, --commentsInclude comment threads in the output.
--jsonSelect 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.

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.