Skip to content

About

Multi-account Google Antigravity CLI quota monitoring & telemetry engine - isolated containers & centralized API

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GravWatch

GravWatch

Multi-account Google Antigravity CLI quota monitoring & telemetry engine - isolated containers & centralized API

Version 2.7.0

License Python FastAPI Next.js Docker Stars


🌐 Language

πŸ‡¬πŸ‡§ English Β· πŸ‡ΈπŸ‡¦ Ψ§Ω„ΨΉΨ±Ψ¨ΩŠΨ©


πŸ“‹ Table of Contents


πŸ€” What is GravWatch?

GravWatch is a lightweight, distributed telemetry and quota aggregation engine built specifically for the Google Antigravity CLI (agy). It runs multiple isolated Google accounts concurrently inside minimal headless Docker containers (debian:bookworm-slim, capped at ~256MB RAM per container) to completely eliminate OAuth session conflicts.

Each containerized agent periodically parses quota metrics for Gemini Flash, Gemini Pro, Claude Sonnet, Claude Opus, and GPT OSS, and streams telemetry to a central FastAPI hub, calculating pooled capacity across all developer accounts in real time.


🧭 Why GravWatch Exists

Problem Standard Workarounds GravWatch
OAuth Session Collisions ❌ Switching accounts locally overwrites tokens βœ… Strict process & volume isolation per container (./data/acc-X)
Resource Overhead ❌ Heavy VMs consuming 4GB+ RAM βœ… Ultra-light Debian slim containers (256MB RAM & 0.25 vCPU cap)
Fragmented Visibility ❌ Checking quotas one by one in terminal βœ… Unified pooled capacity across all active developer accounts
Model Tracking Limits ❌ Manual estimation of model quotas βœ… Automated parsing for Gemini Flash, Gemini Pro, Claude Sonnet, Claude Opus, and GPT OSS
Zero Maintenance ❌ Complex setups requiring desktop GUIs βœ… Headless terminal-first daemon running in background

πŸ“Έ Screenshots

Overview Telemetry Dashboard

GravWatch Overview Dashboard

Multi-Account Cluster & Quotas Grid

GravWatch Multi-Account Management

Individual Account Metrics & 5-Hour Countdown

GravWatch Account Metrics Card

✨ Highlights

  • πŸ”’ Zero Token Collisions: True multi-account isolation with persistent Docker volume mounts for arbitrary $N$ accounts.
  • ⚑ Minimal Footprint: Strict memory limits (256MB RAM) and CPU caps (0.25 vCPU) per container node.
  • πŸ€– Smart Telemetry Parser: Resilient parser tracking Gemini Flash, Gemini Pro, Claude Sonnet, Claude Opus, and GPT OSS.
  • πŸ“Š Aggregated Quota Pool: Calculates pooled requests, limits, and combined utilization percentage across all accounts.
  • πŸš€ REST API Hub: FastAPI async backend providing real-time telemetry endpoints and interactive Swagger docs.

πŸ“Š Status

Component Technology Target State
Account Isolation Docker Compose (debian:bookworm-slim) Multi-account token sandboxing Stable
Agent Collector Python 3.11 (subprocess + requests) Headless quota daemon Stable
API Server FastAPI + SQLAlchemy (Async) Central telemetry ingestion hub Stable
Web Dashboard Next.js 16 + Tailwind CSS v4 + TypeScript Interactive telemetry visualization & quota management Stable
Android App Jetpack Compose + Material 3 Mobile quota monitoring client Coming Soon

⚑ Quick Start

# Clone the repository
git clone https://github.com/shadow-x78/grav-watch.git ~/GravWatch
cd ~/GravWatch

# Configure environment and dependencies (Python + Web client)
./scripts/setup-dev-env.sh

# Interactive OAuth account pairing assistant
./scripts/setup-auth.sh

# Start the multi-account stack (Server + Web + Agents)
docker compose -f packaging/docker/docker-compose.yml up -d

# Or run the Web Dashboard locally:
npm --prefix clients/web run dev

⌨️ Commands

Command Description
./scripts/setup-dev-env.sh Set up Python development environment, web client dependencies, and data directories
./scripts/setup-auth.sh Interactive Google OAuth account pairing assistant
npm --prefix clients/web run dev Start the Next.js Web Dashboard locally (Port 3000)
docker compose -f packaging/docker/docker-compose.yml up -d Build and start all containers (Server, Web UI, and Agents) via Docker Compose
docker compose -f packaging/docker/docker-compose.yml ps Check container statuses
docker compose -f packaging/docker/docker-compose.yml logs -f Stream container logs in real time
docker compose -f packaging/docker/docker-compose.yml down Stop all running containers
./scripts/uninstall.sh Clean removal of containers, volumes, and temporary caches
python3 -m unittest discover -s tests -v Run all unit and integration test suites
docker compose -f packaging/docker/docker-compose.yml logs -f server

