Intermediate guide

Stata 19 MP with Antigravity IDE

Install Antigravity IDE (VS Code fork) and mirror your VS Code Stata workflow on Ubuntu 24.04-based Linux.

Intermediate Updated Linux Mint 22.3 Cinnamon (Ubuntu 24.04 Noble base); also tested on Zorin OS 18.1 Pro

Verified Working

Hardware context: Lenovo ThinkPad L14 Gen 2 (Intel i5-1135G7, 16GB RAM, Intel Iris Xe, 1366x768)

Overview

Antigravity IDE is Google’s VS Code fork — same config format, same extension system, same task runner. Because of that compatibility, your entire VS Code Stata workflow can be mirrored over in minutes: settings, keybindings, tasks, and just the two Stata-pipeline extensions, reusing the same runner scripts. This guide installs Antigravity to /opt, mirrors the setup, and covers updates and the custom desktop launcher. It does not reinstall Stata — complete the Stata 19 MP Complete Installation and VS Code Integration guide first.


Installing Antigravity IDE

Antigravity IDE is a standalone tarball download. The top-level directory inside the archive is named Antigravity IDE (with a space).

  1. Download from antigravity.google/product/antigravity-ide (Linux x64 or ARM64). The filename will be something like Antigravity IDE.tar.gz.

  2. Extract and install to /opt:

cd ~/Downloads
tar -xzf "Antigravity IDE.tar.gz"
sudo mv "Antigravity IDE" /opt/antigravity-ide
sudo ln -sf /opt/antigravity-ide/bin/antigravity-ide /usr/local/bin/antigravity-ide
  1. Launch once to initialize config folders:
antigravity-ide

Then close it.


Tested Setup

command -v antigravity-ide
# /usr/local/bin/antigravity-ide

ls -la $(command -v antigravity-ide)
# /usr/local/bin/antigravity-ide -> /opt/antigravity-ide/bin/antigravity-ide

Config paths:

~/.config/Antigravity IDE/User/     → settings.json, keybindings.json, tasks.json
~/.antigravity-ide/extensions/      → only 2 extensions (stata-enhanced, multi-command)

Note the space in Antigravity IDE — Antigravity IDE creates its config folder with a space, not a hyphen. ~/.config/Antigravity-IDE/ (hyphen) does not exist.

The working settings.json on the tested system:

{
    "claudeCode.preferredLocation": "panel",
    "editor.minimap.enabled": false,
    "workbench.settings.applyToAllProfiles": [],
    "redhat.telemetry.enabled": true,
    "python.analysis.typeCheckingMode": "standard",
    "chat.viewSessions.orientation": "stacked"
}

The above is the resulting Antigravity IDE settings.json after copying from VS Code and having the IDE automatically strip keys that reference extensions not present in Antigravity IDE (e.g., yaml.schemas pointing to a VS Code extension, workbench.iconTheme for an extension you didn’t copy). Copy VS Code’s settings.json verbatim — Antigravity IDE will ignore unknown keys gracefully.


Prerequisites

Requirement Verify
Stata 19 MP installed ls /usr/local/stata19/xstata-mp
X11/Xorg session echo $XDG_SESSION_TYPE prints x11
Automation tools which wmctrl xdotool xclip
Runner scripts which stata_run_do.sh and which stata_run_selection.sh
Antigravity IDE installed command -v antigravity-ide
sudo apt install wmctrl xdotool xclip

Mirroring VS Code to Antigravity IDE

Since Antigravity IDE is a VS Code fork, copy config files verbatim. Only copy the 2 extensions needed for the Stata pipeline — copying all VS Code extensions causes errors from incompatible or missing dependencies.

1. Copy VS Code config files

cp ~/.config/Code/User/settings.json    ~/.config/Antigravity\ IDE/User/settings.json
cp ~/.config/Code/User/keybindings.json ~/.config/Antigravity\ IDE/User/keybindings.json
cp ~/.config/Code/User/tasks.json       ~/.config/Antigravity\ IDE/User/tasks.json

The backslash before the space (Antigravity\ IDE) escapes it in the shell. Alternatively, quote the path: ~/"config/Antigravity IDE/User/settings.json".

2. Copy only the 2 Stata-pipeline extensions

cp -r ~/.vscode/extensions/kylebarron.stata-enhanced-* ~/.antigravity-ide/extensions/
cp -r ~/.vscode/extensions/ryuta46.multi-command-*      ~/.antigravity-ide/extensions/

3. Rebuild extensions.json

python3 << 'PYTHON'
import json, os

ext_dir = os.path.expanduser('~/.antigravity-ide/extensions')
extensions = []

