GH-RUN-VIEW(1)

✨ GH-RUN-VIEW(1) ✨

okay so this is the GH-RUN-VIEW(1) page from the GitHub CLI manual, and bestie, it's literally your backstage pass to peeking at a workflow run. no gatekeeping, let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

gh-run-view β€” view a summary of a workflow run. that's it, that's the vibe πŸ¦‹


🌸 SYNOPSIS 🌸

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

πŸ’– DESCRIPTION πŸ’–

View a summary of a workflow run. iconic behaviour, honestly.

so here's the tea: due to platform limitations, gh may not always be able to associate jobs with their corresponding logs when using the primary method of fetching logs in zip format. 😭 not the zip format betrayal.

in such cases, gh will attempt to fetch logs for each job individually via the API. this fallback is slower and more resource-intensive β€” like, highkey it's doing the most. and heads up: if more than 25 job logs are missing, the operation will fail with an error. πŸ™ˆ

additionally, due to similar platform constraints, some log lines may not be associated with a specific step within a job. in these cases, the step name will appear as UNKNOWN STEP in the log output. it's giving mystery era, but make no mistake, that's exactly what you'll see. no cap.


✨ OPTIONS ✨

  • -a, --attempt <uint> (default 0) β€” the attempt number of the workflow run. retry era πŸ”
  • --exit-status β€” exit with non-zero status if the run failed. so your scripts can ✨know✨
  • -j, --job <string> β€” view a specific job ID from a run
  • -q, --jq <expression> β€” filter JSON output using a jq expression. chef's kiss filtering πŸ“
  • --json <fields> β€” output JSON with the specified fields
  • --log β€” view full log for either a run or specific job
  • --log-failed β€” view the log for any failed steps in a run or specific job. detective mode πŸ”
  • -t, --template <string> β€” format JSON output using a Go template; see gh help formatting
  • -v, --verbose β€” show job steps
  • -w, --web β€” open run in the browser. main character energy, but in a tab 🫢

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format

🌈 JSON FIELDS 🌈

these are the field names, and yes, keep them exactly like this, character for character:

attempt, conclusion, createdAt, databaseId, displayTitle, event, headBranch, headSha, jobs, name, number, startedAt, status, updatedAt, url, workflowDatabaseId, workflowName


πŸ”₯ EXIT CODES πŸ”₯

  • 0: Successful execution βœ…
  • 1: Error πŸ’€
  • 2: Command canceled
  • 4: Authentication required πŸ”
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. iykyk, always check the help ✨

🧚 EXAMPLE 🧚

# Interactively select a run to view, optionally selecting a single job
$ gh run view

# View a specific run
$ gh run view 12345

# View a specific run with specific attempt number
$ gh run view 12345 --attempt 3

# View a specific job within a run
$ gh run view --job 456789

# View the full log for a specific job
$ gh run view --log --job 456789

# Exit non-zero if a run failed
$ gh run view 0451 --exit-status && echo "run pending or passed"

that last one is such a moment, honestly. 0451 said slay 🌟


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, bestie β€” go forth and view those runs πŸ¦‹

mwah πŸ’‹ β€” this has been GitHub CLI v2.102.0, dated Oct 2026, signing off with the biggest sparkle βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from