Antigravity CLI (agy) on WSL: broken launcher & missing scripts (manual repair report

I wanted to use the agy CLI from inside a WSL environment so that I could run agy . in a WSL terminal and have Antigravity open that directory, similar to how code . works with VS Code.
Out of the box this does not work due to several packaging issues in the current Windows installer.
Below is a full repair report with the manual steps I had to perform to make it work.


1. Making agy visible from WSL

Problem
When running agy from a normal WSL shell, the command is not found.

Fix
Create a symlink in WSL that points to the main launcher script installed on Windows:

ln -sf "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity" \
  ~/.local/bin/agy

After this, agy is at least callable from WSL, but the next issues appear.


2. Wrong WSL extension id in the launcher

Problem
Even after agy is callable, running agy . opens an empty window and does not attach to the WSL folder. Antigravity starts, but it is not connected to the WSL workspace.

Root cause
The launcher script shipped by Antigravity still looks for the Microsoft WSL extension:

WSL_EXT_ID="ms-vscode-remote.remote-wsl"

However, Antigravity actually bundles a Google-branded WSL extension instead:

google.antigravity-remote-wsl

Fix
I edited the launcher script to use the correct extension id.

Target file

C:\Users\<USER>\AppData\Local\Programs\Antigravity\bin\antigravity

Change

- WSL_EXT_ID="ms-vscode-remote.remote-wsl"
+ WSL_EXT_ID="google.antigravity-remote-wsl"

After this change Antigravity at least tries to talk to the correct extension, but another error shows up.


3. Missing WSL helper scripts

Problem
With the extension id fixed, running agy . now fails with:

wslCode.sh: not found

Root cause
The Antigravity Windows installer does not include the WSL helper scripts that the WSL extension expects. Those scripts are present in the official VS Code Remote WSL extension, but missing from the Antigravity installation.

Fix (local workaround)
I copied the helper scripts from the VS Code extension into the corresponding Antigravity extension folder.

  • Source (VS Code WSL extension):

    %USERPROFILE%\.vscode\extensions\ms-vscode-remote.remote-wsl-0.104.3\scripts\
    
    
  • Destination (Antigravity WSL extension):

    C:\Users\<USER>\AppData\Local\Programs\Antigravity\resources\app\extensions\antigravity-remote-wsl\scripts\
    
    
  • Files restored:

    • wslCode.sh

    • wslDownload.sh

After copying these files, the agy launcher can finally start Antigravity attached to a WSL folder.


Result

With all three fixes applied:

  • Running agy . from a WSL terminal correctly launches Antigravity.

  • The IDE automatically attaches to the current WSL directory, which I assume is the intended behavior (parity with code .).

This suggests that the current Antigravity installer has:

  1. A wrong WSL extension id in the antigravity launcher script; and

  2. Missing WSL helper scripts (wslCode.sh, wslDownload.sh) in the bundled extension.

Note that a future Antigravity update will likely overwrite these local changes, so the workaround would need to be reapplied unless the installer is fixed.

I hope this report helps reproduce and fix the issue on the official side. If additional logs or environment details are useful, I am happy to provide them.

13 Likes

Thank you this is extremely helpful! Hopefully the devs see it.

1 Like

Signed up to leave a like. I used the same steps from different sources. The only missing thing from here is to make the browser work too. Here are the steps for it:

3 Likes

Thank you very much!! It helped a lot!!! :partying_face:

I just needed to skip the first step because agy was not available on my system, the command was antigravity instead. But it was already working calling from WSL

1 Like

Very helpful, this should be a very quick fix on the side of the Google Antigravity devs, not sure why this manual workaround still has to be done. Either way, you saved me quite a lot of headaches.

1 Like

The simplest was i found is to connect to wsl with ssh since ssh works in antigravity.
this works perfectly, and fast.

guide: [How to Enable SSH Access to WSL2](somoit net)

1 Like