πŸ–₯️ Clients Ecosystem

πŸ–₯️ Web Dashboard

A modern, rich browser dashboard built with Next.js 16 + Tailwind CSS v4 + TypeScript + Recharts + Lucide visualizing live telemetry metrics, account states, twin-tier quota gauges (Weekly & 5-Hour limits), and bilingual (English/Arabic) UI support.

πŸ“± Android App (Coming Soon)

A native Material 3 + Jetpack Compose companion app for Android tablets and smartphones, connecting directly to the GravWatch API hub with quick glance widgets and status cards.


πŸ—οΈ Architecture

grav-watch/
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ server/                 # FastAPI hub, database, models, engine, and routes
β”‚   β”‚   β”œβ”€β”€ api/                # route handlers (health, usage, accounts)
β”‚   β”‚   β”œβ”€β”€ core/               # config, database engine, security
β”‚   β”‚   β”œβ”€β”€ engine/             # pool aggregator and math engine
β”‚   β”‚   β”œβ”€β”€ models/             # database tables and Pydantic schemas
β”‚   β”‚   └── main.py             # minimal application entrypoint
β”‚   └── agent/                  # container daemon and quota scrapers
β”‚       β”œβ”€β”€ collector/          # CLI command runner and ANSI table parser
β”‚       β”œβ”€β”€ core/               # agent configuration
β”‚       β”œβ”€β”€ mock/               # 5-model mock telemetry generator
β”‚       └── agent.py            # autonomous scraping daemon
β”œβ”€β”€ clients/
β”‚   β”œβ”€β”€ web/                    # upcoming browser telemetry dashboard
β”‚   └── android/                # upcoming native Material 3 Compose app
β”œβ”€β”€ packaging/
β”‚   └── docker/                 # Docker Compose, Dockerfiles, entrypoint.sh
β”œβ”€β”€ data/                       # brand vector and raster identities
β”œβ”€β”€ docs/                       # complete bilingual documentation
β”œβ”€β”€ scripts/                    # setup, auth, and uninstall scripts
β”œβ”€β”€ tests/                      # unit and integration test suites
β”œβ”€β”€ .github/                    # CI workflows, templates, dependabot
β”œβ”€β”€ .editorconfig, .gitignore, .gitattributes
β”œβ”€β”€ .env.example                # master environment template
β”œβ”€β”€ pyproject.toml              # PEP 621 package metadata
└── README.md, README_AR.md, CONTRIBUTING.md, CHANGELOG.md, SECURITY.md, LICENSE
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  gravwatch-server (FastAPI async hub, port 8000)                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”‚
β”‚  β”‚ models/      β”‚  β”‚ core/        β”‚  β”‚ engine/           β”‚                β”‚
β”‚  β”‚ tables & pyd β”‚  β”‚ config & db  β”‚  β”‚ pool aggregator   β”‚                β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”‚
β”‚  β”‚ api/ (Central REST API Engine: /usage, /latest)       β”‚                β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β–²                  β–²                    β–²                    β–²
       β”‚                  β”‚                    β”‚                    β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
β”‚ container-01β”‚    β”‚ container-02β”‚      β”‚ container-03β”‚      β”‚ container-N β”‚
β”‚ acc-1       β”‚    β”‚ acc-2       β”‚      β”‚ acc-3       β”‚      β”‚ acc-N       β”‚
β”‚ agy agent   β”‚    β”‚ agy agent   β”‚      β”‚ agy agent   β”‚      β”‚ agy agent   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“š Documentation

Document Description
docs/ARCHITECTURE.md Β· AR System topology, telemetry ingestion & multi-account container isolation
docs/INSTALL.md Β· AR Multi-account container setup, OAuth pairing & quick start
docs/PACKAGING.md Β· AR Container specifications, resource quotas & volume isolation
docs/API_SPEC.md Β· AR REST API endpoints, JSON payloads & model contracts
docs/TROUBLESHOOTING.md Β· AR Auth tokens recovery, network diagnostics & container issues
SECURITY.md Security model, token isolation & vulnerability reporting
CHANGELOG.md Full release history
CONTRIBUTING.md Guidelines for contributing and code conventions

🀝 Contributing

Please read our Contributing Guidelines for details on how to set up the development environment, format your code, and submit Pull Requests.

When committing, follow the convention:

grav-watch | <scope>: <message>

For example:

grav-watch | parser | regex: support gpt oss table layout
grav-watch | docs | readme: clarify OAuth token persistence
grav-watch | v2.0.0 | release: major production release

πŸ“œ License

Distributed under the GPL-3.0 License.


Built by shadow-x78 & mohmed-hegaze Β· Changelog Β· Security

Β© 2026 GravWatch

About

Multi-account Google Antigravity CLI quota monitoring & telemetry engine - isolated containers & centralized API

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages