← Back to agyr home

How to Use Multiple Google Accounts with Antigravity CLI

Developers running intensive coding sessions on Antigravity CLI often encounter rate limits. A single Google account provides rolling five-hour and weekly quotas that can exhaust when processing large codebases or executing sub-agent loops. Rather than stopping work or routing traffic through reverse proxy daemons, you can configure multiple Google accounts on your local workstation. The open-source agyr CLI utility provides local credential slot management and automated failover across Google accounts. It runs the official agy binary directly on your machine with no proxy in the request path. This setup guide explains how to install agyr, save account profiles, inspect live quotas, switch active credentials on demand, and automate 429 quota rotation without losing session context.

1. Install agyr on Linux or Windows

The agyr utility runs as a lightweight shell wrapper with zero continuous background resource consumption. It contains no persistent background daemons and consumes 0 MB of RAM while idle. It interfaces directly with Google's official agy binary installed on your workstation, maintaining authentic client TLS fingerprints. To install agyr, run the official installation command:

curl -fsSL https://agyr.luongtrz.id.vn/install.sh | bash

The installer sets up the agyr, agy-run, and agy-task commands for your user, with a Linux backend and a Windows backend (Git Bash plus .cmd wrappers).

2. Register Account Slots with agyr save and agyr forget

To register your primary Google account, run agyr without arguments to launch Google's official browser OAuth login:

# Opens browser for account 1
agyr

# Save credentials into slot 'acc1'
agyr save acc1

After completing sign-in in your browser, run agyr save acc1 to copy active session tokens into slot acc1 under ~/.gemini/antigravity-cli/accounts/. The saved slot ensures your primary login remains accessible whenever you need to rotate back to it.

The agy tool keeps one active login at a time, and agyr stores additional logins as named slots. To add a second account, clear the active login without deleting saved profiles using agyr forget:

# Safely clears active login (acc1 is safe)
agyr forget

# Sign in to account 2 in browser
agyr

# Save credentials into slot 'acc2'
agyr save acc2

To prevent accidental credential loss, agyr forget refuses to drop unsaved tokens unless you pass the -f force flag (agyr forget -f). After clearing the session, run agyr to open a fresh Google sign-in window. Authenticate with your second account and run agyr save acc2. Repeat this process for any additional accounts.

3. Inspect Live Quotas Across Saved Accounts

Before launching intensive tasks, check available capacity across all configured profiles. The agyr list command queries Google servers in parallel to display remaining quotas:

# Real-time multi-account dashboard
agyr list

# Fast cached quota inspection without calling agy binary
agyr list -c

# Include Claude and secondary model quotas
agyr list --claude

The terminal output presents rolling five-hour and weekly percentages with color-coded health indicators: green indicates healthy capacity above 40%, yellow marks moderate levels between 11% and 40%, and red highlights exhausted quotas at or below 10%. To check status without spawning network probes, agyr list -c reads cached usage values from local disk. When using extended models, agyr list --claude adds columns for Claude five-hour and weekly limits alongside Gemini and Argon quotas.

4. Switch Accounts and Automate 429 Failover

When working in an interactive terminal, switch your active account at any time using agyr use:

# Switch active account
agyr use acc1

The command swaps local session credentials atomically with automated backup safeguards to prevent file corruption.

For headless autonomous tasks or orchestrator runs, use agy-run to handle HTTP 429 quota limits automatically:

# Automated execution with 429 failover
agy-run --add-dir . \
  --prompt "Refactor database queries and add indexes"

When an active account hits quota exhaustion, agy-run terminates the process, places the slot on cooldown, and selects the next account using bottleneck heuristics based on min(Gemini 5h, Week). It resumes the task using agy --conversation <existing-conversation-id>. Because Antigravity CLI preserves session state on disk, the replacement account continues execution without losing context. If all accounts reach exhaustion simultaneously, agyr and agy-run exit with code 5 (or code 3 during interactive rotation) and display the earliest reset timestamp in your local timezone.

5. Token Storage Security and Platform Backends

Credential management operates under strict local security boundaries:

Related Guides and Resources