Install GitHub CLI
Published at
This TIL is more than a year old. Some details may have changed.
Manual Install
Get Version
VERSION="curl "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-"Download latest version
With wget
$ wget https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_amd64.tar.gzWith curl
$ curl -sSL https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_amd64.tar.gz -o gh_${VERSION}_linux_amd64.tar.gzExtract downloaded file
$ tar xvf gh_${VERSION}_linux_amd64.tar.gzCopy to /usr/local/bin
$ sudo cp gh_${VERSION}_linux_amd64/bin/gh /usr/local/bin/