Skip to content

Playbooks for g

Story-style workflows—solo, team, and on-call. Jump into the full Use cases page anytime.

Installation

Install g via installer script, prebuilt binaries, or from source.

Requirements

  • Git (2.0+) — required, g is a Git enhancement layer
  • GitHub Token — optional, needed for PR and stack features

Check versions:

git --version

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:

  1. Detect your OS and architecture
  2. Download the correct binary from GitHub releases
  3. Install to ~/.local/bin
  4. 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:

PlatformArchitectureDownload
Linuxx86_64g-x86_64-unknown-linux-gnu.tar.gz
LinuxARM64g-aarch64-unknown-linux-gnu.tar.gz
macOSIntelg-x86_64-apple-darwin.tar.gz
macOSApple Silicong-aarch64-apple-darwin.tar.gz
Windowsx86_64g-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

Next