CC

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4.7万 stars 质量 72 趋势 75MIT

GitHub 官方命令行工具

概览

gh 是命令行上的 GitHub。它把拉取请求、问题和其他 GitHub 概念带到你已经在用 git 和代码的终端旁边。 GitHub CLI 支持在 GitHub.com、GitHub Enterprise Cloud 和 GitHub Enterprise Server 2.20+ 上的用户,支持 macOS、Windows 和 Linux。 有关安装选项请见下文,使用说明请参见手册。 有一项代理技能用于从编码代理中驱动GH。安装或更新内置的gh技能命令: 如果有任何不对劲或缺少某些功能,请查看贡献页面。在那里你会找到分享反馈、本地构建工具以及向项目提交拉取请求的说明。

概述(AI 翻译)

GitHub CLI,或称 gh CLI,是命令行的 GitHub。它会把拉取请求、问题和其他 GitHub 概念带到你已经处理 git 和代码的终端旁边。

[!重要] GitHub CLI 的 Linux 包仓库 PGP 签名密钥轮换将于 2026 年 9 月 5 日生效;用户遇到包安装或更新问题,可在公开公告中找到解决方案。

GitHub CLI 支持在 GitHub.com、GitHub Enterprise Cloud 以及支持 GitHub Enterprise Server 版本的用户,支持 macOS、Windows 和 Linux。

文献资料

有关安装选项请见下文,使用说明请参见手册。

特工技能

可以通过编码代理驱动gh的代理技能。使用内置的gh skill命令安装或更新:

贡献

如果有任何不对劲或缺少某些功能,请查看贡献页面。在那里你会找到分享反馈、本地构建工具以及向项目提交拉取请求的说明。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 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.

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:

# 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

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

Linux & Unix

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

Windows

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

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add cli/cli
新手?先看 mcpskill.org 教程 →