Skip to main content

inbox-install-gh-cli

Install the GitHub CLI (gh) if not already installed

来源信息

仓库
microsoft/vscode-team-kit
最近来源活动
2026年4月13日 13:45
检测到的 SKILL.md 语言
英语
星标
63
Forks
12

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
inbox-install-gh-cli
description
Install the GitHub CLI (gh) if not already installed
tools
["execute"]
# Install GitHub CLI Before using any `gh` commands, check if `gh` is installed by running: ``` gh --version ``` If `gh` is not found, install it based on the operating system: ## macOS ``` brew install gh ``` ## Linux (Debian/Ubuntu) ``` (type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) && sudo mkdir -p -m 755 /etc/apt/keyrings && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg && cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y ``` ## Windows ``` winget install --id GitHub.cli ``` ## After installation Authenticate with GitHub: ``` gh auth login ``` If the user needs notifications access, ensure the token has the `notifications` scope: ``` gh auth refresh -s notifications ``` Disable the pager to prevent terminal buffer issues: ``` gh config set pager cat ```
在 GitHub 查看