凭据访问
Reads GitHub CLI tokens and can print or use them for API calls.
代理安全
gh is the GitHub control-plane CLI for repositories, releases, issues, and authenticated developer state.
Reads GitHub CLI tokens and can print or use them for API calls.
Can modify repositories, pull requests, releases, secrets, and organization state.
Can create releases, upload assets, and trigger release automation.
Use GitHub token protection plus approval gates for write and token-display commands.
Permit status and read-only queries; require approval for token output, release creation, repo writes, and workflow dispatch.
安装
brew install ghlocal Homebrew formula metadata
sudo dnf install ghFedora Rawhide package metadata · gh · 来源: dl.fedoraproject.org
nix profile install nixpkgs#ghnixpkgs package indexes · pkgs/by-name/gh/gh/package.nix · 来源: api.github.com
sudo zypper install ghopenSUSE Tumbleweed package metadata · gh · 来源: download.opensuse.org
choco install ghChocolatey community package catalog · gh · 来源: community.chocolatey.org
scoop install main/ghScoop official bucket manifest trees · bucket/gh.json · 来源: api.github.com
winget install --id GitHub.cli -eWindows Package Manager source index · GitHub.cli · 来源: cdn.winget.microsoft.com
概览
GitHub command-line tool
历史
GitHub CLI, invoked as `gh`, is GitHub's official command-line tool for working with pull requests, issues, repositories, releases, Actions, authentication, and GitHub API data from a terminal.
GitHub created the cli/cli repository in October 2019 and opened the project as a new official CLI distinct from the older community `hub` tool. GitHub announced the beta in February 2020 and released GitHub CLI 1.0 in September 2020.
The README frames `gh` as a standalone tool that brings GitHub concepts next to `git` and source code work. The project grew into a cross-platform Go CLI with first-party manuals, release binaries, package repositories, GitHub Enterprise support, extension support, API helpers, and later supply-chain features such as build provenance attestations for release artifacts.
GitHub CLI has broad adoption because it is distributed through GitHub's own package repositories and release binaries, package managers such as Homebrew and WinGet, and GitHub-hosted Actions runner images. Its first-party status made it a standard automation interface for GitHub workflows in shells and CI jobs.
Practitioners use `gh` to create and review pull requests, triage issues, clone and browse repositories, trigger or inspect Actions workflows, manage releases and gists, authenticate to GitHub hosts, call the GitHub API, and script repository operations without leaving the command line.
For package and automation ecosystems, `gh` is important because it gives GitHub an official, versioned executable surface. Package maintainers can depend on consistent commands across macOS, Linux, and Windows, while CI authors can use a preinstalled or easily installed binary instead of hand-rolling API calls.
审批门
本地审批门种子包含 7 条适用于 gh 的规则。覆盖的入口点:gh。严重级别:严重, 高。覆盖状态:partial,审核于 2026-05-21。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
$XDG_CONFIG_HOME/gh/config.yml~/.config/gh/config.yml%AppData%\GitHub CLI\config.ymlCredential-bearing paths to review before unattended agent runs.
$XDG_CONFIG_HOME/gh/hosts.yml~/.config/gh/hosts.yml%AppData%\GitHub CLI\hosts.yml可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
gh | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:gh |
|---|---|
| 版本 | 2.96.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/gh |
| 主页 | https://cli.github.com/ |
| 仓库 | https://github.com/cli/cli |
| 上游文档 | https://cli.github.com/manual/gh |
| 许可证 | MIT |
| 源码归档 | https://github.com/cli/cli/archive/refs/tags/v2.96.0.tar.gz |
| 最后更新 | 2026-07-03T00:29:16Z |
| Pulse | updated |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gh |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
gh 2.46.0-3
GitHub CLI, GitHub’s official command line tool
sudo apt install ghgh
nix profile install nixpkgs#ghgh 2.45.0-1build1
GitHub CLI, GitHub’s official command line tool
sudo apt install ghgh 2.93.0-1.fc45
GitHub's official command line tool
sudo dnf install ghgh 2.93.0-1.1
The official CLI for GitHub
sudo zypper install ghgh-bash-completion 2.93.0-1.1
Bash Completion for gh
sudo zypper install gh-bash-completiongh-fish-completion 2.93.0-1.1
Fish completion for gh
sudo zypper install gh-fish-completiongh-zsh-completion 2.93.0-1.1
ZSH Completion for gh
sudo zypper install gh-zsh-completiongh
sudo port install ghgh
choco install ghmain/gh
scoop install main/ghGitHub.cli
winget install --id GitHub.cli -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.