I use WSL2 as my main development environment on Windows.
My projects live in Linux:
/home/user/Projects/...
Node.js, pnpm, Git, Docker, and the rest of my toolchain also run inside WSL.
When I started using Google Antigravity IDE, I wanted the same workflow I already had with VS Code:
code .
Something like:
agy .
That would have been the obvious command.
But agy is already the official Antigravity CLI, so reusing it as a launcher for the Windows IDE would be confusing.
So I needed another name.
I ended up with:
wagy .
You can read it as WSL + agy or Windows + agy — both actually describe what it does pretty well.
The goal was simple:
WSL2
└── ~/Projects/my-project
│
│ wagy .
▼
Antigravity IDE on Windows
│
└── Remote WSL
└── /home/user/Projects/my-project
I wanted to launch the Windows Antigravity IDE directly from my WSL terminal, while keeping the project, terminal, and development toolchain inside WSL.
Not opening the project through \\wsl.localhost.
Not moving the project to C:\.
And ideally, not patching Antigravity every time it gets updated.
After a bit of digging, the solution turned out to be quite small.
The setup
This was tested with:
Antigravity IDE 1.107.0
Windows 11
WSL2
Ubuntu
zsh
Antigravity was installed on Windows under:
C:\Users\<user>\AppData\Local\Programs\Antigravity IDE
From WSL, that becomes:
/mnt/c/Users/<user>/AppData/Local/Programs/Antigravity IDE
The missing piece: --remote
Antigravity IDE already supports remote targets.
From WSL, this works:
"/mnt/c/Users/<user>/AppData/Local/Programs/Antigravity IDE/Antigravity IDE.exe" \
--remote "wsl+$WSL_DISTRO_NAME" \
"$(pwd)"
That was the missing piece.
It launches the Windows Antigravity IDE while opening the project through the current WSL distribution.
So instead of opening:
\\wsl.localhost\Ubuntu\home\user\Projects\my-project
the IDE works with the actual WSL environment:
/home/user/Projects/my-project
This means the integrated terminal can keep using the Linux toolchain:
node
pnpm
git
docker
Exactly what I wanted.
Turning it into wagy
Now that the command worked, I just needed a convenient wrapper.
So here's the wagy script.
Create:
~/.local/bin/wagy
with the following content:
#!/usr/bin/env bash
set -euo pipefail
BASE="/mnt/c/Users/<user>/AppData/Local/Programs/Antigravity IDE"
CLI="$BASE/bin/antigravity-ide"
EXE="$BASE/Antigravity IDE.exe"
if [[ -z "${WSL_DISTRO_NAME:-}" ]]; then
echo "wagy: must be run from WSL" >&2
exit 1
fi
REMOTE="wsl+$WSL_DISTRO_NAME"
usage() {
cat <<'HELP'
wagy - Open Antigravity IDE from WSL
Usage:
wagy
wagy .
wagy <folder>
wagy <file>
wagy <file>:<line>
wagy <file>:<line>:<column>
Options:
-n, --new-window Open in a new window
-r, --reuse-window Reuse an existing window
-v, --version Show Antigravity version
-h, --help Show this help
Examples:
wagy .
wagy ~/Projects/my-project
wagy package.json
wagy src/index.ts:42
wagy src/index.ts:42:10
wagy -n .
HELP
}
WINDOW_ARG=""
case "${1:-}" in
-v|--version|version)
"$CLI" --version | sed 's/\r$//'
exit "${PIPESTATUS[0]}"
;;
-h|--help)
usage
exit 0
;;
-n|--new-window)
WINDOW_ARG="--new-window"
shift
;;
-r|--reuse-window)
WINDOW_ARG="--reuse-window"
shift
;;
esac
TARGET="${1:-.}"
GOTO_TARGET=""
if [[ "$TARGET" =~ ^(.+):([0-9]+):([0-9]+)$ ]]; then
FILE="${BASH_REMATCH[1]}"
LINE="${BASH_REMATCH[2]}"
COLUMN="${BASH_REMATCH[3]}"
if [[ -f "$FILE" ]]; then
FILE="$(readlink -f "$FILE")"
GOTO_TARGET="${FILE}:${LINE}:${COLUMN}"
fi
elif [[ "$TARGET" =~ ^(.+):([0-9]+)$ ]]; then
FILE="${BASH_REMATCH[1]}"
LINE="${BASH_REMATCH[2]}"
if [[ -f "$FILE" ]]; then
FILE="$(readlink -f "$FILE")"
GOTO_TARGET="${FILE}:${LINE}"
fi
fi
if [[ -n "$GOTO_TARGET" ]]; then
args=(
--remote "$REMOTE"
)
[[ -n "$WINDOW_ARG" ]] && args+=("$WINDOW_ARG")
args+=(
--goto "$GOTO_TARGET"
)
"$EXE" "${args[@]}" >/dev/null 2>&1 &
disown
exit 0
fi
if [[ ! -e "$TARGET" ]]; then
echo "wagy: path not found: $TARGET" >&2
exit 1
fi
TARGET="$(readlink -f "$TARGET")"
args=(
--remote "$REMOTE"
)
[[ -n "$WINDOW_ARG" ]] && args+=("$WINDOW_ARG")
if [[ -f "$TARGET" ]]; then
args+=(
--goto "$TARGET"
)
elif [[ -d "$TARGET" ]]; then
args+=(
"$TARGET"
)
else
echo "wagy: unsupported path: $TARGET" >&2
exit 1
fi
"$EXE" "${args[@]}" >/dev/null 2>&1 &
disown
Replace:
<user>
with your Windows username.
Then make it executable:
chmod +x ~/.local/bin/wagy
If ~/.local/bin isn't already in your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
For Bash, use ~/.bashrc instead.
Usage
Now I can open the current WSL project:
wagy .
Open another project:
wagy ~/Projects/my-project
Open a file:
wagy package.json
Open a specific line:
wagy src/index.ts:42
Or a line and column:
wagy src/index.ts:42:10
Open a new Antigravity window:
wagy -n .
Reuse an existing one:
wagy -r .
And check the installed version:
wagy --version
Verify that you're really inside WSL
After running:
wagy .
open Antigravity's integrated terminal and check:
pwd
uname -a
which node
which pnpm
which git
The important part is that the workspace remains something like:
/home/user/Projects/my-project
and the binaries come from the Linux environment.
That's different from simply browsing WSL files through a Windows UNC path.
Why not just use \\wsl.localhost?
Windows can access WSL files through paths like:
\\wsl.localhost\Ubuntu\home\user\Projects\my-project
That can be useful, but it isn't the workflow I wanted.
My development environment lives in WSL.
I want Antigravity's terminal and tools to work against:
/home/user/Projects/my-project
with the same environment I get when I open my WSL terminal.
The --remote "wsl+..." approach gives me that.
No IDE patching required
One thing I like about this approach is that it doesn't modify Antigravity itself.
There are other WSL workarounds that involve patching Antigravity's launcher or relying on its bundled Remote WSL extension.
wagy doesn't need any of that.
It simply uses the remote support already exposed by the IDE:
Antigravity\ IDE.exe \
--remote "wsl+Ubuntu" \
/home/user/Projects/my-project
That's less invasive and should also be less fragile across Antigravity updates.
Of course, Antigravity itself is evolving quickly, so CLI behavior may still change in future versions.
Final workflow
My WSL workflow now feels almost identical to VS Code:
cd ~/Projects/my-project
wagy .
That's really all I wanted.
WSL2
│
├── Node.js
├── pnpm
├── Git
├── Docker
│
└── ~/Projects/my-project
│
│ wagy .
▼
Antigravity IDE
│
└── Remote WSL
A tiny shell wrapper, but a much nicer workflow.
Top comments (0)