Skip to content

Commit 35c8cad

Browse files
Copilotivanviragine
andcommitted
Add Google Antigravity editor support (agy CLI, workspace-enabled)
Co-authored-by: ivanviragine <9950727+ivanviragine@users.noreply.github.com>
1 parent a991202 commit 35c8cad

7 files changed

Lines changed: 18 additions & 16 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, Antigravity, Zed, 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 (antigravity, cursor, vscode, zed)
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: 2 additions & 2 deletions
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'
@@ -139,7 +139,7 @@ complete -f -c git -n '__fish_git_gtr_using_command config' -a "
139139
gtr.worktrees.prefix 'Worktree folder prefix'
140140
gtr.defaultBranch 'Default branch'
141141
gtr.provider 'Hosting provider (github, gitlab)'
142-
gtr.ui.color 'Color output mode (auto, always, never)'
142+
gtr.ui.color 'gtr.ui.color'
143143
"
144144

145145
# Helper function to get branch names and special '1' for main repo

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: antigravity, cursor, vscode, zed, or none
138138
gtr.editor.default = cursor
139139

140-
# Workspace file for VS Code/Cursor (relative path from worktree root)
140+
# Workspace file for Antigravity/VS Code/Cursor (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
@@ -146,13 +146,14 @@ gtr.editor.workspace = project.code-workspace
146146

147147
**Setup editors:**
148148

149+
- **Antigravity**: Install from [antigravity.google](https://antigravity.google), `agy` command available after installation
149150
- **Cursor**: Install from [cursor.com](https://cursor.com), enable shell command
150151
- **VS Code**: Install from [code.visualstudio.com](https://code.visualstudio.com), enable `code` command
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+
Antigravity, VS Code, and Cursor 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 Antigravity/VS Code/Cursor 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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Special:
5656
Use '1' to open the main repo root: git gtr editor 1
5757
5858
Available editors:
59-
atom, cursor, emacs, idea, nano, nvim, pycharm, sublime, vim, vscode,
60-
webstorm, zed, none (or any command in your PATH)
59+
antigravity, atom, cursor, emacs, idea, nano, nvim, pycharm, sublime,
60+
vim, vscode, webstorm, zed, none (or any command in your PATH)
6161
6262
Examples:
6363
git gtr editor my-feature # Uses default editor
@@ -593,10 +593,10 @@ CONFIGURATION OPTIONS:
593593
gtr.worktrees.prefix Worktree folder prefix (default: "")
594594
gtr.defaultBranch Default branch (default: auto)
595595
gtr.editor.default Default editor
596-
Options: cursor, vscode, zed, idea, pycharm,
597-
webstorm, vim, nvim, emacs, sublime, nano,
598-
atom, none
599-
gtr.editor.workspace Workspace file for VS Code/Cursor
596+
Options: antigravity, cursor, vscode, zed, idea,
597+
pycharm, webstorm, vim, nvim, emacs, sublime,
598+
nano, atom, none
599+
gtr.editor.workspace Workspace file for Antigravity/VS Code/Cursor
600600
(relative path, auto-detects, or "none")
601601
gtr.ai.default Default AI tool
602602
Options: aider, auggie, claude, codex, continue,

0 commit comments

Comments
 (0)