>_cli-install
gh

Install GitHub CLI

GitHub on the command line

The GitHub CLI (gh) brings pull requests, issues, releases, Gists and Actions to your terminal, and scripts cleanly against the GitHub API.

Install on macOS
brew install gh
Install on Windows
winget install --id GitHub.cli
Other install methods
Scoop
scoop install gh
Install on Linux
sudo apt install gh
Other install methods
Homebrew
brew install gh
Run it
gh auth login
Verify the install
gh --version

Before you start

After installing, run gh auth login to connect your GitHub account.

Official documentation: GitHub CLI install docs

Frequently asked questions

How do I sign in?

Run gh auth login and follow the browser prompt, or paste a personal access token.

My apt version is old — what do I do?

Ubuntu's bundled gh can lag. For the newest release, add GitHub's official apt repository (see the docs link) or use Homebrew.

Is gh the same as git?

No. git manages your repository; gh talks to GitHub (PRs, issues, Actions).

GitHub is a trademark of GitHub, Inc. cli-install.com is an independent resource and is not affiliated with or endorsed by the trademark owner.