Skip to content

Commit a706609

Browse files
authored
Refresh editor and AI adapter guidance (#193)
* Refresh editor and AI adapter guidance * Address PR review: mark legacy adapter rows
1 parent 746dbc3 commit a706609

12 files changed

Lines changed: 139 additions & 62 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- Antigravity's terminal agent is available as the `antigravity` AI adapter, while other safe agent commands continue to work through the generic `PATH` fallback.
12+
13+
### Changed
14+
15+
- Antigravity editor launches now use the current `agy-ide` command, and the Cursor AI adapter prefers the current `agent` command while retaining legacy fallbacks.
16+
- Editor and AI documentation now uses current installation commands and labels retired or unmaintained integrations as legacy compatibility.
17+
- The README now leads with PR review and coding-agent workflows, surfaces agent automation earlier, and documents the complete configuration precedence.
18+
919
## [2.10.0] - 2026-08-12
1020

1121
### Added

‎README.md‎

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
[![Git](https://img.shields.io/badge/Git-2.17%2B-orange.svg)](https://git-scm.com/)
66
[![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey.svg)](#platform-support)
77

8-
> A portable, cross-platform CLI for managing git worktrees with ease
8+
> A portable Git worktree CLI for PR reviews, coding agents, and repeatable per-branch setup
99
1010
![4 AI agents working in parallel across different worktrees](docs/assets/demo-parallel.png)
1111

1212
## Table of Contents
1313

1414
- [What are git worktrees?](#what-are-git-worktrees)
1515
- [Quick Start](#quick-start)
16+
- [AI Agent Usage](#ai-agent-usage)
1617
- [Why gtr?](#why-gtr)
1718
- [Features](#features)
1819
- [Requirements](#requirements)
1920
- [Commands](#commands)
20-
- [AI Agent Usage](#ai-agent-usage)
2121
- [Configuration](#configuration)
2222
- [Shell Completions](#shell-completions-optional)
2323
- [Platform Support](#platform-support)
@@ -50,7 +50,7 @@ brew tap coderabbitai/tap
5050
brew install git-gtr
5151
```
5252

53-
**Script installer (macOS / Linux):**
53+
**Install from source (macOS / Linux):**
5454

5555
```bash
5656
git clone https://github.com/coderabbitai/git-worktree-runner.git
@@ -118,6 +118,17 @@ git gtr rm my-feature
118118
git gtr clean --merged --closed
119119
```
120120

121+
## AI Agent Usage
122+
123+
Shell-capable coding agents can use `git gtr` directly; a separate MCP server is
124+
not required. Use `git gtr new <branch> --porcelain` to create a worktree and
125+
reliably capture its path, then run the agent inside that directory. Built-in
126+
adapters cover popular tools, while the safe `PATH` fallback works with other
127+
agent CLIs without requiring a dedicated adapter.
128+
129+
See [docs/agent-usage.md](docs/agent-usage.md) for a copy-paste `AGENTS.md`
130+
policy, output contract, and safe lifecycle examples.
131+
121132
## Why gtr?
122133

123134
While `git worktree` is powerful, it's verbose and manual. `git gtr` adds quality-of-life features for modern development:
@@ -142,7 +153,7 @@ While `git worktree` is powerful, it's verbose and manual. `git gtr` adds qualit
142153
- **Repository-scoped** - Each repo has independent worktrees
143154
- **Configuration over flags** - Set defaults once, use simple commands
144155
- **Editor integration** - Open worktrees in Antigravity, Cursor, VS Code, Zed, and more
145-
- **AI tool support** - Launch Aider, Claude Code, or other AI coding tools
156+
- **AI tool support** - Launch Claude Code, Codex, Gemini CLI, or any safe command in `PATH`
146157
- **Smart file copying** - Selectively copy configs/env files to new worktrees
147158
- **Hooks system** - Run custom commands after create/remove
148159
- **Cross-platform** - Works on macOS, Linux, and Windows (Git Bash)
@@ -240,7 +251,7 @@ Start AI coding tool (uses `gtr.ai.default` or `--ai` flag).
240251
```bash
241252
git gtr ai my-feature # Uses configured AI tool
242253
git gtr ai my-feature --ai codex # Override with different tool
243-
git gtr ai my-feature -- --model gpt-4 # Pass arguments to tool
254+
git gtr ai my-feature -- --verbose # Pass arguments to tool
244255
git gtr ai 1 # Use AI in main repo
245256
```
246257

@@ -414,16 +425,16 @@ All configuration is stored via `git config`. For team settings, create a `.gtrc
414425
# Set your editor (antigravity, cursor, vscode, zed)
415426
git gtr config set gtr.editor.default cursor
416427

417-
# Set your AI tool (aider, auggie, claude, codex, continue, copilot, cursor, gemini, opencode)
428+
# Set your AI tool (antigravity, aider, auggie, claude, codex, copilot, cursor, gemini, opencode)
418429
git gtr config set gtr.ai.default claude
419430

420431
# Override-backed adapters may include flags
421432
git gtr config set gtr.editor.default "nano -w"
422433
git gtr config set gtr.ai.default "claude --continue"
423434

424-
# Generic fallbacks may use other safe PATH commands
435+
# Generic fallbacks support other safe PATH commands without dedicated adapters
425436
git gtr config set gtr.editor.default "code --wait"
426-
git gtr config set gtr.ai.default "bunx @github/copilot@latest"
437+
git gtr config set gtr.ai.default goose
427438

428439
# Copy env files to new worktrees
429440
git gtr config add gtr.copy.include "**/.env.example"
@@ -470,6 +481,9 @@ git gtr config set gtr.ui.color never
470481
1. `git config --local` (`.git/config`) - personal overrides
471482
2. `.gtrconfig` (repo root) - team defaults (hooks and editor/AI defaults require `git gtr trust`)
472483
3. `git config --global` (`~/.gitconfig`) - user defaults
484+
4. `git config --system` (`/etc/gitconfig`) - system defaults
485+
5. Environment variables
486+
6. Built-in defaults
473487

474488
> For complete configuration reference including all settings, hooks, file copying patterns, and environment variables, see [docs/configuration.md](docs/configuration.md)
475489

@@ -505,15 +519,6 @@ Requires Git 2.17+ and Bash 3.2+.
505519

506520
> For troubleshooting, platform-specific notes, and architecture details, see [docs/troubleshooting.md](docs/troubleshooting.md)
507521

508-
## AI Agent Usage
509-
510-
Shell-capable coding agents can use `git gtr` directly; a separate MCP server is
511-
not required. Use `git gtr new <branch> --porcelain` to create a worktree and
512-
reliably capture its path, then run the agent inside that directory.
513-
514-
See [docs/agent-usage.md](docs/agent-usage.md) for a copy-paste `AGENTS.md`
515-
policy, output contract, and safe lifecycle examples.
516-
517522
## Advanced Usage
518523

519524
For advanced workflows including:
@@ -530,8 +535,8 @@ See [docs/advanced-usage.md](docs/advanced-usage.md)
530535

531536
Contributions welcome! Areas where help is appreciated:
532537

533-
- **New editor adapters** - JetBrains IDEs, Neovim, etc.
534-
- **New AI tool adapters** - Codeium, etc.
538+
- **New editor adapters** - Editors that need behavior beyond the safe `PATH` fallback
539+
- **New AI tool adapters** - Agent CLIs that need custom launch or discovery logic
535540
- **Bug reports** - Platform-specific issues
536541
- **Documentation** - Tutorials, examples, use cases
537542

‎adapters/ai/cursor.sh‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
# Check if Cursor agent/CLI is available
55
ai_can_start() {
6-
command -v cursor-agent >/dev/null 2>&1 || command -v cursor >/dev/null 2>&1
6+
command -v agent >/dev/null 2>&1 \
7+
|| command -v cursor-agent >/dev/null 2>&1 \
8+
|| command -v cursor >/dev/null 2>&1
79
}
810

911
# Start Cursor agent in a directory
@@ -14,8 +16,8 @@ ai_start() {
1416
local configured_args=("${GTR_AI_CMD_ARGS[@]}")
1517

1618
if ! ai_can_start; then
17-
log_error "Cursor not found. Install from https://cursor.com"
18-
log_info "Make sure to enable the Cursor CLI/agent from the app"
19+
log_error "Cursor agent not found. Install from https://cursor.com/docs/cli/installation"
20+
log_info "Current releases use 'agent'; legacy 'cursor-agent' and 'cursor' commands are also supported"
1921
return 1
2022
fi
2123

@@ -24,8 +26,10 @@ ai_start() {
2426
return 1
2527
fi
2628

27-
# Try cursor-agent first, then fallback to cursor CLI commands
28-
if command -v cursor-agent >/dev/null 2>&1; then
29+
# Prefer the current standalone CLI, then fall back to legacy commands.
30+
if command -v agent >/dev/null 2>&1; then
31+
(cd "$path" && agent "${configured_args[@]}" "$@")
32+
elif command -v cursor-agent >/dev/null 2>&1; then
2933
(cd "$path" && cursor-agent "${configured_args[@]}" "$@")
3034
elif command -v cursor >/dev/null 2>&1; then
3135
# Try various Cursor CLI patterns (implementation varies by version)

‎completions/_git-gtr‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ _git-gtr() {
160160
_arguments '--editor[Editor to use]:editor:(antigravity atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed)'
161161
;;
162162
ai)
163-
_arguments '--ai[AI tool to use]:tool:(aider auggie claude codex continue copilot cursor gemini none opencode)'
163+
_arguments '--ai[AI tool to use]:tool:(aider antigravity auggie claude codex continue copilot cursor gemini none opencode)'
164164
;;
165165
rm)
166166
_arguments \

‎completions/git-gtr.fish‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ complete -c git -n '__fish_git_gtr_using_command ls' -l porcelain -d 'Machine-re
114114
complete -c git -n '__fish_git_gtr_using_command editor' -l editor -d 'Editor to use' -r -a 'antigravity atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed'
115115

116116
# AI command options
117-
complete -c git -n '__fish_git_gtr_using_command ai' -l ai -d 'AI tool to use' -r -a 'aider auggie claude codex continue copilot cursor gemini none opencode'
117+
complete -c git -n '__fish_git_gtr_using_command ai' -l ai -d 'AI tool to use' -r -a 'aider antigravity auggie claude codex continue copilot cursor gemini none opencode'
118118

119119
# Clean command options
120120
complete -c git -n '__fish_git_gtr_using_command clean' -l merged -d 'Remove worktrees with merged PRs/MRs'

‎completions/gtr.bash‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ _git_gtr() {
6767
if [[ "$cur" == -* ]]; then
6868
COMPREPLY=($(compgen -W "--ai" -- "$cur"))
6969
elif [ "$prev" = "--ai" ]; then
70-
COMPREPLY=($(compgen -W "aider auggie claude codex continue copilot cursor gemini none opencode" -- "$cur"))
70+
COMPREPLY=($(compgen -W "aider antigravity auggie claude codex continue copilot cursor gemini none opencode" -- "$cur"))
7171
else
7272
local branches all_options
7373
branches=$(git branch --format='%(refname:short)' 2>/dev/null || true)

‎docs/configuration.md‎

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ gtr.editor.workspace = project.code-workspace
179179

180180
**Setup editors:**
181181

182-
- **Antigravity**: Install from [antigravity.google](https://antigravity.google), `agy` command available after installation
182+
- **Antigravity**: Install from [antigravity.google](https://antigravity.google), with the `agy-ide` command available
183183
- **Cursor**: Install from [cursor.com](https://cursor.com), enable shell command
184184
- **VS Code**: Install from [code.visualstudio.com](https://code.visualstudio.com), enable `code` command
185185
- **Zed**: Install from [zed.dev](https://zed.dev), `zed` command available automatically
@@ -198,23 +198,33 @@ VS Code, Cursor, and Antigravity support `.code-workspace` files for multi-root
198198
## AI Tool Settings
199199

200200
```bash
201-
# Default AI tool: none (or aider, auggie, claude, codex, continue, copilot, cursor, gemini, opencode)
201+
# Default AI tool: none (or antigravity, aider, auggie, claude, codex, copilot, cursor, gemini, opencode)
202202
gtr.ai.default = none
203203
```
204204

205-
**Supported AI Tools:**
206-
207-
| Tool | Install | Use Case | Set as Default |
208-
| --------------------------------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------- |
209-
| **[Aider](https://aider.chat)** | `pip install aider-chat` | Pair programming, edit files with AI | `git gtr config set gtr.ai.default aider` |
210-
| **[Auggie CLI](https://www.augmentcode.com/product/CLI)** | `npm install -g @augmentcode/auggie` | Context-aware agentic CLI for automation and development | `git gtr config set gtr.ai.default auggie` |
211-
| **[Claude Code](https://claude.com/claude-code)** | Install from claude.com | Terminal-native coding agent | `git gtr config set gtr.ai.default claude` |
212-
| **[Codex CLI](https://github.com/openai/codex)** | `npm install -g @openai/codex` | OpenAI coding assistant | `git gtr config set gtr.ai.default codex` |
213-
| **[Continue](https://continue.dev)** | See [docs](https://docs.continue.dev/cli/install) | Open-source coding agent | `git gtr config set gtr.ai.default continue` |
214-
| **[GitHub Copilot CLI](https://githubnext.com/projects/copilot-cli)** | `npm install -g @githubnext/copilot-cli` | AI-powered CLI assistant by GitHub | `git gtr config set gtr.ai.default copilot` |
215-
| **[Cursor](https://cursor.com)** | Install from cursor.com | AI-powered editor with CLI agent | `git gtr config set gtr.ai.default cursor` |
216-
| **[Gemini](https://github.com/google-gemini/gemini-cli)** | `npm install -g @google/gemini-cli` | Open-source AI coding assistant powered by Google Gemini | `git gtr config set gtr.ai.default gemini` |
217-
| **[OpenCode](https://opencode.ai)** | Install from opencode.ai | AI coding assistant | `git gtr config set gtr.ai.default opencode` |
205+
**Built-in AI Tool Adapters:**
206+
207+
| Tool | Install | Use Case | Set as Default |
208+
| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------- |
209+
| **[Antigravity CLI](https://antigravity.google/docs/cli/getting-started)** | Install from antigravity.google | Terminal agent paired with the Antigravity IDE | `git gtr config set gtr.ai.default antigravity` |
210+
| **[Aider](https://aider.chat/docs/install.html)** | `python -m pip install aider-install && aider-install` | Pair programming and file editing | `git gtr config set gtr.ai.default aider` |
211+
| **[Auggie CLI](https://docs.augmentcode.com/cli/overview)** | `npm install -g @augmentcode/auggie` | Context-aware agentic CLI for automation and development | `git gtr config set gtr.ai.default auggie` |
212+
| **[Claude Code](https://claude.com/claude-code)** | Install from claude.com | Terminal-native coding agent | `git gtr config set gtr.ai.default claude` |
213+
| **[Codex CLI](https://developers.openai.com/codex/cli/reference/)** | `npm install -g @openai/codex` | OpenAI coding agent | `git gtr config set gtr.ai.default codex` |
214+
| **[GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli)** | `npm install -g @github/copilot` or `brew install copilot-cli` | GitHub's terminal coding agent | `git gtr config set gtr.ai.default copilot` |
215+
| **[Cursor Agent](https://cursor.com/docs/cli/installation)** | Install the `agent` CLI from cursor.com | Cursor's standalone terminal agent | `git gtr config set gtr.ai.default cursor` |
216+
| **[Gemini CLI](https://github.com/google-gemini/gemini-cli)** | `npm install -g @google/gemini-cli` | Open-source coding agent powered by Gemini | `git gtr config set gtr.ai.default gemini` |
217+
| **[OpenCode](https://opencode.ai)** | Install from opencode.ai | Open-source terminal coding agent | `git gtr config set gtr.ai.default opencode` |
218+
| **[Continue (legacy)](https://github.com/continuedev/continue)** | Existing `cn` installations only | Compatibility; the project is no longer maintained | `git gtr config set gtr.ai.default continue` |
219+
220+
Any safe executable command in `PATH` also works without a built-in adapter. For
221+
example, after installing [Goose](https://github.com/aaif-goose/goose) or
222+
[Qwen Code](https://github.com/QwenLM/qwen-code):
223+
224+
```bash
225+
git gtr config set gtr.ai.default goose
226+
git gtr config set gtr.ai.default qwen
227+
```
218228

219229
**Examples:**
220230

‎docs/troubleshooting.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ git-worktree-runner/
207207

208208
- Shell completions require bash-completion v2+ for Bash
209209
- Some AI adapters require recent tool versions (see adapter docs)
210-
- Windows native (non-WSL) support is experimental
210+
- Native PowerShell is not supported; use Git Bash or WSL2
211211

212212
### Testing Approach
213213

214214
- **Automated tests**: BATS test suite (`tests/`) covers core functions
215215
- **CI**: ShellCheck linting + BATS tests run on all PRs
216216
- **Manual testing**: End-to-end workflows tested across macOS, Linux, WSL2
217-
- **Production use**: Battle-tested with Cursor, VS Code, Aider, Claude Code
217+
- **Adapter coverage**: Built-in and generic `PATH` launch behavior is covered by BATS; product-specific behavior depends on installed tool versions
218218
- Community testing appreciated - please report issues!
219219

220220
### Experimental Features

0 commit comments

Comments
 (0)