gh is available via Homebrew and MacPorts.
brew install gh
brew upgrade gh
sudo port install gh
sudo port selfupdate && sudo port upgrade gh
scoop bucket add github-gh https://github.com/cli/scoop-gh.git scoop install gh
scoop update gh
choco install gh
choco upgrade gh
MSI installers are available for download on the releases page.
Install a prebuilt binary from the releases page
Setting an editor
To set your preferred editor, you can use
gh config set [editor]. Read more about
Additionally if the above is not set, for macOS and Linux,
gh will respect the following environment variables, in this order, based on your OS and shell setup:
On Windows, the editor will currently always be Notepad.