gh repo view Show a repository's description and README

Prints a repository's details and README in the terminal, or opens it in the browser. Without a name it uses the repository you are in.

Synopsis

gh repo view [REPOSITORY] [FLAGS]

Common options

Option or formWhat it does
-w, --webOpen the repository in the browser
-b, --branch NAMEView a specific branch
--json FIELDSOutput fields as JSON
-q, --jq EXPRFilter JSON output

Examples

View this repository
gh repo view
octocat/Hello-World
My first repository on GitHub!
View another one
gh repo view cli/cli
Open it on GitHub
gh repo view --web
Get the default branch name
gh repo view --json defaultBranchRef --jq .defaultBranchRef.name

Notes

See also

Last reviewed 2026-10-09.