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 ghInstall on Windows
winget install --id GitHub.cliOther install methods
Scoop
scoop install ghInstall on Linux
sudo apt install ghOther install methods
Homebrew
brew install ghRun it
gh auth loginVerify the install
gh --versionBefore 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.