How coderabbitai/git-worktree-runner works
gtr is a Bash CLI that simplifies Git worktree creation and lifecycle management for parallel development, PR review, editors, and coding agents. A typical workflow invokes git gtr new to create a worktree, optionally copies files or runs setup hooks, then opens an editor or AI tool; users can later list, navigate to, and remove worktrees. The README supports these product relationships, but no source excerpts were provided, so internal call ownership and implementation details cannot be verified.
Main entry points: git-gtr CLI · create.sh Create worktree · clean.sh Merged PR cleanup · pr.sh PR worktrees
Components 17
CLI entry
- CLI
bin/git-gtr - Shell helper
bin/gtr
Worktree lifecycle
- Git worktrees
- Create worktree
lib/commands/create.sh - PR worktrees
lib/commands/pr.sh - List worktrees
lib/commands/list.sh - Remove worktree
lib/commands/remove.sh - Merged PR cleanup
lib/commands/clean.sh
Developer integrations
- Config file copy
lib/copy.sh - Setup hooks
lib/hooks.sh - Editor launch
lib/commands/editor.sh - AI launch
lib/commands/ai.sh - Tool adapters
lib/adapters.sh
Configuration and UX
- Configuration
lib/commands/config.sh - Shell completion
completions/_git-gtr
Other components
- Developer
- PR CLI
Connections 21
- Developer → CLI: runs commands
README.md - CLI → Create worktree: handles `new`
README.md - CLI → PR worktrees: handles `pr`
README.md - CLI → List worktrees: handles `list`
README.md - CLI → Remove worktree: handles `rm`
README.md - CLI → Merged PR cleanup: handles `clean`
README.md - CLI → Editor launch: handles `editor`
README.md - CLI → AI launch: handles `ai`
README.md - Create worktree → Git worktrees: creates
README.md - PR worktrees → Git worktrees: creates
README.md - List worktrees → Git worktrees: lists
README.md - Remove worktree → Git worktrees: removes
README.md - Merged PR cleanup → Git worktrees: cleans
README.md - Create worktree → Config file copy: copies files
README.md - Create worktree → Setup hooks: runs hooks
README.md - Editor launch → Tool adapters: uses adapters
- AI launch → Tool adapters: uses adapters
README.md - Merged PR cleanup → PR CLI: checks PR status
README.md - CLI → Configuration: handles config
README.md - Developer → Shell helper: navigates worktrees
README.md - CLI → Shell completion: offers completions
README.md