PromptHub
Back to Blog
Developer Tools Open Source

skainguyen1412/antigravity-usage: Track Antigravity AI Quotas Across Accounts

B

Bright Coding

Author

11 min read 96 views
skainguyen1412/antigravity-usage: Track Antigravity AI Quotas Across Accounts

Developers working with Antigravity's AI models face a recurring operational headache: quota disappears unexpectedly, multiple Google accounts spread usage across different workspaces, and there's no straightforward way to monitor consumption without opening your IDE or logging into a web dashboard. For teams managing personal and work accounts, or anyone who wants to automate quota utilization, this friction adds up fast.

skainguyen1412/antigravity-usage addresses this directly. It's a fast, lightweight CLI tool written in TypeScript that tracks your Antigravity model quota and usage—either by tapping into your local IDE's connection or by authenticating with multiple Google accounts for broader visibility. With 352 GitHub stars, 42 forks, and an MIT license, it has gained traction among developers who prefer terminal-based workflows over context-switching to browsers. The project was last updated on February 24, 2026, suggesting active maintenance.

This article walks through what antigravity-usage does, how it works, and why its dual-mode architecture matters for developers who need reliable quota monitoring without workflow disruption.

What is skainguyen1412/antigravity-usage?

skainguyen1412/antigravity-usage is an open-source command-line interface tool built in TypeScript and distributed via npm. It falls into the category of developer utility CLIs—single-purpose tools that integrate into existing terminal workflows rather than requiring dedicated applications or browser tabs.

The project is maintained by skainguyen1412 and was inspired by ccusage, a similar quota-tracking tool. This lineage matters: it suggests the author identified a pattern (IDE-integrated AI tools lacking standalone quota visibility) and adapted the approach for Antigravity's specific architecture.

The tool's relevance stems from a structural problem in modern AI-assisted development. Antigravity, like several AI coding assistants, runs a local language server inside your IDE that communicates with cloud APIs. This server holds live quota data, but accessing it normally requires keeping your IDE open and navigating its interface. antigravity-usage extracts this data programmatically, then extends capability further by supporting direct Google Cloud Code API authentication for scenarios where IDE access isn't available or when managing multiple accounts.

The 352-star count (as of the last repository snapshot) indicates modest but genuine adoption—enough to suggest real-world utility without the noise of hype-driven projects. The MIT license permits commercial use, modification, and redistribution, which matters for teams considering internal tooling built on top of it.

Key Features

Dual-Fetch Architecture

The tool's core design is its "Dual-Fetch" strategy. Local Mode attempts connection to the Antigravity Language Server running inside your IDE (VSCode, JetBrains, etc.). If that fails or if you've explicitly requested multi-account data, it falls back to Cloud Mode via the Google Cloud Code API. Auto Mode handles this switching transparently.

Local Mode requires no authentication, works offline, and responds immediately since it uses loopback networking. The constraint: your IDE must be running.

Cloud Mode requires a one-time Google login but enables multi-account management, remote usage, and background automation. The trade-off is dependency on internet connectivity and valid auth tokens.

Multi-Account Management

For developers with personal and work Google accounts—or consultants managing client environments—the accounts subcommand provides:

  • Simultaneous quota fetching: antigravity-usage quota --all aggregates data across all authenticated accounts in a single table
  • Account switching: Set active credentials without re-authenticating
  • Local token storage: Auth tokens reside in standard system config directories, never transmitted to third-party servers

Auto Wakeup (macOS & Linux)

This feature addresses a specific Antigravity behavior: quotas reset approximately every 5 hours, and unused quota does not accumulate. The wakeup system:

  • Runs via native cron scheduling (no persistent processes)
  • Detects quota-reset timing to trigger models only when beneficial
  • Supports interval, daily, and custom cron expressions
  • Includes cooldown protection (1-hour default) to prevent duplicate triggers
  • Uses minimal token consumption (1 output token per request)

Platform limitation: Currently macOS and Linux only. Windows Task Scheduler support is marked as coming soon.

Smart Caching & Focused Output

Quota data caches for 5 minutes to reduce API load. The --refresh flag bypasses this when needed. By default, autocomplete models (like gemini-2.5-flash-002) are hidden since they typically share quota with their main counterparts; --all-models reveals them.

Use Cases

1. The Multi-Account Consultant

