Requirements
- Git (2.0+) — required,
gis a Git enhancement layer - GitHub Token — optional, needed for PR and stack features
Check versions:
git --version
Quick Install (Recommended)
Using curl:
curl -fsSL https://raw.githubusercontent.com/bdryanovski/g/main/install.sh | bash
Using wget:
wget -qO- https://raw.githubusercontent.com/bdryanovski/g/main/install.sh | bash
The installer will:
- Detect your OS and architecture
- Download the correct binary from GitHub releases
- Install to
~/.local/bin - Show shell setup instructions
Custom install location:
INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/bdryanovski/g/main/install.sh | bash
Manual Download
Download the appropriate archive from the Releases page:
| Platform | Architecture | Download |
|---|---|---|
| Linux | x86_64 | g-x86_64-unknown-linux-gnu.tar.gz |
| Linux | ARM64 | g-aarch64-unknown-linux-gnu.tar.gz |
| macOS | Intel | g-x86_64-apple-darwin.tar.gz |
| macOS | Apple Silicon | g-aarch64-apple-darwin.tar.gz |
| Windows | x86_64 | g-x86_64-pc-windows-msvc.zip |
Extract and install:
# Linux/macOS
tar -xzf g-*.tar.gz
chmod +x g
mv g ~/.local/bin/
# Windows (PowerShell)
Expand-Archive g-*.zip -DestinationPath .
Move-Item g.exe $env:LOCALAPPDATA\Programs\
Build from Source
Requires the Rust toolchain (stable):
git clone https://github.com/bdryanovski/g.git
cd g
cargo install --path .
The binary is placed in ~/.cargo/bin by default. Ensure it is on your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Update
Re-run the installer script, or:
# From source
cd g && git pull && cargo install --path . --force
GitHub token (stacks & PRs)
Fine-grained or classic PAT with repo scope (as appropriate for your org):
export GITHUB_TOKEN=ghp_your_token_here
Persist in shell config:
echo 'export GITHUB_TOKEN=ghp_…' >> ~/.zshrc
Optional config file (prefer env for CI and shared machines):
# ~/.config/g/config.toml
[github]
# token = "ghp_…"
default_labels = ["needs-review"]
Optional: shell alias
alias gg='g'
Aliasing git itself to g can break scripts that expect stock Git; prefer a dedicated command name.
Verify enhanced commands
g log -n 3
g status
g diff --stat
Shell completions
Generate completions for your shell:
# Bash
g completions bash >> ~/.bash_completion
# Zsh
g completions zsh > ~/.zsh/completions/_g
# Fish
g completions fish > ~/.config/fish/completions/g.fish