gh pr view 123 --json title,body,files

Category: GitHub CLI

gh pr view 123 --json title,body,files

View PR metadata as JSON including changed files

--json returns the requested fields as a JSON object, and files expands to the list of paths the PR touches. Automate review checks by piping the output into jq. The field names match the GitHub API naming, so body is the PR description.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.