cli /cli

GitHub’s official command line tool

★ 47,033⑂ 9,334👁 1,163⑃ 4,835● 6,728▤ 212
GoMITCreated 2019-10-03cli.github.com
下载:GitHub CLI 2.104.0GitHub-2.104.0 ↓2.104.02026-11-12
+14
日增长
+103
周增长
47,033
stars
9,334
forks
1,163
watchers
4,835
prs
6,728
issues
212
releases

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.104.0 v2.104.0 2026-11-12
Protect private forks when deleting repositories

gh repo delete now warns when deleting a private or internal repository will also delete its forks. The additional confirmation is required even with --yes.

Non-interactive workflows and agents must explicitly accept the cascading deletion:

shell
gh repo delete OWNER/REPO --yes --accept-cascading-deletion-of-private-forks


 What's Changed

 ✨ Features

 Require confirmation before gh repo delete deletes private forks by @BagToad in 14858

 🐛 Fixes

 fix(auth status): surface underlying rate-limit, server, and network errors

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON