What is gh?
GitHub CLI brings common GitHub workflows such as inspecting issues and pull requests to the terminal.
Homebrew installs gh as a formula: a package definition for command-line software and its dependencies. If Homebrew is not installed yet, follow the official installation guide before continuing.
Install and check the formula
Refresh Homebrew’s package definitions, then install gh. Use brew info to inspect the current package and its dependencies; the actual installed version can change over time.
brew update
brew install gh
brew info ghTry it
The status command reports existing GitHub CLI authentication; it does not start a new login.
gh --version
gh auth statusBefore you rely on it
Authenticate only to the intended GitHub host and keep tokens out of shell history and shared logs.
The GitHub website may be more convenient for occasional reviews and account settings.
Update or remove it
Run brew outdated to see if a newer version is available, and brew upgrade gh to upgrade this formula. Before removing it, preview the changes; other packages may depend on it.
brew outdated
brew upgrade gh
brew uninstall --dry-run gh