Use GitHub From the Terminal With gh

Create and view repositories, issues and pull requests without a browser.

macOSapicloudgitcliLow risk
Run gh auth login, then gh repo view owner/repo to inspect a repository.

01Command

Command
$ gh repo view cli/cli

02What it does

The GitHub CLI wraps the REST and GraphQL APIs in friendly commands. After gh auth login you can clone, fork, open PRs, review changes and check CI with gh pr checks, which keeps context switching to a minimum.

03Risk

RiskLow risk
CompatibilitymacOS with Homebrew installed
!Warning: Authentication stores a token in the system keychain; treat it like a password and revoke it when no longer needed.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Homebrew formula: gh
    Homebrew · vendor-doc · 2026-09-20
    Evidence: Packages the GitHub CLI, which authenticates and exposes GitHub API operations.

Last verified: 2026-09-22 · Category: Developer