# authenticate with your GitHub account
# Alternatively, gh will respect the GITHUB_TOKEN environment variable
gh auth login
# GitHub Enterprise
gh auth login --hostname <hostname>
# verify
gh auth status
# Print a list of configuration keys and values
gh config list [flags]
# rint the value of a given configuration key
gh config get <key> [flags]
# Update configuration with a value for the given key
gh config set editor "code --wait"
Usage
repos
# Cloning a repository
gh repo clone cli/cli
# Sync local repository from remote parent
gh repo sync
alias
# Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
gh alias set <alias> <expansion> [flags]
$ gh alias set homework 'issue list --assignee @me'
$ gh homework
Miscellaneous
# Open the GitHub repository in the web browser.
gh browse
# run github actions
gh workflow view
gh workflow list
# publish file 'hello.py' as a public gist
gh gist create --public hello.py
# List all issues
gh issue list
# List all PRs
gh pr list