A freelancer works with three separate clients, each providing a distinct Google workspace with Antigravity access. Rather than logging into three browser sessions or maintaining three IDE windows, they run:

antigravity-usage quota --all

This produces a comparative table of quota consumption across all accounts, enabling time allocation decisions based on actual remaining capacity.

2. The Remote Developer on Limited Connectivity

Traveling with intermittent wifi, a developer needs to verify remaining quota before starting a long inference task. With their IDE already running locally:

antigravity-usage --method local

This works entirely offline, reading from the local language server without any cloud round-trip.

3. The Automation-Focused Power User

Someone maximizing Antigravity's value installs the wakeup scheduler:

antigravity-usage wakeup config
antigravity-usage wakeup install

This ensures models trigger automatically near quota-reset boundaries, converting otherwise-lost capacity into productive usage—particularly valuable for high-volume users hitting rate limits.

4. The CI/CD Pipeline Integrator

A team wants quota visibility in their deployment pipeline. The --json flag enables structured output:

antigravity-usage quota --json

This integrates with monitoring systems or Slack notifications without parsing human-readable tables.

5. The Security-Conscious Organization

Teams prohibiting browser-based authentication on production servers use the manual login flow:

antigravity-usage login --manual

This permits headless/SSH environments to obtain tokens without local browser access, satisfying security constraints while enabling automation.

Installation & Setup

Prerequisites

  • Node.js ≥ 18 (enforced by package engines)
  • npm or compatible package manager
  • For Local Mode: Antigravity extension installed in VSCode or JetBrains IDE
  • For Cloud Mode: Google account with Antigravity access

Global Installation

npm install -g antigravity-usage

Global installation places the antigravity-usage binary in your PATH, making it available from any directory.

Immediate Usage (No Authentication)

If Antigravity is active in your IDE:

antigravity-usage

This auto-detects the local language server and displays current quota. No configuration required.

Multi-Account Setup

# Authenticate primary account
antigravity-usage login

# For headless environments
antigravity-usage login --manual

# Add additional accounts
antigravity-usage accounts add

# Verify all accounts
antigravity-usage accounts list

The manual login flow generates an authentication URL you paste into a local browser, then copy the resulting token back to the terminal. This supports SSH sessions, containers, and remote servers without X11 forwarding.

Wakeup Scheduler Configuration

# Interactive setup (approximately 30 seconds)
antigravity-usage wakeup config

# Install to system crontab
antigravity-usage wakeup install

# Verify installation
antigravity-usage wakeup status

The configurator prompts for scheduling preferences, account selection, and model targets. The install command writes a crontab entry using the detected Node.js path for portability across machines.

Real Code Examples

Example 1: Basic Quota Check with Method Override

# Default: auto-detect (local first, cloud fallback)
antigravity-usage

# Force local IDE connection only
antigravity-usage --method local

# Force Google Cloud API only
antigravity-usage --method google

# Include all models (including autocomplete variants)
antigravity-usage --all-models

# Machine-readable JSON output for scripting
antigravity-usage --json

The --method flags are useful for debugging connection issues or enforcing security boundaries. A CI pipeline might use --method google with stored credentials, while a local workstation uses --method local for speed.

Example 2: Multi-Account Quota Aggregation

# Fetch and compare all authenticated accounts
antigravity-usage quota --all

This produces a side-by-side table showing quota usage, reset times, and remaining capacity per account. The comparison enables quick identification of which account has headroom for a large request.

Example 3: Wakeup Testing with Specific Parameters

# Test wakeup with explicit account and model
antigravity-usage wakeup test -e your@gmail.com -m claude-sonnet-4-5

# Full test with custom prompt
antigravity-usage wakeup test \
  --email your@gmail.com \
  --model gemini-3-flash \
  --prompt "hello"

# Partial flags (missing values prompted interactively)
antigravity-usage wakeup test -e your@gmail.com

The test command validates your wakeup configuration without waiting for the scheduled time. It exercises the full trigger pipeline: authentication, model selection, API request, and result logging.

Example 4: Account Lifecycle Management

# List all accounts with authentication status
antigravity-usage accounts list

# Switch active account for subsequent commands
antigravity-usage accounts switch work@company.com

# Remove account and delete stored tokens
antigravity-usage accounts remove old@deprecated.com

