Skip to content

GitHub CLI Essentials

The GitHub CLI (gh) brings GitHub's pull requests, issues, releases, and workflows straight into your terminal so you can stay in flow without leaving the command line.

Install it

  • macOS: brew install gh

Confirm the installation with gh --version.

Keep it current

Update gh through Homebrew: brew upgrade gh

Common tasks

  • Authenticate once with gh auth login
  • Clone a repo: gh repo clone owner/project
  • Review a pull request: gh pr checkout 123
  • Merge after review: gh pr merge 123
  • Triage issues: gh issue list and gh issue close <number>

Learn more

Full installation guides and command references live in the GitHub CLI documentation.