Physics Derivation Graph / blog index / this post

linux virtual machine on DigitalOcean to run Googles Antigravitiy CLI agent

First published 2026-07-05

VM on Digital Ocean

Log into digitalocean.com

I have an existing project and no droplets, so create a new Droplet.

#cloud-config
users:
  - name: pdg
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    groups: sudo, docker
    shell: /bin/bash
    ssh_authorized_keys:
      - ssh-KEY1HERE
      - ssh-KEY2HERE

write_files:
  # Pre-create the directory and place the non-interactive configuration
  - path: /etc/needrestart/conf.d/99-noninteractive.conf
    owner: root:root
    permissions: '0644'
    content: |
      # Set restart mode: 'a' (automatic restarts) or 'l' (list only). 
      # 'l' is safer if you want to avoid unintended daemon restarts during setup.
      $nrconf{restart} = 'a';
      
      # Disable interactive prompts for kernel/microcode upgrades
      $nrconf{kernelhints} = -1;
      $nrconf{ucodehints} = 0;

package_upgrade: true

packages:
  - certbot
  - python3-certbot-nginx
  - ca-certificates
  - curl
  - gnupg
  - make
  - ufw

runcmd:
  - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config
  - grep -qxF 'AllowUsers pdg' /etc/ssh/sshd_config || echo 'AllowUsers pdg' >> /etc/ssh/sshd_config
  - systemctl restart ssh

  - ufw allow OpenSSH
  - ufw allow 443/tcp
  - ufw allow 80/tcp
  - ufw --force enable

  - snap install glab
  - snap install gh --classic


  - gh skill install cli/cli gh --scope user
  - gh skill update gh

  - echo "alias ll='ls -hal'" >> /etc/bashrc 
  - echo "alias s='git status'" >> /etc/bashrc


  # Set up Docker repository and install Docker
  - install -m 0755 -d /etc/apt/keyrings
  - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  - chmod a+r /etc/apt/keyrings/docker.gpg
  - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" |  tee /etc/apt/sources.list.d/docker.list > /dev/null


  # Running apt steps non-interactively ensures they won't stall the shell script
  - DEBIAN_FRONTEND=noninteractive apt-get update
  - DEBIAN_FRONTEND=noninteractive apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  - systemctl enable --now docker 

Output logs are in

sudo vim /var/log/cloud-init-output.log
gh auth login
gh auth status
glab auth login

Prepare for random loss of connection

screen
echo "alias ll='ls -hal'"
echo "alias s='git status'" >>

initial config of git

generate a key pair and then get content of public key

ssh-keygen -t ed25519 -C "ben.is.located@gmail.com"
cat ~/.ssh/id_ed25519.pub

In a browser visit https://github.com/settings/keys

Once the public key is uploaded, validate access using

ssh -T git@github.com

which should yield

Hi bhpayne! You've successfully authenticated, but GitHub does not provide shell access.

Commits need an author name and email

git config --global user.email "ben.is.located@gmail.com"
git config --global user.name "Ben Payne's agent"
git clone git@github.com:allofphysicsgraph/ui_v8_website_flask_neo4j.git

initialize Physics Derivation Graph

make container_build
mkdir logs
cd certs
openssl genrsa > privkey.pem
openssl req -new -x509 -key privkey.pem -subj "/C=US/ST=WI/O=PDG/CN=Ben/emailAddress=ben.is.located@gmail.com" -out fullchain.pem
openssl dhparam -out dhparam.pem 2048
echo "UID=1000" >  /home/pdg/ui_v8_website_flask_neo4j/.env
echo "GID=1000" >> /home/pdg/ui_v8_website_flask_neo4j/.env
echo "GOOGLE_CLIENT_ID=AVERYLONGSTRINGFROMGOOGLE" >  /home/pdg/ui_v8_website_flask_neo4j/.env.google
echo "GOOGLE_CLIENT_SECRET=ANOTHERVERYLONGSTRING" >> /home/pdg/ui_v8_website_flask_neo4j/.env.google
echo "SECRET_KEY=ASECRETSTRINGFROMGOOGLEASDFASDF" >> /home/pdg/ui_v8_website_flask_neo4j/.env.google
make launch_webserver COMPOSE_FLAGS=--detach

And to end the containers use

make down

nginx prevents docker compose

sudo lsof -i tcp:80
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   12198     root    5u  IPv4  23508      0t0  TCP *:http (LISTEN)
nginx   12198     root    6u  IPv6  23509      0t0  TCP *:http (LISTEN)
nginx   12201 www-data    5u  IPv4  23508      0t0  TCP *:http (LISTEN)
nginx   12201 www-data    6u  IPv6  23509      0t0  TCP *:http (LISTEN)
nginx   12202 www-data    5u  IPv4  23508      0t0  TCP *:http (LISTEN)
nginx   12202 www-data    6u  IPv6  23509      0t0  TCP *:http (LISTEN)
sudo systemctl disable nginx
sudo service nginx stop

configure Antigravity CLI for agentic coding

documentation: https://antigravity.google/docs/cli/overview

https://antigravity.google/docs/faq
https://antigravity.google/docs/plans

Gemini Token usage: https://aistudio.google.com/usage

Antigravity credits: https://one.google.com/ai/activity

Antigravity CLI was announced May 2026: https://antigravity.google/blog/introducing-google-antigravity-cli

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

and then add binary to path

echo 'export PATH="/home/pdg/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

To launch use

agy

Use agy

read `ui_v8_website_flask_neo4j/AGENTS.md` and the run the Python tests

In the file `.gemini/antigravity-cli/settings.json`

{
  "permissions": {
    "allow": [
      "command(find)",
      "command(docker ps)",
      "command(make pytest_out)",
      "command(tail)",
      "command(grep)",
      "command(head)",
      "command(sed)",
      "command(curl -k https://localhost/api/v1/)",
      "command(curl http://localhost:5000/api/v1/)"
    ]
  },
  "trustedWorkspaces": [
    "/home/pdg"
  ]
}

Limits on use of Antigravity

From https://discuss.ai.google.dev/t/navigating-antigravity-pro-quota-limits/130212

Agent-heavy tasks (like "Refactor this entire repository”) drain your weekly baseline much faster than simple "Fix this function” prompts.

One common cause for hitting the 7-day limit is leaving an agent running on a task that gets stuck. If an agent is making dozens of small edits without progress, stop it immediately to save your quota.

Activity Quota Weight Why?
Tab Completion Zero Usually unlimited and doesn't hit the Pro quota.
Simple Chat Low Minimal context and no file writes.
Planning Mode Medium The agent "thinks” and lists steps before acting.
Multi-File Edits High Requires scanning the repo and rewriting multiple buffers.
Browser/Terminal Very High Running tests or browsing the web uses significant "compute units."