cli /cli

GitHub’s official command line tool

★ 46,945⑂ 9,269👁 1,152⑃ 4,809● 6,699▤ 210◈ 714
GoMITCreated 2019-10-03cli.github.com
46,945
stars
+15
9,269
forks
1,152
watchers
4,809
prs
6,699
issues
210
releases
714
discussions

README

GitHub CLI

GitHub CLI, or the gh CLI, is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already working with git and your code.

 [!IMPORTANT]
 GitHub CLI's PGP signing key rotation for Linux package repositories is effective September 5, 2026; users experiencing package installation or update problems can find solutions in the public announcement.

!screenshot of gh pr status

GitHub CLI is supported for users on GitHub.com, GitHub Enterprise Cloud, and supported GitHub Enterprise Server versions, with support for macOS, Windows, and Linux.

 Documentation

For installation options see below, for usage instructions see the manual.

 Agent skills

An agent skill is available for driving gh from coding agents. Install or update it with the built-in gh skill command:

shell
 Install the skill (user scope recommended)
gh skill install cli/cli gh --scope user

 Update the skill after a gh release
gh skill update gh


 Contributing

If anything feels off or if you feel that some functionality is missing, please check out the contributing page. There you will find instructions for sharing your feedback, building the tool locally, and submitting pull requests to the project.

If you are a hubber and are interested in shipping new commands for the CLI, check out our doc on internal contributions


 Installation

 macOS

- Homebrew
- Precompiled binaries on [releases page][]

For additional macOS packages and installers, see community-supported docs

 Linux & Unix

- Debian, Raspberry Pi, Ubuntu
- Amazon Linux, CentOS, Fedora, openSUSE, RHEL, SUSE
- Precompiled binaries on [releases page][]

For additional Linux & Unix packages and installers, see community-supported docs

 Windows

- WinGet
- Precompiled binaries on [releases page][]

For additional Windows packages and installers, see community-supported docs

 Build from source

See here on how to build GitHub CLI from source.

 GitHub Codespaces

To add GitHub CLI to your codespace, add the following to your devcontainer file:

json
"features": {
  "ghcr.io/devcontainers/features/github-cli:1": {}
}


 GitHub Actions

GitHub-hosted runners have the GitHub CLI pre-installed, which is updated weekly.

If a specific version is needed, your GitHub Actions workflow will need to install it based on the macOS, Linux & Unix, or Windows instructions above.

For information on all pre-installed tools, see actions/runner-images

 Verification of binaries

Starting with v2.93.0, releases of gh are published as immutable releases. For more information, see Immutable releases.

Since version 2.50.0, gh has been producing Build Provenance Attestation, enabling a cryptographically verifiable paper-trail back to the origin GitHub repository, git revision, and build instructions used. The build provenance attestations are signed and rely on Public Good Sigstore for PKI.

There are two common ways to verify a downloaded release, depending on 

Top issues

Discussions

Latest release

GitHub CLI 2.103.3 v2.103.3 2026-10-26
What's Changed
 🐛 Fixes

 fix(gh auth status): explain expired expiring tokens with --no-refresh by @babakks in 14815


Full Changelog: https://github.com/cli/cli/compare/v2.103.2...v2.103.3

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON