antigravity-remote-vm  ·  SKILL.md

Antigravity Remote VM Setup

Provision a Google Cloud Compute Engine (GCE) VM and configure it to run Antigravity (agy) remotely via SSH or the persistent agy remote-control daemon.

Install Skill
mkdir -p ~/.gemini/config/skills/antigravity-remote-vm && \
  curl -fsSL https://storage.googleapis.com/ckbrox-open-public/skills/antigravity-remote-vm/SKILL.md \
  -o ~/.gemini/config/skills/antigravity-remote-vm/SKILL.md

Disclaimer: This skill is not production code and should be thoroughly reviewed before use. The thoughts, opinions, and code expressed in this skill are solely those of the author and do not represent those of the author's employer.

Step 01

Clarify Requirements

If not already specified by the user, confirm:

  1. GCP Project & Zone (discover current defaults via gcloud config list --format="json" and gcloud compute zones list).
  2. Machine Type:
    • e2-medium (2 vCPU, 4 GB RAM) — recommended default for CLI and lightweight agent tasks.
    • e2-standard-2 or e2-standard-4 — recommended for heavier builds, containers, or IDE Remote-SSH.
  3. Service Account: Check if a dedicated least-privilege VM service account (e.g., antigravity-vm@<project>.iam.gserviceaccount.com) exists before falling back to the default compute service account.
Step 02

Provision the GCE Instance

Validate syntax with gcloud help compute instances create if needed, then create an Ubuntu 24.04 LTS instance:

gcloud compute instances create <INSTANCE_NAME> \
  --project=<PROJECT_ID> \
  --zone=<ZONE> \
  --machine-type=e2-medium \
  --image-family=ubuntu-2404-lts-amd64 \
  --image-project=ubuntu-os-cloud \
  --boot-disk-size=20GB \
  --scopes=cloud-platform \
  --quiet

(If a dedicated service account exists, include --service-account=<SA_EMAIL>.)

Step 03

Connect via IAP Tunnel & Install agy

Important: Do not scp the local /usr/bin/agy binary (~240 MB) over SSH/IAP, and do not assume port 22 is open to the public internet. Many projects restrict default-allow-ssh to the IAP ingress range (35.235.240.0/20). Always pass --tunnel-through-iap and install agy directly on the VM using the official installer script.

Run the official installer, symlink agy into /usr/local/bin (so non-interactive SSH commands find it on PATH), and enable systemd user lingering so the remote-control daemon survives SSH logouts and reboots:

gcloud compute ssh <INSTANCE_NAME> \
  --project=<PROJECT_ID> \
  --zone=<ZONE> \
  --tunnel-through-iap \
  --command="curl -fsSL https://antigravity.google/cli/install.sh | bash && sudo ln -sf \$HOME/.local/bin/agy /usr/local/bin/agy && sudo loginctl enable-linger \$USER && agy --help | head -n 5" \
  --quiet
Step 04

Authenticate & Start the Remote-Control Daemon

Because OAuth login requires interactive browser verification, provide the user with the exact interactive command to authenticate and register the daemon:

Option A: Built-in agy remote-control Daemon

gcloud compute ssh <INSTANCE_NAME> \
  --project=<PROJECT_ID> \
  --zone=<ZONE> \
  --tunnel-through-iap \
  -- -t "agy remote-control start --name <INSTANCE_NAME>"

Option B: Auto-Updating Daemon Installer (agy-daemon.sh)

gcloud compute ssh <INSTANCE_NAME> \
  --project=<PROJECT_ID> \
  --zone=<ZONE> \
  --tunnel-through-iap \
  -- -t "curl -fsSL https://antigravity.google/cli/agy-daemon.sh | bash -s -- install --name <INSTANCE_NAME>"

Verification Command

gcloud compute ssh <INSTANCE_NAME> \
  --project=<PROJECT_ID> \
  --zone=<ZONE> \
  --tunnel-through-iap \
  --command="agy remote-control status"
Step 05 · Optional

Spend & Escalation Guardrails

When setting up a shared or autonomous agent VM, recommend attaching a dedicated service account paired with an IAM Deny Policy that blocks serviceusage.googleapis.com/services.enable and serviceusage.googleapis.com/quotas.update so the remote agent cannot enable new billable APIs or request quota increases.