GitHub CLI

GitHub CLI allows you to issue GitHub commands from your terminal.

Install

Install.

brew install gh

Update.

brew update && brew upgrade gh

Configure

Authorize the application to connect to GitHub.

gh auth login

Use HTTPS for operations.

gh config set git_protocol https
HTTPS vs. SSH

If you receive errors when issuing commands, log into gh again and explicitly select HTTPS as the protocol: gh auth login

Use

Commands

Refresh your authentication without logging in again.

gh auth refresh

Clone a repo.

gh repo clone owner/repository

List all PRs, open or closed.

gh pr list --state all

Update the active repository's description.

gh repo edit --description "😁 My repo description"

Change the active repository's visibility, accepting the consequences.

gh repo edit --visibility public --accept-visibility-change-consequences

References

GitHub CLI
Interactive graph
On this page
Install
Configure
Use
Commands
References