Skip to main content

Command referencegh run view

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

Linux & WindowsGitHub CLIgitbeginner

What it does

Inspect a GitHub Actions run, including jobs, annotations, and optional logs. When people search for gh run 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.

Inspect a GitHub Actions run, including jobs, annotations, and optional logs.

Syntax

gh run view [<run-id>] [flags]

Common options

Flag / optionMeaning
--logPrint the run log.
--log-failedPrint logs only for failed steps.
--jobView a specific job ID.
-w, --webOpen the run on GitHub.
--exit-statusExit non-zero if the run failed.

Practical examples

View latest interactively

gh run view

Prompts or selects a run when no ID is given (version-dependent UX).

Failed logs

gh run view 123456789 --log-failed

Prints logs for failing steps only.

Open web

gh run view 123456789 -w

Opens the Actions run page in a browser.

Common mistakes

  • Using a workflow ID where a run ID is required.
  • Dumping full `--log` output for huge matrix builds into the terminal.

FAQ

What does gh run view do in GitHub CLI?

Inspect a GitHub Actions run, including jobs, annotations, and optional logs.

Does gh run 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 run view example?

Try `gh run view` — Prompts or selects a run when no ID is given (version-dependent UX).

Do I need a token in the command line for gh run 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.