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 form | What it does |
|---|---|
-w, --web | Open the repository in the browser |
-b, --branch NAME | View a specific branch |
--json FIELDS | Output fields as JSON |
-q, --jq EXPR | Filter JSON output |
Examples
gh repo view
octocat/Hello-World
My first repository on GitHub!
gh repo view cli/cli
gh repo view --web
gh repo view --json defaultBranchRef --jq .defaultBranchRef.name
Notes
- It reads from GitHub, so it works even if you have not cloned the repository.
- Pipe to cat to skip the pager.
- To list your own repositories, use gh repo list.
See also
Last reviewed 2026-10-09.