Skip to content

Instantly share code, notes, and snippets.

@arschles
Last active July 15, 2024 13:01
Show Gist options
  • Save arschles/cadfaca4524ac4ac789c6294821bdc44 to your computer and use it in GitHub Desktop.
Save arschles/cadfaca4524ac4ac789c6294821bdc44 to your computer and use it in GitHub Desktop.
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
@TheJojoJoseph
Copy link

Can you share for ARM mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment