Skip to content

Instantly share code, notes, and snippets.

@arschles

arschles/install-gh-cli.sh

Last active Mar 18, 2020
Embed
What would you like to do?
How to install the GitHub CLI without Homebrew
#!/bin/bash
echo "This will install the GitHub CLI (gh) onto your system"
echo "When this is done, you'll have a new 'gh' command line tool..."
echo "in your /usr/local/bin directory. On most Mac and Linux systems..."
echo "That directory will be in your 'PATH' environment variable..."
echo "If it isn't, please add it. You can temporarily do so by running this:"
echo "\n export PATH=\"/usr/local/bin:\$PATH\""
RELEASE="0.6.2"
curl -o gh.tgz -L https://github.com/cli/cli/releases/download/v${RELEASE}/gh_$RELEASE_macOS_amd64.tar.gz
tar -xzf gh.tgz
cp gh_0.6.2_macOS_amd64/bin/gh /usr/local/bin/gh
rm gh.tgz
rm -r ./gh_0.6.2_macOS_amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.