antigravity-rotator
v1.0.0
Published
Production-grade multi-account proactive profile rotation & YOLO engine for Google Antigravity CLI (agy)
Maintainers
Readme
Antigravity Rotator (agcli / ag / agyolo) 🚀
Production-grade multi-account proactive profile rotation & YOLO autonomous engine for the Google Antigravity CLI (
agy). Scale seamlessly across 1 to 100+ Google accounts with proactive quota balancing, YOLO mode (zero permission approvals), automatic 429 failover, cooldown tracking, and unified MCP server synchronization.
🌟 Why Antigravity Rotator?
When running long-running coding agents, multi-step subagent workflows, or batch operations in the Antigravity CLI (agy), developers face two major bottlenecks:
- Quota Exhaustion: Hitting Google AI Pro rate limits (
429 Too Many Requests/RESOURCE_EXHAUSTED). - Approval Friction: Constant pauses for manual tool approvals and file-write confirmations.
Antigravity Rotator completely eliminates both barriers:
- 🔄 Proactive Preemptive Balancing: Rotates accounts before limits are reached ($1 \to 2 \to \dots \to N \to 1$), spreading token consumption uniformly so continuous tasks never stall.
- ⚡ YOLO Autonomous Mode (
agyolo/ag yolo): Automatically injects--dangerously-skip-permissionsto eliminate all confirmation dialogs for true hands-free execution. - ✨ Zero-Config Plug-and-Play: Running
agoragyoloon a fresh system auto-bootstraps Profile 1 (acc1) from your active.geminicredentials with zero re-login. - 📈 Dynamic Scale ($1 \dots 100+$ Accounts): No hardcoded limits. Add accounts on the fly with
ag addor remove them withag remove <id>. - 🛡️ Smart Cooldown Registry: Automatically tracks 429-exhausted accounts and routes tasks only to healthy profiles. If all accounts are in cooldown, outputs a polite apology with an exact unlock countdown.
- 🔌 Unified MCP & Customizations: Windows NTFS Junctions & Unix Symlinks ensure all MCP tools (
chrome-devtools,word-server,ppt-server,vertex-search,costwise), plugins, and skills configured once are shared across all accounts. - 🧘 Self-Healing State: Corrupted index or state files automatically repair themselves without crashing.
🏗️ Architecture
graph TD
UserReq["User executes: agyolo / ag yolo / ag <prompt>"] --> CheckStrategy{Rotation Strategy}
subgraph ProactiveEngine["1. Proactive Load Balancer (Zero Disturbance)"]
CheckStrategy -- "round-robin (Default)" --> PickNext["Proactively pick next healthy profile (1 → 2 → ... → N)"]
CheckStrategy -- "budget (Threshold)" --> CheckBudget{"Profile used > K times?"}
CheckBudget -- "Yes" --> RotatePreempt["Preemptively switch to next profile"]
CheckBudget -- "No" --> KeepProfile["Use current profile & increment counter"]
end
PickNext --> CheckCooldown{"Is profile in cooldown?"}
RotatePreempt --> CheckCooldown
KeepProfile --> CheckCooldown
CheckCooldown -- "In Cooldown" --> SkipToNext["Skip to next healthy profile in pool"]
CheckCooldown -- "Healthy" --> Execute["Execute agy (with --dangerously-skip-permissions if YOLO)"]
subgraph ReactiveSafetyNet["2. Reactive Failover Safety Net"]
Execute --> EvalResult{Result Status}
EvalResult -- "Success (Exit 0)" --> Done["Forward Output & Exit 0"]
EvalResult -- "429 / Quota Exceeded" --> SetCooldown["Timestamp profile into .cooldown registry"]
SetCooldown --> Failover["Instant Failover: Retry on next healthy profile"]
Failover --> Execute
end📦 Installation
Windows PowerShell (Recommended)
irm https://raw.githubusercontent.com/popysenpai/antigravity-rotator/main/scripts/install.ps1 | iexLinux / macOS / Git Bash / WSL
curl -fsSL https://raw.githubusercontent.com/popysenpai/antigravity-rotator/main/scripts/install.sh | bashLocal Clone Installation
git clone https://github.com/popysenpai/antigravity-rotator.git
cd antigravity-rotator
# Windows
& .\scripts\install.ps1
# Linux / macOS / WSL
bash scripts/install.sh🚀 Quick Start Guide
1. Initialize Profile Pool (Optional - Auto-Initializes on First Run)
ag init 52. Authenticate Remaining Accounts
Authenticate each remaining account (opens the browser once per account to grant Google OAuth):
ag login 2
ag login 3
ag login 4
ag login 53. Check Pool Status
ag statusOutput:
================================================================================
Antigravity Multi-Account Profile Status (5 Profiles Configured)
Active Profile : acc1
Rotation Mode : round-robin
Storage Path : C:\Users\username\.antigravity_profiles
================================================================================
Profile | Google Account Email | Credentials | Status
--------------------------------------------------------------------------------
acc1 | [email protected] | OK | * ACTIVE (Ready)
acc2 | [email protected] | OK | Ready
acc3 | [email protected] | OK | Ready
acc4 | [email protected] | OK | Ready
acc5 | [email protected] | OK | Ready
================================================================================4. Start Coding!
# Launch interactive TUI session with active account
ag
# 🚀 Launch YOLO Mode (Zero permission prompts)
agyolo
# Run single-shot prompt with proactive load balancing
ag -p "Refactor authentication service and add unit tests"🛠️ CLI Command Reference
| Command | Category | Description | Example |
| :--- | :--- | :--- | :--- |
| ag / agcli | Execution | Launch Antigravity CLI with proactive load-balanced profile | ag |
| agyolo / ag yolo | Execution | YOLO Mode: Run with zero permission approval prompts | agyolo |
| ag status / list | Management | Show status table of all profiles, emails, health, & cooldowns | ag status |
| ag init [N] | Management | Initialize pool for $N$ accounts (default: 5) | ag init 10 |
| ag add | Management | Add a new account profile (acc(N+1)) and authenticate | ag add |
| ag remove <id> | Management | Safely remove a profile from the pool | ag remove 3 |
| ag switch <id> | Management | Explicitly lock active profile to <id> | ag switch 2 |
| ag next | Management | Manually advance to next healthy profile | ag next |
| ag mode [name] | Configuration | Set rotation mode: round-robin, budget, sticky | ag mode budget |
| ag threshold [N] | Configuration | Set request budget threshold for budget mode (default: 10) | ag threshold 15 |
| ag login <id> | Auth | Re-authenticate a specific profile | ag login 2 |
| ag cooldown clear | Maintenance | Clear all rate-limit cooldown locks | ag cooldown clear |
| ag sync-mcp | Maintenance | Re-synchronize global MCP servers and skills to all profiles | ag sync-mcp |
| ag --profile <id> <args> | Execution | Execute a command using a specific profile | ag --profile 3 -p "audit code" |
🔄 Rotation Modes Deep-Dive
1. round-robin (Default & Recommended)
Proactively alternates accounts on every single invocation ($1 \to 2 \to 3 \to \dots \to N \to 1$).
- How it works: Spreads request volume and token consumption uniformly across all accounts.
- Best for: Automated workflows, continuous subagent loops, and scripts where you want zero risk of hitting a burst limit.
2. budget
Uses each account for a configurable number of turns (e.g. threshold=10), then proactively rotates to a fresh account.
- How it works: Keeps context pinned to one account for multi-turn prompt chains, then switches before hitting rate-limit ceilings.
- Best for: Long interactive chat sessions.
3. sticky
Stays on the current account until a 429 quota exhaustion is detected, then instantly failovers to the next healthy account.
- Best for: Single-account preference with automatic emergency fallback.
🔌 MCP Server & Customization Synchronization
Antigravity Rotator uses native Windows NTFS Directory Junctions and Unix Symlinks so that you only configure MCP servers and plugins once:
~/.antigravity_profiles/acc[1..N]/.gemini/
├── oauth_creds.json <-- ISOLATED (Specific to Account 1..N)
├── google_accounts.json <-- ISOLATED (Specific to Account 1..N)
├── antigravity-cli/
│ ├── mcp_config.json <-- LINKED to ~/.gemini/antigravity-cli/mcp_config.json (SHARED)
│ ├── mcp/ <-- LINKED to ~/.gemini/antigravity-cli/mcp/ (SHARED)
│ └── settings.json <-- LINKED to ~/.gemini/antigravity-cli/settings.json (SHARED)
└── config/ <-- LINKED to ~/.gemini/config/ (SHARED plugins & skills)Adding an MCP server via /mcp or editing ~/.gemini/antigravity-cli/mcp_config.json is immediately active across all 1..100+ profiles!
📁 Storage Locations
| Item | Path on Windows | Path on Linux / macOS / WSL |
| :--- | :--- | :--- |
| Profile Storage | C:\Users\<user>\.antigravity_profiles\ | ~/.antigravity_profiles/ |
| Tool Installation | C:\Users\<user>\.antigravity-rotator\ | ~/.antigravity-rotator/ |
| Shared MCPs & Skills | C:\Users\<user>\.gemini\ | ~/.gemini/ |
| Shell Configuration | $PROFILE (PowerShell) | ~/.bashrc or ~/.zshrc |
🧪 Stress Testing & Reliability Verification
antigravity-rotator is subjected to automated chaos engineering and high-concurrency stress testing to guarantee 100% uptime:
# Run the automated reliability & stress test suite
pwsh -File tests/stress_test.ps1| Stress Test Scenario | Test Conditions | Result |
| :--- | :--- | :--- |
| High-Volume Rapid Rotation | 300 rapid sequential profile turns across 50 accounts | ✅ 100% Pass (~1.1s total, 0 lock contention) |
| Non-Contiguous Gap Jumping | Deleted random accounts (acc1, acc7, acc23, acc99) | ✅ 100% Pass (Seamless cycle: $1 \to 7 \to 23 \to 99 \to 1$) |
| Extreme Chaos Injection | Garbage text, negative integers, overflow numbers (999999999999999) | ✅ 100% Pass (Instant automatic self-healing) |
| 19-Account 429 Cascade | 19 out of 20 accounts simulated rate-limited | ✅ 100% Pass (Direct failover to 20th healthy profile) |
| Pool Exhaustion Countdown | All accounts exhausted | ✅ 100% Pass (Polite box with exact unlock countdown) |
| High-Velocity Turn Stress | 200 rapid turns | ✅ 100% Pass (0 state corruption) |
🐳 Docker Support
Run isolated in Docker:
docker compose up -d
docker compose exec antigravity-rotator ag status🤝 Contributing
Contributions, issues, and feature requests are welcome! Please check the Contributing Guide and Changelog.
📄 License
This project is licensed under the MIT License.
