Get started
To use gg2 on your terminal you have to install it and add it to you $PATH. Like any other CLI tool.
macOS
Install it with:
brew tap peterbe/gg2
brew install gg2Then configure bash completion. In your ~/.bashrc or ~/.zshrc, depending on what you use, append this:
source <(gg2 shell-completion)Now type, to test if it worked:
gg2Linux
You can use Homebrew on Linux too. But let's focus on how to download the binary manually.
- Go to https://github.com/peterbe/gg2/releases
- Look for the latest version (usually the topmost)
- Click to download the file
gg-linux-arm64orgg-linux-x64file depending on your CPU - Move the downloaded binary file to somewhere on your
$PATH
To know what a good place to put it is, use:
echo $PATHand look for a directory that is available to the user.
For example:
wget https://github.com/peterbe/gg2/releases/download/v0.0.13/gg-linux-arm64
mv gg-linux-arm64 ~/.local/bin/gg2Then configure bash completion. In your ~/.bashrc or ~/.zshrc, depending on what you use, append this:
source <(gg2 shell-completion)Now type, to test if it worked:
gg2From source
To do this you need Bun.
bun run buildThat'll create an executable called out/gg by default. Test it with:
./out/gg --helpNow, move this executable somewhere on your $PATH. For example:
mv out/gg ~/.local/bin/gg2source <(gg2 shell-completion)Now type, to test if it worked:
gg2