Skip to content

Commit 1750c24

Browse files
authored
Merge pull request #1 from ivanviragine/copilot/add-support-for-antigravity
Add Google Antigravity editor adapter
2 parents 4858fb6 + c937e10 commit 1750c24

8 files changed

Lines changed: 15 additions & 12 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ While `git worktree` is powerful, it's verbose and manual. `git gtr` adds qualit
135135
- **Simple commands** - Create and manage worktrees with intuitive CLI
136136
- **Repository-scoped** - Each repo has independent worktrees
137137
- **Configuration over flags** - Set defaults once, use simple commands
138-
- **Editor integration** - Open worktrees in Cursor, VS Code, Zed, and more
138+
- **Editor integration** - Open worktrees in Cursor, VS Code, Zed, Antigravity, and more
139139
- **AI tool support** - Launch Aider, Claude Code, or other AI coding tools
140140
- **Smart file copying** - Selectively copy configs/env files to new worktrees
141141
- **Hooks system** - Run custom commands after create/remove
@@ -323,7 +323,7 @@ All configuration is stored via `git config`. For team settings, create a `.gtrc
323323
### Quick Setup
324324

325325
```bash
326-
# Set your editor (cursor, vscode, zed)
326+
# Set your editor (cursor, vscode, zed, antigravity)
327327
git gtr config set gtr.editor.default cursor
328328

329329
# Set your AI tool (aider, auggie, claude, codex, continue, copilot, cursor, gemini, opencode)

completions/_git-gtr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ _git-gtr() {
121121
elif (( CURRENT >= 5 )); then
122122
case "$words[3]" in
123123
editor)
124-
_arguments '--editor[Editor to use]:editor:(atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed)'
124+
_arguments '--editor[Editor to use]:editor:(antigravity atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed)'
125125
;;
126126
ai)
127127
_arguments '--ai[AI tool to use]:tool:(aider auggie claude codex continue copilot cursor gemini none opencode)'

completions/git-gtr.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ complete -c git -n '__fish_git_gtr_using_command list' -l porcelain -d 'Machine-
9191
complete -c git -n '__fish_git_gtr_using_command ls' -l porcelain -d 'Machine-readable output'
9292

9393
# Editor command options
94-
complete -c git -n '__fish_git_gtr_using_command editor' -l editor -d 'Editor to use' -r -a 'atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed'
94+
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'
9595

9696
# AI command options
9797
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'

completions/gtr.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ _git_gtr() {
5555
if [[ "$cur" == -* ]]; then
5656
COMPREPLY=($(compgen -W "--editor" -- "$cur"))
5757
elif [ "$prev" = "--editor" ]; then
58-
COMPREPLY=($(compgen -W "atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed" -- "$cur"))
58+
COMPREPLY=($(compgen -W "antigravity atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed" -- "$cur"))
5959
else
6060
local branches all_options
6161
branches=$(git branch --format='%(refname:short)' 2>/dev/null || true)

docs/configuration.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ git gtr config set gtr.provider github
134134
## Editor Settings
135135

136136
```bash
137-
# Default editor: cursor, vscode, zed, or none
137+
# Default editor: cursor, vscode, zed, antigravity, or none
138138
gtr.editor.default = cursor
139139

140-
# Workspace file for VS Code/Cursor (relative path from worktree root)
140+
# Workspace file for VS Code/Cursor/Antigravity (relative path from worktree root)
141141
# If set, opens the workspace file instead of the folder
142142
# If not set, auto-detects *.code-workspace files in worktree root
143143
# Set to "none" to disable workspace lookup entirely
@@ -148,11 +148,12 @@ gtr.editor.workspace = project.code-workspace
148148

149149
- **Cursor**: Install from [cursor.com](https://cursor.com), enable shell command
150150
- **VS Code**: Install from [code.visualstudio.com](https://code.visualstudio.com), enable `code` command
151+
- **Antigravity**: Install from [antigravity.google](https://antigravity.google), `agy` command available after installation
151152
- **Zed**: Install from [zed.dev](https://zed.dev), `zed` command available automatically
152153

153154
**Workspace files:**
154155

155-
VS Code and Cursor support `.code-workspace` files for multi-root workspaces, custom settings, and recommended extensions. When opening a worktree:
156+
VS Code, Cursor, and Antigravity support `.code-workspace` files for multi-root workspaces, custom settings, and recommended extensions. When opening a worktree:
156157

157158
1. If `gtr.editor.workspace` is set to a path, opens that file (relative to worktree root)
158159
2. If set to `none`, disables workspace lookup (always opens folder)

lib/adapters.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#
1818
# Loading: file override (adapters/editor/<name>.sh) → registry → generic PATH fallback
1919
_EDITOR_REGISTRY="
20+
antigravity|agy|standard|Antigravity 'agy' command not found. Install from https://antigravity.google|workspace
2021
atom|atom|standard|Atom not found. Install from https://atom.io|
2122
cursor|cursor|standard|Cursor not found. Install from https://cursor.com or enable the shell command.|workspace
2223
emacs|emacs|terminal|Emacs not found. Install from https://www.gnu.org/software/emacs/|background
@@ -252,7 +253,7 @@ _editor_define_terminal() {
252253
}
253254
}
254255

255-
# Resolve workspace file for VS Code/Cursor editors
256+
# Resolve workspace file for VS Code/Cursor/Antigravity editors
256257
# Returns the workspace file path if found, empty otherwise
257258
resolve_workspace_file() {
258259
local worktree_path="$1"

lib/commands/help.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Special:
5757
5858
Available editors:
5959
atom, cursor, emacs, idea, nano, nvim, pycharm, sublime, vim, vscode,
60-
webstorm, zed, none (or any command in your PATH)
60+
webstorm, zed, antigravity, none (or any command in your PATH)
6161
6262
Examples:
6363
git gtr editor my-feature # Uses default editor
@@ -595,8 +595,8 @@ CONFIGURATION OPTIONS:
595595
gtr.editor.default Default editor
596596
Options: cursor, vscode, zed, idea, pycharm,
597597
webstorm, vim, nvim, emacs, sublime, nano,
598-
atom, none
599-
gtr.editor.workspace Workspace file for VS Code/Cursor
598+
atom, antigravity, none
599+
gtr.editor.workspace Workspace file for VS Code/Cursor/Antigravity
600600
(relative path, auto-detects, or "none")
601601
gtr.ai.default Default AI tool
602602
Options: aider, auggie, claude, codex, continue,

scripts/generate-completions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ MIDDLE2
609609
gtr.hook.preRemove) desc="Pre-remove hook (abort on failure)" ;;
610610
gtr.hook.postRemove) desc="Post-remove hook" ;;
611611
gtr.hook.postCd) desc="Post-cd hook (shell integration only)" ;;
612+
gtr.ui.color) desc="Color output mode (auto, always, never)" ;;
612613
*) desc="$key" ;;
613614
esac
614615
printf " %s\t'%s'\n" "$key" "$desc"

0 commit comments

Comments
 (0)