Skip to content

GitHub CLI

Installation

Windows

# install via scoop
scoop bucket add github-gh https://github.com/cli/scoop-gh.git
scoop install gh

# install via chocolatey
choco -y install gh

Linux

Source: cli/install_linux.md at trunk · cli/cli (github.com)

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/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

Upgrade:

sudo apt update
sudo apt install gh

Post-Installation Configuration

gh config set [editor]

Display or change configuration settings for gh.

Current respected settings:

  • git_protocol: the protocol to use for git clone and push operations (default: “https”)
  • editor: the text editor program to use for authoring text
  • prompt: toggle interactive prompting in the terminal (default: “enabled”)
  • pager: the terminal pager program to send standard output to
  • http_unix_socket: the path to a unix socket through which to make HTTP connection
  • browser: the web browser to use for opening URLs

Commands

See also


Backlinks:

list from [[Tool-Template]] AND -"Changelog"