Skip to content

james19hadley/ag2r

 
 

Repository files navigation

AG2R — Antigravity 2.0 Remote

A lightweight mobile remote interface for monitoring and interacting with Antigravity AI coding sessions from your phone — on Wi-Fi, hotspot, or anywhere in the world.

AG2R Chat    AG2R Code Review    AG2R Comments    AG2R Overview


🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Antigravity running with CDP enabled:
    antigravity . --remote-debugging-port=9000

Setup

# Clone the repo
git clone git@github.com:the-future-company/ag2r.git
cd ag2r

# Install dependencies
npm install

# Copy environment config and customize
cp .env.example .env

# Start the server
node server.js

On first run, AG2R generates a self-signed SSL certificate in certs/.

Important

Never commit your .env file. It contains your password and session secret. The .env.example file shows the config template — copy it and customize.


🌐 Three Ways to Connect

1. Local Network (Same Wi-Fi)

The simplest setup — works when your phone and computer are on the same Wi-Fi network.

  1. Start the server: node server.js
  2. Open https://<your-computer-ip>:3000 on your phone
  3. Accept the self-signed certificate warning
  4. Enter the passcode (default: antigravity, configurable in .env)

Note

This does not work over mobile hotspot or when you're away from home. Your phone must be on the same network as the computer running AG2R.


2. Quick Tunnel (Any Network, Temporary URL)

Use Cloudflare's free quick tunnel for instant access from anywhere — no account or domain required. The URL changes each time you restart.

# Install cloudflared (macOS)
brew install cloudflared

# Start AG2R
node server.js

# In a second terminal, start the tunnel
cloudflared tunnel --url https://localhost:3000 --no-tls-verify

Cloudflared prints a random URL like https://random-words.trycloudflare.com. Open that on your phone.

Warning

Set a strong password in .env before using any tunnel. The default password antigravity is not secure for internet-facing access.

# In .env
APP_PASSWORD=your-strong-password-here
SESSION_SECRET=run-openssl-rand-hex-24-to-generate

3. Dedicated Tunnel (Any Network, Stable URL)

Set up a permanent Cloudflare tunnel with your own domain for a stable URL that never changes.

Prerequisites:

One-time setup:

# Install cloudflared
brew install cloudflared

# Login to Cloudflare (select your domain when prompted)
cloudflared tunnel login

# Create a named tunnel
cloudflared tunnel create ag2r

# Route your subdomain to the tunnel
cloudflared tunnel route dns ag2r ag2r.yourdomain.com

Create the config file at ~/.cloudflared/config.yml:

tunnel: <TUNNEL_ID_FROM_CREATE_STEP>
credentials-file: /path/to/.cloudflared/<TUNNEL_ID>.json

ingress:
  - hostname: ag2r.yourdomain.com
    service: https://localhost:3000
    originRequest:
      noTLSVerify: true
  - service: http_status:404

Set a password in .env:

APP_PASSWORD=your-strong-password
SESSION_SECRET=run-openssl-rand-hex-24-to-generate
TUNNEL_ENABLED=true
TUNNEL_URL=https://ag2r.yourdomain.com

Run both services:

# Terminal 1: AG2R server
node server.js

# Terminal 2: Cloudflare tunnel
cloudflared tunnel run ag2r

Open https://ag2r.yourdomain.com on your phone — works from anywhere.

Tip

To run the tunnel as a background service that starts on boot:

cloudflared service install

📱 Features

Real-time Chat Monitoring

See Antigravity's responses as they stream in real time. Code blocks, markdown, and all formatting render on your phone exactly as they appear on desktop.

Real-time chat monitoring


Permission Handling

Approve, deny, or skip permission requests remotely. Select an option, hit Submit, and the agent continues — no need to walk back to your computer.

Permission banner on mobile     Permission dialog on mobile


Code Review

Review file changes directly on your phone. See diffs, browse modified files, and navigate between Overview and Review tabs.

Review changes file list     Code diff view

---

Commenting

Select text on any document, leave comments with context, and queue them for batch sending. Comments capture the selected text as a quote and your annotation.

Add Comment dialog     Queued Comments modal


Sidebar Navigation & Overview

Switch between conversations, browse files changed, artifacts, and background tasks — all from the sidebar and overview panel.

Sidebar conversation list     Overview panel


Desktop & Tablet Support

AG2R Review Changes — Desktop

AG2R Chat — Desktop

AG2R Permission Dialog — Desktop

Compatible with tablets or desktops as well


More Features

  • Send messages — type and send messages to the AI from your phone
  • Voice input — dictate messages using your phone's microphone
  • Stop generation — cancel a running generation with the stop button
  • Auto-reconnect — seamless reconnection when connection drops
  • Cookie-based auth — enter passcode once, stays logged in for 30 days

🤖 For AI Agents

Start with ONBOARDING.md for the full technical reference (architecture, file maps, workflows). Your behavioral rules are in GEMINI.md.

📊 Telemetry

AG2R collects anonymous usage metrics (feature counts, crash reports — no personal data) to help improve the project. Set AG2R_TELEMETRY=false in your .env to disable.

License

MIT — see LICENSE for details.

About

AG2R — Antigravity 2.0 Remote. A lightweight, Android-friendly, heavily vibe-coded remote client for monitoring and interacting with Antigravity 2.0.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 73.5%
  • CSS 15.5%
  • HTML 8.4%
  • Shell 2.6%