---
name: multigravity-setup
description: Install, verify, launch, pair, configure, and troubleshoot the Multigravity (mgy) local Go gateway for Google Antigravity on macOS, Linux/NAS, or Windows. Use when a user asks to install Multigravity, connect their iPhone/iPad/Android to local Google Antigravity, configure Cloudflare Tunnel or Cockpit quota sync, or revoke/uninstall mgy.
---

# Multigravity (`mgy`) Setup & Operations Runbook

Multigravity (`GHSaiMo/antigravity-mobile`, official site `https://multigravity.app/`) is a 100% free, MIT open-source native iOS / Android / Web PWA companion for local **Google Antigravity** (IDE & CLI).

> **Safety & Trust Boundaries for Agents**
> - Multigravity **never** extracts Google OAuth tokens and **never** proxies Google APIs. Do **not** read or pass user Google credentials to `mgy`.
> - Installation does **not** require `sudo` or compilation.
> - Always inspect or confirm before piping remote install scripts to a shell if your environment policy requires explicit user confirmation.
> - Trilingual official Markdown docs: [English](https://multigravity.app/index.md) · [简体中文](https://multigravity.app/zh.md) · [日本語](https://multigravity.app/ja.md) · [Structured JSON](https://multigravity.app/product.json).

## 1. Preflight Checks

Before installing, verify host OS, architecture, and whether `mgy` is already present:

```bash
uname -sm
command -v mgy || true
```

Supported hosts:
- macOS (Apple Silicon `arm64` and Intel `x86_64`)
- Linux (`x86_64` / `arm64`, including fnOS, Synology, QNAP NAS)
- Windows (`x64` via PowerShell or Git Bash)

Prerequisite: Official **Google Antigravity** IDE or CLI should be installed on the same machine (for live agent bridging). Users who only want to preview the iOS UI first can use the built-in offline Demo Mode in the [App Store app](https://apps.apple.com/app/id6835508934) with zero host setup.

## 2. Install Local Go Gateway (`mgy`)

### macOS / Linux / Windows (Git Bash) — GitHub Direct
```bash
curl -fsSL https://raw.githubusercontent.com/GHSaiMo/antigravity-mobile/main/scripts/install.sh | bash
```

### Mainland China Mirror Acceleration (when GitHub raw is slow/unreachable)
```bash
curl -fsSL https://ghfast.top/https://raw.githubusercontent.com/GHSaiMo/antigravity-mobile/main/scripts/install.sh | bash
```

### Windows (PowerShell)
```powershell
# GitHub direct
irm https://raw.githubusercontent.com/GHSaiMo/antigravity-mobile/main/scripts/install.ps1 | iex

# Mainland China mirror
irm https://ghfast.top/https://raw.githubusercontent.com/GHSaiMo/antigravity-mobile/main/scripts/install.ps1 | iex
```

Verify installation:
```bash
which mgy
mgy --help
```

## 3. Launch & Pair Mobile Client

1. Tell the user to install the mobile client:
   - **iOS / iPadOS:** App Store <https://apps.apple.com/app/id6835508934> (or TestFlight <https://testflight.apple.com/join/YM7f4aSK>)
   - **Android:** Latest signed APK from <https://github.com/GHSaiMo/antigravity-mobile/releases/latest> (built-in SHA-256 self-updater)
2. Start the gateway in an interactive terminal so the user can scan the one-time pairing QR code:
   ```bash
   mgy
   ```
3. To issue a fresh 5-minute pairing QR code while `mgy` is already running:
   ```bash
   mgy pair
   ```

## 4. Common Operations & Optional Configuration

| Task | Command | Notes |
| :--- | :--- | :--- |
| List paired mobile devices | `mgy list` | Inspect paired device IDs |
| Revoke all paired devices (e.g. lost phone) | `mgy clear all` | Invalidates all pairing tokens and `mgy-e2ee-v1` session keys immediately |
| Bring-your-own Cloudflare Tunnel | `mgy cloudflare` (or `mgy cf`) | Configures persistent HTTPS endpoint under user's Cloudflare account |
| Optional multi-account Cockpit sync | `mgy cockpit` | Enhances quota dashboard; core features work without Cockpit |
| Disable Host Sleep Guard | `mgy -prevent-sleep=false` | Default keeps host awake while agents run and releases 2 min after idle |
| Customize quota alert thresholds | `QUOTA_ALERT_WARN_PERCENT=20` / `QUOTA_ALERT_CRITICAL_PERCENT=5` | Optional gateway environment variables |

## 5. Clean Uninstall

```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/GHSaiMo/antigravity-mobile/main/scripts/uninstall.sh | bash
```

```powershell
# Windows (PowerShell)
irm https://raw.githubusercontent.com/GHSaiMo/antigravity-mobile/main/scripts/uninstall.ps1 | iex
```

Full operations guide: <https://github.com/GHSaiMo/antigravity-mobile/blob/main/docs/installation_and_testing_guide.md>