The switch subcommand changes the default account for quota queries without requiring --email flags. The remove command ensures clean credential revocation—important when offboarding team members or rotating access.

Advanced Usage & Best Practices

Cache Awareness: The 5-minute default cache prevents API rate limit exhaustion. For time-sensitive decisions, use --refresh sparingly—Google Cloud APIs have quotas of their own, and aggressive polling can trigger throttling.

Token Storage Security: Tokens reside in standard OS config directories (~/Library/Application Support/ on macOS, ~/.config/ on Linux, %APPDATA% on Windows). These locations receive appropriate filesystem permissions, but encrypted volumes or keychain integration are not currently implemented. High-security environments should evaluate this trade-off.

Cron Path Portability: The wakeup scheduler auto-detects Node.js path during installation. If you upgrade Node.js versions or use version managers (nvm, fnm), re-run antigravity-usage wakeup install to update the crontab entry. Otherwise scheduled runs fail with "node: command not found."

Model Selection for Wakeup: The documentation identifies three intelligent defaults—claude-sonnet-4-5, gemini-3-flash, and gemini-3-pro-low—that trigger quota groups comprehensively. Unless you have specific requirements, these defaults minimize configuration while maximizing coverage. Custom model IDs are supported but require understanding of Antigravity's internal quota grouping, which isn't fully documented in the README.

IDE Server Reliability: Local Mode depends on the Antigravity Language Server's availability. Some IDEs suspend background processes when the window loses focus or the machine sleeps. If quota queries fail unexpectedly, verify your IDE is active or switch to Cloud Mode.

Comparison with Alternatives

Tool Approach Multi-Account Offline Automation License
skainguyen1412/antigravity-usage CLI with dual local/cloud fetch Yes (built-in) Yes (local mode) Native cron wakeup MIT
ccusage (inspiration) CLI for Cursor IDE quotas Unknown Unknown Unknown Unknown
Browser dashboard Web UI Manual login switching No None (manual) Proprietary
Custom API scripts Self-built Implement yourself Possible Implement yourself Your own code

ccusage directly inspired this project and likely shares architectural DNA, but its README doesn't document multi-account or automation features comparable to antigravity-usage's wakeup system. The browser dashboard requires no installation but demands context-switching and offers no programmatic access. Custom scripts provide maximum flexibility at the cost of development and maintenance time.

The key differentiator for antigravity-usage is workflow integration depth: it meets developers where they already work (the terminal) and extends to background automation without additional infrastructure.

FAQ

Does this work without installing Antigravity in my IDE?

Cloud Mode works independently, but Local Mode requires the Antigravity extension running in VSCode or JetBrains.

Can I use this on Windows?

Core functionality works on Windows. The wakeup scheduler currently supports macOS and Linux only; Windows Task Scheduler integration is planned.

Where are my Google tokens stored?

Locally in standard OS config directories. They never transit through the tool's servers or third parties.

How often does quota data refresh?

Cached for 5 minutes by default. Use --refresh to force immediate fetch.

Is there a cost to use this tool?

The CLI is MIT-licensed and free. You still consume your Antigravity API quota normally.

What happens if my IDE is closed?

Auto Mode falls back to Cloud Mode. If unauthenticated, it prompts for login.

Can I export quota history?

The wakeup command tracks trigger history (antigravity-usage wakeup history). General quota history export isn't documented in the current README.

Conclusion

skainguyen1412/antigravity-usage solves a specific, well-defined problem for Antigravity users: quota visibility and automation across multiple accounts without leaving the terminal. Its dual-fetch architecture respects different operational contexts—offline IDE-tethered work versus cloud-connected multi-account management—while the wakeup scheduler addresses a genuine economic incentive (maximizing quota utilization against time-bound resets).

The tool fits developers who: manage multiple Google identities, prefer CLI workflows over browser dashboards, run automated or scheduled workloads, or need offline quota checks during travel. It's less relevant for single-account users content with IDE-integrated displays, or those exclusively on Windows seeking full automation today.

With 352 stars, active maintenance through early 2026, and permissive MIT licensing, it represents a pragmatic addition to the AI-assisted development toolchain. For teams building internal automation or individuals optimizing their Antigravity consumption, the project warrants evaluation.

Explore the repository, review the source, and install via npm: https://github.com/skainguyen1412/antigravity-usage

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

Recommended Prompts

View All
All tools