A clean, production-ready solution for adding "Open with Antigravity" to the Windows context menu for programming and code files.
This is the second version of the idea, the first being from Ahmed Fawzy >> fawzy0z π€.
- β Code Files Only: Adds context menu entry exclusively for programming file types (no clutter on all files)
- β Folder Support: Works on folders and folder backgrounds
- β Windows 10 & 11 Compatible: Automatically adapts to your Windows version
- β Both Context Menus: Appears in both the main menu and "Show more options" (Windows 11)
- β Safe to Run Multiple Times: Can be reinstalled without issues
- β Clean Uninstaller: Completely removes all registry entries
The context menu entry appears for the following programming and code file extensions:
.js .ts .jsx .tsx # JavaScript/TypeScript
.py .php # Python/PHP
.html .css # Web
.json .xml # Data formats
.yml .yaml # YAML
.java # Java
.c .cpp .h # C/C++
.cs # C#
.go # Go
.rs # Rust
.sh # Shell scripts
.bat # Batch files
.ps1 # PowerShell
.sql # SQL
.md # Markdown
- Windows 10 or Windows 11
- Administrator privileges (required for registry modifications)
- Antigravity installed at:
%LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe
-
Download both
.batfiles:install_antigravity_context_menu.batuninstall_antigravity_context_menu.bat
-
Right-click on
install_antigravity_context_menu.bat -
Select "Run as administrator"
-
Wait for the installation to complete
-
Windows Explorer will automatically restart to apply changes
- Close all File Explorer windows
- Open Task Manager (Ctrl+Shift+Esc)
- End all "Windows Explorer" processes
- Restart your computer (recommended for Windows 11)
After installation, you can access "Open with Antigravity" by:
Right-click any supported code file β "Open with Antigravity"
Right-click any folder β "Open with Antigravity"
Right-click empty space inside any folder β "Open with Antigravity"
Windows 11 Note: The entry appears in both:
- The modern context menu (directly visible)
- The classic menu (under "Show more options")
-
Right-click on
uninstall_antigravity_context_menu.bat -
Select "Run as administrator"
-
Wait for the uninstallation to complete
-
Windows Explorer will automatically restart
The uninstaller removes:
- All file extension entries
- All folder entries
- All folder background entries
- Any legacy entries from previous installations
The installer modifies the following registry keys:
For Code Files:
HKEY_CLASSES_ROOT\SystemFileAssociations\[extension]\shell\Antigravity
For Folders:
HKEY_CLASSES_ROOT\Directory\shell\Antigravity
For Folder Backgrounds:
HKEY_CLASSES_ROOT\Directory\Background\shell\Antigravity
For each location, the installer creates:
- Menu entry with display text "Open with Antigravity"
- Icon reference to
Antigravity.exe - Command to execute:
Antigravity.exewith the selected file/folder path
- No "Extended" flag: Entry appears in both main and extended menus
- With "Extended" flag: Entry appears only in "Show more options"
This installer uses no Extended flag for maximum accessibility.
Solution: Right-click the .bat file and select "Run as administrator"
Solution: Verify Antigravity is installed at:
C:\Users\[YourUsername]\AppData\Local\Programs\Antigravity\Antigravity.exe
If installed elsewhere, edit the .bat file and change the EXE_PATH variable.
Solution:
- Run the uninstaller
- Restart your computer
- Run the installer again
- Restart your computer again (especially important for Windows 11)
Solution: This installer shows the entry in both menus. If you want it only in "Show more options", you'll need to manually add the Extended registry value.
Solution:
- Run the uninstaller
- Manually check for and remove any old entries via Registry Editor
- Run the installer again
Edit this line in the installer:
reg add "...\shell\Antigravity" /ve /t REG_SZ /d "Open with Antigravity" /fChange "Open with Antigravity" to your preferred text.
Add extensions to this line:
set "EXTENSIONS=.js .ts .jsx .tsx ..."Edit this line:
set "EXE_PATH=%LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe"β Safe to run multiple times - Won't create duplicates β Clean uninstaller - Removes only Antigravity entries β No system files modified - Only registry entries β Automatic Explorer restart - Changes apply immediately β Administrator check - Prevents partial installations
- Initial release
- Support for 25+ file extensions
- Windows 10 & 11 compatibility
- Folder and folder background support
- Automatic Explorer restart
- Clean uninstaller
This script is provided as-is for use with Antigravity. Modify as needed for your requirements.
If you encounter issues:
- Check the Troubleshooting section
- Verify you're running as Administrator
- Ensure Antigravity is installed in the correct location
- Try restarting your computer
Created for use with Antigravity code editor.