gh repo view

View a repository

Synopsis

Display the description and the README of a GitHub repository.

With no argument, the repository for the current directory is displayed.

With ‘–web’, open the repository in a web browser instead.

gh repo view [<repository>] [flags]

Options

  -w, --web   Open a repository in the browser

Options inherited from parent commands

      --help              Show help for command
  -R, --repo OWNER/REPO   Select another repository using the OWNER/REPO format

Examples in use

In terminal

By default, we will display items in the terminal.

# Viewing a repository in terminal
~/Projects/my-project$ gh repo view owner/repo
owner/repo
Repository description

  Repository README

View this repository on GitHub: https://github.com/owner/repo/
~/Projects/my-project$

In the browser

Quickly open an item in the browser using --web or -w

# Viewing a repository in the browser
~/Projects$ gh repo view owner/repo --web
Opening https://github.com/owner/repo/ in your browser.
~/Projects$

With no arguments

We will display the repository you're currently in.

# Viewing the repository you're in
~/Projects/my-project$ gh repo view
owner/my-project
Repository description

  Repository README

View this repository on GitHub: https://github.com/owner/repo/
~/Projects/my-project$