Install
Homebrew
Section titled “Homebrew”brew install shhac/tap/g2gIf you installed it as gt2gh
Section titled “If you installed it as gt2gh”The formula was once named gt2gh. The tap maps the old name to the new one,
so an existing install migrates on brew update rather than quietly stopping
at the last version published under it.
Release archives from tags before the rename keep the old asset name, which is
why a download from one of those unpacks a binary called gt2gh.
Check the install
Section titled “Check the install”g2g --versiong2g --helpBare g2g shows help too, and so does a bare namespace: g2g github and
g2g graphite each print their own. Use --help on a command or namespace, for
example g2g github --help, to read the interface of the version you have
installed.
The g2g skill, for agents
Section titled “The g2g skill, for agents”If an agent will run g2g for you, install the g2g skill too. It teaches the
agent to find the command, read each preview before adding --apply, and act on
a refusal’s remedy instead of guessing:
npx skills add shhac/agent-skills --skill g2g --global--global installs it for your user; drop it to install into the current
project only. npx skills update keeps it current. The skill comes from
shhac/agent-skills, and it documents
the CLI rather than shipping it, so install g2g itself with Homebrew as above.
See Working with agents for why g2g is safe to
leave running.
Shell completion
Section titled “Shell completion”g2g completion bashg2g completion zshg2g completion fishCompletion for --branch and --trunk draws on whichever
sources describe the repository, so it works with no
Graphite installed. It is read-only and checkout-free, and it never runs
Graphite in a repository that does not already use it.
That last point matters more for completion than anywhere else. Graphite’s discovery creates state in a repository that has never used it, and a keystroke is not a request: pressing tab must never be what enrols a repository. In a repository with no Graphite, only g2g’s own store answers, from one file read and no subprocess at all.
What else you might need
Section titled “What else you might need”Recording and maintaining structure need only Git. The rest depends on which integrations you use:
- The commands that read or write pull requests (
submit,land, and everything underg2g github) invokegh, and GitHub projection requires a compatibleghwith the relevant stack command. - Graphite is optional. When it is selected as a source, g2g uses Graphite CLI 1.8.6 as its tested baseline.
See Compatibility and storage for the details.
A day with g2g walks through the everyday loop, one command at a time.