for item in sorted(os.listdir(ext_dir)):
    if item.endswith('.json') or not os.path.isdir(os.path.join(ext_dir, item)):
        continue
    item_path = os.path.join(ext_dir, item)

    parts = item.rsplit('-', 1)
    if len(parts) == 2 and parts[1].replace('.', '').isdigit():
        ext_id, version = parts[0], parts[1]
    else:
        ext_id, version = item, '0.0.0'

    publisher = ext_id.split('.')[0] if '.' in ext_id else 'unknown'

    extensions.append({
        "identifier": {"id": ext_id, "uuid": None},
        "version": version,
        "location": {"$mid": 1, "path": item_path, "scheme": "file"},
        "relativeLocation": item,
        "metadata": {
            "installedTimestamp": 1716570000000,
            "pinned": False, "source": "gallery", "id": None,
            "publisherId": publisher,
            "publisherDisplayName": publisher,
            "targetPlatform": "undefined",
            "updated": False, "private": False,
            "isPreReleaseVersion": False,
            "hasPreReleaseVersion": False,
            "preRelease": False
        }
    })

with open(os.path.join(ext_dir, 'extensions.json'), 'w') as f:
    json.dump(extensions, f, indent=2)

print(f'Registered {len(extensions)} extensions')
PYTHON

Expected output:

Registered 2 extensions

How It Works

Keybinding What Happens
Ctrl+Enter Runs current .do file through stata_run_do.sh
Shift+Enter Copies selection via clipboard, writes to /tmp/stata_selection_run.do, runs in Stata

The scripts live in ~/.local/bin/ and are shared with VS Code. Antigravity IDE uses the same scripts because it mirrors VS Code’s tasks.json verbatim. See the Stata 19 MP Complete guide for the full script contents and how they work.

Note: stata_run_do.sh has EDITOR_WMCLASS="code" which only matters if you uncomment the focus-return lines. To return focus to Antigravity IDE instead of VS Code, change it to EDITOR_WMCLASS="Antigravity-IDE".

File Locations

File Path
Antigravity IDE binary /opt/antigravity-ide/antigravity-ide
Wrapper script (recommended) /opt/antigravity-ide/bin/antigravity-ide
Symlink /usr/local/bin/antigravity-ide (→ bin/antigravity-ide)
Config directory ~/.config/Antigravity IDE/User/
Extensions directory ~/.antigravity-ide/extensions/
Desktop file ~/.local/share/applications/antigravity-ide.desktop
Whole-file runner (shared) ~/.local/bin/stata_run_do.sh
Selection runner (shared) ~/.local/bin/stata_run_selection.sh
Temp do-file /tmp/stata_selection_run.do

Verification

Item Value
Command antigravity-ide
Binary /opt/antigravity-ide/antigravity-ide
Wrapper /opt/antigravity-ide/bin/antigravity-ide (symlink target)
Settings ~/.config/Antigravity IDE/User/settings.json (VS Code copy, IDE autotrims unknown keys)
Keybindings ~/.config/Antigravity IDE/User/keybindings.json (identical to VS Code)
Tasks ~/.config/Antigravity IDE/User/tasks.json (identical to VS Code)
Extensions ~/.antigravity-ide/extensions/ (2 extensions only)
Stata extension kylebarron.stata-enhanced@1.6.1
Multi-command ryuta46.multi-command@1.6.0

Test the Workflow

antigravity-ide /path/to/your/stata/project
Test Expected Result
Open .do file Stata syntax highlighting appears
Press Ctrl+Enter Current .do file runs in Stata GUI
Select lines, press Shift+Enter Selection runs in Stata GUI
Code with backticks/globals Runs correctly via temp .do file

Desktop Launcher

Antigravity IDE does not create a desktop file. Add one:

Get an icon

sudo curl -sL -o /opt/antigravity-ide/antigravity-ide.png \
  "https://antigravity.google/assets/image/brand/antigravity-icon__full-color.png"

Install to hicolor theme

for size in 16 24 32 48 64 128 256; do
    sudo mkdir -p /usr/share/icons/hicolor/${size}x${size}/apps
    sudo cp /opt/antigravity-ide/antigravity-ide.png /usr/share/icons/hicolor/${size}x${size}/apps/antigravity-ide.png
done
sudo gtk-update-icon-cache -f -t /usr/share/icons/hicolor

Create .desktop file

cat > ~/.local/share/applications/antigravity-ide.desktop << 'EOF'
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Antigravity IDE
Comment=Google Antigravity IDE (VS Code fork)
Exec=/usr/local/bin/antigravity-ide %F
Icon=antigravity-ide
Categories=Development;IDE;
StartupNotify=true
StartupWMClass=Antigravity-IDE
EOF
chmod +x ~/.local/share/applications/antigravity-ide.desktop
update-desktop-database ~/.local/share/applications

