Self-Hosted Remote Control System for Google Antigravity (agy) CLI & Developer Workstations (Windows, macOS, Linux) over Tailscale
Control, prompt, and monitor autonomous Google Antigravity AI coding sessions on your developer workstation (Windows, macOS, or Linux) straight from your Android phone β wherever you are, zero cloud intermediaries required.
- π₯οΈ Modern Desktop GUI Control Center: Clean dark-mode Tkinter management window showing host status, detected Tailscale IPv4, dynamic high-resolution QR pairing code, 1-click token copy, workspace picker, and real-time activity log.
- β‘ Zero-Lag Dual-Engine Virtual Terminal: Cross-platform pseudo-terminal streaming (Windows ConPTY & Unix POSIX PTY) directly over WebSocket with a 3,000-chunk ring buffer for lossless session catch-up.
- π§ Google Antigravity (
agy) First-Class Citizen: Autonomous session continuity with--dangerously-skip-permissions, mobile-responsive ASCII welcome banner, and real-time conversation resume synchronized directly with local Antigravity SQLite storage. - π Live Antigravity Engine & Quota Telemetry: Real-time active model detection (
settings.json, e.g., Gemini 3.8 Flash (High)), 5-hour session quota, and weekly quota limits with exact reset countdowns (Resets in 123h 29m), cached with zero CPU overhead and refreshable on-demand. - πͺ Zero-Popup Headless Background Execution: All background subprocesses (including
agy -p /usageand audio transcoding) run silently without intrusive popup windows on the developer workstation. - π‘οΈ Subprocess Concurrency Guard: Single-flight prompt lock in
SessionHubblocks overlapping execution requests and prevents runaway background tasks. - ποΈ Remote Voice-to-Text Dictation Pipeline: Native voice prompt bar with automated
ffmpegaudio normalization to 16kHz PCM WAV and Google Speech Recognition fallback for hands-free agent steering. - π± Native Android Companion App: Auto-expanding WhatsApp-style multiline prompt input, 1:1 mathematically aligned screen headers, quick signals (
Ctrl+C), and live workstation vitals (CPU %, RAM %, Battery %, Charging status). - π§ Multi-Drive Breadcrumb Workspace Navigator: Explore and switch project folders effortlessly across filesystem roots (
C:\,D:\on Windows,/and/Volumeson macOS/Linux) right from mobile. - π« Instant Access Revocation: One-click 256-bit cryptographic token rotation instantly locks out stale or lost mobile sessions and invalidates active connections in real time.
- π Zero-Trust Defense-in-Depth: Operates exclusively over encrypted Tailscale WireGuard mesh tunnels, timing-safe authentication (
hmac.compare_digest), path-traversal safeguards, and strict command execution allowlists. - π Power Management & Sleep Inhibit: Prevents host laptops from entering standby or suspend mode during active remote sessions.
Modern dark-mode dashboard with dynamic QR pairing, hardware vitals, active session management, and instant access revocation.
Control autonomous agent sessions, monitor Gemini quota limits, switch workspaces, and steer execution with voice or touch.
| Mobile Dashboard & Engine Telemetry | Interactive Terminal & Voice Prompting |
|---|---|
![]() |
![]() |
| Real-time host vitals & Gemini/Claude quota tracking | Zero-lag virtual terminal, breadcrumb nav & voice STT |
| Layer | Technologies |
|---|---|
| Host Workstation | Windows 10 / 11, macOS, Linux, Python 3.12+, Tkinter, Pillow, ffmpeg |
| Backend Daemon | FastAPI, Uvicorn, pywinpty (Windows) / pty (Unix), psutil, qrcode, SpeechRecognition, SQLite |
| Networking | Tailscale (WireGuard Mesh), WebSocket (/ws/terminal), HTTP REST |
| Mobile Native | React Native, Expo, TypeScript, expo-secure-store, expo-av, lucide-react-native |
| Target Engine | Google Antigravity CLI (agy), Gemini / Claude / GPT models |
- Developer Workstation: Windows 10/11, macOS, or Linux.
- Python: Version
3.12+installed and added toPATH. - Google Antigravity:
agyCLI installed globally and authenticated. - Tailscale: Installed and signed in on both your host workstation and your Android phone on the same tailnet.
- FFmpeg (Optional): Required only if you want remote voice-to-text dictation. Typing prompts, running terminal commands, and telemetry work 100% without it.
Install directly into your Python environment with automatic dependency resolution and global command registration:
# Direct pip install
pip install git+https://github.com/w1th0ut/GravityDesk.git
# Or via pipx (recommended for isolated environments on macOS / Linux)
pipx install git+https://github.com/w1th0ut/GravityDesk.gitgit clone https://github.com/w1th0ut/GravityDesk.git
cd GravityDesk
pip install -e .If you want to use the hands-free voice-to-text dictation feature from your Android phone, install FFmpeg on your host workstation:
# Windows (WinGet)
winget install Gyan.FFmpeg
# macOS (Homebrew)
brew install ffmpeg
# Linux (Ubuntu / Debian)
sudo apt update && sudo apt install -y ffmpegNote
FFmpeg is completely optional. GravityDesk operates normally without it; you will only receive an in-app notice on Android if you attempt to record a voice prompt without FFmpeg installed on the host.
Once installed, you can launch GravityDesk from any terminal window and from any directory on your workstation:
# Option A: Desktop GUI Control Center
gravitydesk
# Option B: Headless / CLI Daemon Mode (Linux VPS, headless server, or SSH)
gravitydesk --headless
# Option C: Update GravityDesk to the latest version
gravitydesk update(If running directly from the cloned repository source without pip installation, python app.py and python app.py --headless continue to work identically).
The GravityDesk host will launch:
- Automatically resolves your workstation's Tailscale IPv4 address.
- Loads (or generates) your persistent 256-bit cryptographic auth token in
~/.gravitydesk/.env. - Renders a high-contrast QR Code directly in the GUI (or prints terminal QR in headless mode).
- Starts the background FastAPI server on port
8000.
- Download Android App: Grab the latest
gravitydesk-vx.x.x.apkdirectly from GitHub Releases and install it on your Android phone. - Connect Tailscale: Ensure both your host workstation and your Android phone are signed into the same Tailscale network.
- Pair Instantly:
- Launch GravityDesk on your phone.
- Tap Scan QR and scan the MOBILE PAIRING QR code displayed in your Desktop GUI or terminal.
- You are connected instantly with sub-50ms latency over your private WireGuard mesh tunnel!
Keep your GravityDesk host up to date with the latest features, security patches, and engine optimizations with a single command:
gravitydesk update- If installed via Git / pip: Automatically fetches and upgrades to the latest release directly from GitHub without needing to remember repository URLs.
- If cloned locally: Automatically pulls the latest commits via
git pulland refreshes your editable installation and dependencies (pip install -e .).
GravityDesk is engineered with institutional-grade security principles for remote execution:
- Private WireGuard Mesh: The server binds exclusively within your private Tailscale network (
100.x.y.z). No ports are forwarded to the public internet, completely eliminating external attack surfaces. - Cryptographic Token Handshake: Authentication requires a 256-bit token generated via Python's
secrets.token_hex(32). Requests are validated using constant-time comparison (hmac.compare_digest) to protect against side-channel timing attacks. - Instant Revocation: Compromised your phone or lost access? Tap π« Reset Pairing Token in the Desktop GUI. GravityDesk generates a new 256-bit secret, overwrites
.env, and invalidates all existing sessions immediately. - Binary Allowlist: Spawning arbitrary executables is prohibited. Only pre-vetted shells (
bash,zsh,sh,cmd.exe,powershell.exe) and Google Antigravity (agy,agy.exe) are permitted. - Path Traversal Protection: Folder browsing requests are sanitized via
os.path.realpath, validating paths against filesystem roots (C:\,D:\on Windows,/and/Volumeson macOS/Linux) to block traversal exploits. - Headless Process Sandboxing: Background executions run with
CREATE_NO_WINDOW(on Windows) and concurrency mutex locks to prevent desktop UI disruption and runaway process cascades.
| Feature | Description |
|---|---|
| Antigravity Quota Monitor | Seamless dashboard card showing active model (e.g., Gemini 3.8 Flash (High)), 5-hour session quota, and weekly limits with exact countdown timers (Resets in Xh Ym) and on-demand refresh. |
| Voice-to-Text Dictation | One-tap voice prompt bar utilizing native audio recording and host-side ffmpeg + speech recognition for hands-free agent steering. |
| Workspace Selector | Interactive multi-drive breadcrumb navigation modal (C:\, D:\ on Windows, / on macOS/Linux) to effortlessly switch project folders without touching your workstation. |
| Session Resume | Direct integration with Antigravity SQLite database to resume prior chat conversations by summary and timestamp. |
| Quick Action Toolbar | Dedicated touch buttons for Ctrl+C (SIGINT interrupt), Enter, and workspace/resume management. |
GravityDesk includes an automated integration test suite verifying authentication entropy, PTY process lifecycle, path traversal boundaries, and endpoint security:
# Run the integration test suite
python -m pytest tests/All tests execute synchronously against the FastAPI test harness with zero network overhead.
GravityDesk/
βββ assets/ # Brand assets, preview banner & UI screenshots
β βββ logo.png # Official Astro-Orb mascot logo (512x512)
β βββ logo.ico # Windows application & taskbar icon
β βββ social-preview.png # Repository social preview banner
β βββ server-view.png # Desktop Control Center screenshot
β βββ home-view.jpeg # Mobile dashboard & quota telemetry screenshot
β βββ terminal-view.jpeg # Mobile terminal & voice screenshot
βββ server/ # Backend daemon bounded context
β βββ cli.py # Global CLI launcher & argument dispatcher
β βββ config.py # Centralized user config directory & paths (~/.gravitydesk/)
β βββ main.py # FastAPI app, REST endpoints, WebSocket hub
β βββ terminal.py # Dual-engine PTY runner (ConPTY & Unix PTY)
β βββ antigravity.py # AGY active model reader & quota telemetry
β βββ system.py # Telemetry vitals & sleep inhibitor
β βββ network.py # Tailscale IP resolver, token generator & QR
β βββ conversations.py # AGY SQLite resume & session sync
β βββ workspaces.py # Directory explorer & path safety validation
β βββ devices.py # Mobile device pairing & identity registry
β βββ gui.py # Desktop GUI Control Center (Tkinter)
βββ mobile/ # React Native / Expo client bounded context
β βββ App.tsx # Main mobile application entrypoint
β βββ src/
β βββ screens/ # Tab screens (HomeScreen, TerminalScreen)
β βββ components/ # UI components (TerminalView, PromptBar, Modals)
β βββ api/ # Typed REST API & WebSocket client
β βββ hooks/ # Terminal, vitals, and pairing lifecycle hooks
β βββ storage/ # Token and device persistence (expo-secure-store)
β βββ types/ # Domain TypeScript interfaces
βββ tests/ # Integration test suite
β βββ test_server.py # Security, PTY, and endpoint harness
βββ app.py # Unified application launcher (GUI & Headless)
βββ requirements.txt # Python package dependencies
βββ LICENSE # MIT Open Source License
βββ AGENTS.md # Autonomous agent operational manual
- Dual-engine terminal runner (Windows ConPTY & Unix POSIX PTY) with async WebSocket streaming
- Tailscale auto-detection & 256-bit token authentication
- Real-time hardware vitals (CPU, RAM, Battery, AC status)
- Dynamic QR Code pairing & Instant Access Revocation
- Modern Tkinter Desktop Control Center
- AGY conversation history sync from SQLite
- Mobile WhatsApp-style multiline prompt bar & Voice STT pipeline
- Real-time Antigravity engine active model & quota usage telemetry (
/usage) - Zero-popup headless background execution (
CREATE_NO_WINDOW) - Multi-drive breadcrumb workspace explorer
- Official Astro-Orb brand identity & adaptive Android icon
- Standalone Android APK build (
expo prebuild/ EAS) - Multi-OS host support (Windows, macOS & Linux)
- Push notification alerts on AGY prompt completion or error
- Biometric fingerprint authentication on mobile app
This project is licensed under the MIT License β see the LICENSE file for details.
Developed as a high-performance developer tool for the Google Antigravity ecosystem.

