Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2023-12-20. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

关于 GitHub CLI

GitHub CLI 是一个命令行工具,可将拉取请求、议题、GitHub Actions 和其他 GitHub Enterprise Server 功能引入终端,使您可以在一个地方完成所有工作。

About GitHub CLI

GitHub CLI is an open source tool for using GitHub from your computer's command line. When you're working from the command line, you can use the GitHub CLI to save time and avoid switching context.

GitHub CLI includes GitHub features such as:

  • View, create, clone, and fork repositories
  • Create, close, edit, and view issues and pull requests
  • Review, diff, and merge pull requests
  • Run, view, and list workflows
  • Create, list, view, and delete releases
  • Create, edit, list, view, and delete gists
  • Retrieve information from the GitHub API

For more information about what you can do with GitHub CLI, see the GitHub CLI manual.

What's the difference between GitHub CLI and Git on the command line?

The Git command line interface (git) allows you to work with a local or remote Git repository. The remote repository may be hosted on GitHub or it may be hosted by another service.

GitHub CLI (gh) is specifically for working with GitHub. It allows you to use the command line to interact with GitHub in all sorts of ways, as illustrated by the previous list. If you tend to work on the command line you may prefer using GitHub CLI instead of using GitHub in a browser. GitHub CLI also makes it easier for you to create scripts to automate GitHub operations.

Installing GitHub CLI

For installation instructions for GitHub CLI, see the GitHub CLI repository.

Sharing feedback

If you have feedback or feature requests, you can open an issue in the cli/cli repository.