Press Alt+F2, type r, Enter. Antigravity IDE appears under Development.

Verify

desktop-file-validate ~/.local/share/applications/antigravity-ide.desktop
ls /usr/share/icons/hicolor/*/apps/antigravity-ide.png

Updating Antigravity IDE

Antigravity IDE does not auto-update. To update without losing customizations, replace only the install directory — your config, extensions, and icon persist untouched.

Download

  1. Go to antigravity.google/product/antigravity-ide and download the latest Linux x64 tarball. The filename is typically Antigravity IDE.tar.gz.

  2. Note the current version for comparison:

    python3 -c "import json; d=json.load(open('/opt/antigravity-ide/resources/app/package.json')); print(f'Current: {d.get(\"version\",\"unknown\")}')"

Update

# 1. Remove old install (configs/extensions are NOT in /opt)
sudo rm -rf /opt/antigravity-ide

# 2. Extract new archive
cd ~/Downloads
tar -xzf "Antigravity IDE.tar.gz"

# 3. Install fresh copy
sudo mv "Antigravity IDE" /opt/antigravity-ide

# 4. Recreate symlink
sudo ln -sf /opt/antigravity-ide/bin/antigravity-ide /usr/local/bin/antigravity-ide

Restore the Custom Icon

The icon file was removed with the old install in step 1. Re-download it after every update:

sudo curl -sL -o /opt/antigravity-ide/antigravity-ide.png \
  "https://antigravity.google/assets/image/brand/antigravity-icon__full-color.png"

If you installed the icon to the hicolor theme (see Desktop Launcher above), you do not need to re-run the theme install — the icon cache at /usr/share/icons/hicolor/*/apps/ is separate from /opt/antigravity-ide/ and survives the update.

Verify Update

python3 -c "import json; d=json.load(open('/opt/antigravity-ide/resources/app/package.json')); print(f'Updated: {d.get(\"version\",\"unknown\")}')"
ls -la /usr/local/bin/antigravity-ide

What Survives an Update

Item Survives? Why
~/.config/Antigravity IDE/ Yes Configs are in home, not /opt
~/.antigravity-ide/extensions/ Yes Extensions are in home, not /opt
Desktop icon cache (/usr/share/icons/hicolor/) Yes Installed separately, not touched by update
.desktop file (~/.local/share/applications/) Yes In home directory
/opt/antigravity-ide/antigravity-ide.png No Replace via sudo curl after each update

Antigravity CLI (Replaces Gemini CLI)

Google has transitioned from Gemini CLI to Antigravity CLI. If you previously used gemini, replace it with the Antigravity CLI.

Install

curl -fsSL https://antigravity.google/cli/install.sh | bash

This downloads and installs the antigravity binary to ~/.local/bin/ and adds it to your PATH via ~/.bashrc.

After installation, restart your terminal or run:

source ~/.bashrc

Then verify:

antigravity --version

The binary is currently a staging build — automatic updates are planned. For now, re-run the install script to get the latest version.

Note: Antigravity CLI runs as a daemon by default (keeps your session alive for follow-up commands). If you prefer one-off commands, use antigravity --no-daemon.

Removal

rm -f ~/.local/bin/antigravity
rm -rf ~/.antigravitycli

Troubleshooting

Problem Fix
Ctrl+Enter does nothing Verify tasks.json was copied to the correct directory: diff ~/.config/Code/User/tasks.json ~/'config/Antigravity IDE/User/tasks.json'
Shift+Enter does nothing Verify multi-command extension folder exists in ~/.antigravity-ide/extensions/
No Stata highlighting Verify stata-enhanced extension folder exists
Task opens terminal but not Stata which stata_run_do.sh stata_run_selection.sh
Stata doesn’t receive paste echo $XDG_SESSION_TYPE must be x11
Extensions not loading Delete ~/.antigravity-ide/extensions/extensions.json and rebuild with the Python script
“Unable to read file …/package.json” error Stale extension folders without matching package.json
Config changes don’t take effect Wrote to wrong directory (Antigravity-IDE with hyphen)
Config changed but behavior did not Window needs reload

Removal

sudo rm -rf /opt/antigravity-ide
sudo rm /usr/local/bin/antigravity-ide
rm -f ~/.local/share/applications/antigravity-ide.desktop
update-desktop-database ~/.local/share/applications

Clean user data (optional):

rm -rf ~/.config/Antigravity IDE
rm -rf ~/.antigravity-ide

Discussion

Continue the conversation about this guide. Loading comments connects to GitHub Discussions through giscus.

Open community discussions on GitHub

Check before you copy

This command needs care. Read its context, confirm the target and location, and keep a recovery path.

Copying does not run a command.