Skip to content

Commit e129c3d

Browse files
authored
Add Google's Antigravity support (#121)
1 parent 4556a5e commit e129c3d

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Libraries are sourced in the order listed above (ui → args → config → ...
7070

7171
Most adapters are defined declaratively in the **adapter registry** (`lib/adapters.sh`) using pipe-delimited entries. Custom adapters that need special logic remain as override files in `adapters/editor/` and `adapters/ai/`.
7272

73-
**Registry-defined adapters**: atom, cursor, emacs, idea, nvim, pycharm, sublime, vim, vscode, webstorm, zed (editors) and aider, auggie, codex, continue, copilot, gemini, opencode (AI).
73+
**Registry-defined adapters**: antigravity, atom, cursor, emacs, idea, nvim, pycharm, sublime, vim, vscode, webstorm, zed (editors) and aider, auggie, codex, continue, copilot, gemini, opencode (AI).
7474

7575
**Custom adapter files**: `adapters/editor/nano.sh`, `adapters/ai/claude.sh`, `adapters/ai/cursor.sh` — these implement `editor_can_open()`/`editor_open()` or `ai_can_start()`/`ai_start()` directly.
7676

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 Antigravity, Cursor, VS Code, 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
@@ -330,7 +330,7 @@ All configuration is stored via `git config`. For team settings, create a `.gtrc
330330
### Quick Setup
331331

332332
```bash
333-
# Set your editor (cursor, vscode, zed)
333+
# Set your editor (antigravity, cursor, vscode, zed)
334334
git gtr config set gtr.editor.default cursor
335335

336336
# 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
@@ -125,7 +125,7 @@ _git-gtr() {
125125
elif (( CURRENT >= 5 )); then
126126
case "$words[3]" in
127127
editor)
128-
_arguments '--editor[Editor to use]:editor:(atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed)'
128+
_arguments '--editor[Editor to use]:editor:(antigravity atom cursor emacs idea nano none nvim pycharm sublime vim vscode webstorm zed)'
129129
;;
130130
ai)
131131
_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
@@ -92,7 +92,7 @@ complete -c git -n '__fish_git_gtr_using_command list' -l porcelain -d 'Machine-
9292
complete -c git -n '__fish_git_gtr_using_command ls' -l porcelain -d 'Machine-readable output'
9393

9494
# Editor command options
95-
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'
95+
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'
9696

9797
# AI command options
9898
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: 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 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
@@ -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+
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: 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, vim,
60+
vscode, webstorm, zed, none (or any command in your PATH)
6161
6262
Examples:
6363
git gtr editor my-feature # Uses default editor
@@ -602,10 +602,10 @@ CONFIGURATION OPTIONS:
602602
gtr.worktrees.prefix Worktree folder prefix (default: "")
603603
gtr.defaultBranch Default branch (default: auto)
604604
gtr.editor.default Default editor
605-
Options: cursor, vscode, zed, idea, pycharm,
606-
webstorm, vim, nvim, emacs, sublime, nano,
607-
atom, none
608-
gtr.editor.workspace Workspace file for VS Code/Cursor
605+
Options: antigravity, atom, cursor, emacs,
606+
idea, nano, nvim, pycharm, sublime, vim,
607+
vscode, webstorm, zed, none
608+
gtr.editor.workspace Workspace file for VS Code/Cursor/Antigravity
609609
(relative path, auto-detects, or "none")
610610
gtr.ai.default Default AI tool
611611
Options: aider, auggie, claude, codex, continue,

0 commit comments

Comments
 (0)