graphite-interactive-cli
v0.3.0
Published
Interactive menu for the Graphite CLI (gt) — stacks, PRs, and branching without memorizing commands
Downloads
525
Maintainers
Readme
Graphite interactive CLI (gtm)
Unofficial interactive menu for the official Graphite gt CLI — stacks, PRs, and branching with fewer memorized flags. Not affiliated with Graphite.
Repository: nickmccomb/graphite-interactive-cli · Issues
Graphite documentation
Authoritative gt behavior, install methods, GitHub auth, and troubleshooting live in Graphite’s docs. This repo maintains a curated link list:
- docs/graphite-resources.md — install (
brew/ npm), requirements (Git ≥ 2.38), quick start, command reference, cheatsheet, LLM-orientedllms.txt/llms-full.txtpointers.
Highlights from their install guide:
brew install withgraphite/tap/graphite # recommended
gt --versionnpm install -g @withgraphite/graphite-cli@stable
gt --versionThen authenticate (see their docs): open app.graphite.com/activate and run the gt auth --token … command they provide.
Learn the workflow: CLI quick start · Command reference · Cheatsheet.
Using Graphite with AI tools: LLM-friendly documentation · graphite.com/docs/llms.txt.
Install gtm (this tool)
Requires a working gt on your PATH (see above). Node 20+ for this package.
npm install -g graphite-interactive-cliThen run gtm in a terminal (interactive menu in a TTY). For an environment check you can run gtm doctor from the shell anytime; in the menu, the same check is under Start here → Environment check (doctor). The command name avoids clashing with GNU coreutils’ gtr (GNU tr) on many Macs.
Most Node installs put global binaries on your PATH automatically. If gtm is not found, add the directory from npm prefix -g (plus /bin on Unix) to PATH, like other global npm tools.
Without a global install: npx graphite-interactive-cli gtm.
Environment variables
| Variable | Effect |
| ----------------------------------- | -------------------------------------------------- |
| GTM_SHOW_GT=1 | Print an “equivalent gt …” line before each run. |
| GTM_DEBUG=1 | Forwards gt --debug on invocations. |
| GTR_SHOW_GT / GTR_DEBUG | Same as above (legacy names, still supported). |
Shell completion (optional)
After installing the package globally, completion scripts are under the package root, e.g.:
# npm -g root
G=$(npm root -g)/graphite-interactive-cli
# bash (~/.bashrc)
source "$G/completions/gtm.bash"
# zsh: completion file must be named _gtm on your fpath
mkdir -p ~/.zsh/completions
cp "$G/completions/gtm.zsh" ~/.zsh/completions/_gtm
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinitThe bundled completions cover common first arguments (doctor, raw, help) and -C / --cwd; full passthrough for raw … is left to normal shell completion.
Develop
pnpm install
pnpm dev # tsx src/cli.ts
pnpm build && node dist/cli.mjs --help
pnpm test
pnpm test:coverage # lcov + html under coverage/For AI/IDE agents working in this repo, see AGENTS.md.
Contributing
See CONTRIBUTING.md. Releases: RELEASING.md · CHANGELOG.md
Security
See SECURITY.md.
License
MIT — see LICENSE.
