🚀 Check your Antigravity AI usage quota from terminal
This tool is designed to be transparent and safe:
- ✅ Local only - Only connects to
localhost(Antigravity local server) - ✅ No network calls - Does NOT send any data to external servers
- ✅ No telemetry - No tracking, analytics, or data collection
- ✅ Open source - All code is public and auditable
- ✅ CodeQL scanned - Automatically scanned for security vulnerabilities
💡 You can review the install scripts before running them.
- Detects the running Windsurf language server process
- Extracts connection parameters (port, CSRF token) from process arguments
- Calls the local API at
127.0.0.1to fetch quota data - Parses and displays the information in terminal
Note: This tool only reads publicly available process information and communicates with localhost. No external network requests are made.
Quota Precision: The Antigravity Local API typically updates usage statistics at specific milestones (e.g., 0%, 20%, 40%, 60%, 80%).
- This is a limitation of the local API that this tool relies on.
- Other tools may show more granular percentages by hooking directly into the IDE's internal event stream or CLI token counter, which is a different approach than the safe, read-only API method used by this tool.
Windows (PowerShell):
iwr https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.ps1 -OutFile $env:TEMP\install.ps1; . $env:TEMP\install.ps1💡 If you get "running scripts is disabled" error, run:
powershell -ExecutionPolicy Bypass -Command "iwr https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.ps1 -OutFile $env:TEMP\install.ps1; & $env:TEMP\install.ps1"
macOS / Linux (Bash):
curl -fsSL https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.sh | bashThen run:
agusageRun the install command again to update to the latest version.
Windows:
powershell -ExecutionPolicy Bypass -Command "iwr https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.ps1 -OutFile $env:TEMP\install.ps1; & $env:TEMP\install.ps1 -Version 0.5.0"macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.sh | bash -s -- -v 0.5.0-
Download from Releases
- Windows:
antigravity-usage-checker-windows-amd64.zip - macOS Intel:
antigravity-usage-checker-darwin-amd64.tar.gz - macOS Apple Silicon:
antigravity-usage-checker-darwin-arm64.tar.gz - Linux:
antigravity-usage-checker-linux-amd64.tar.gz
- Windows:
-
Extract the archive to a folder of your choice
-
Run the executable:
- Windows: Double-click
agusage.exeor run from terminal - macOS/Linux: Run
chmod +x agusagefirst, then./agusage
- Windows: Double-click
-
(Optional) Add to PATH for global access:
- Windows:
- Move
agusage.exeto a folder (e.g.,C:\Tools\) - Press
Win + R, typesysdm.cpl, press Enter - Go to Advanced → Environment Variables
- Under User variables, select
Path→ Edit → New - Add your folder path (e.g.,
C:\Tools) → OK - Restart your terminal
- Move
- macOS/Linux: Move to
/usr/local/bin/(recommended):Or add custom folder to PATH insudo mv agusage /usr/local/bin/
~/.bashrcor~/.zshrc:export PATH="$PATH:/path/to/your/folder"
- Windows:
⚠️ Antigravity must be running
- 🎨 Color-coded display - Green when quota is healthy (>50%), yellow when moderate (>20%), red when low
- 📊 Smart total calculation - Automatically detects and deduplicates shared quota pools
- 🔄 Unicode progress bars - Beautiful █ and ░ characters for visual progress
- ⚡ Fast and lightweight - Written in Go, single binary, no dependencies
- 💾 Offline cache - Works even when Antigravity is not running
agusage # Show quota (or use 'agu' for short)
agu # Shorthand alias for agusage
agusage --json # JSON output
agusage --help # Help| Platform | Status |
|---|---|
| Windows | ✅ Fully tested |
| macOS | ✅ CI tested |
| Linux | ✅ CI tested |
| Linux | ✅ CI tested |
Want to contribute? Read the Development Guide.
Độ chính xác Quota: API nội bộ của Antigravity thường chỉ cập nhật thống kê sử dụng theo các mốc nhất định (ví dụ: 0%, 20%, 40%, 60%, 80%).
- Đây là giới hạn của API mà tool này sử dụng.
- Các công cụ khác có thể hiển thị phần trăm chi tiết hơn bằng cách can thiệp trực tiếp vào luồng sự kiện của IDE hoặc đếm token, cách tiếp cận này khác với phương pháp gọi API an toàn (read-only) mà tool này sử dụng.
Windows (PowerShell):
iwr https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.ps1 -OutFile $env:TEMP\install.ps1; . $env:TEMP\install.ps1💡 Nếu gặp lỗi "running scripts is disabled", chạy:
powershell -ExecutionPolicy Bypass -Command "iwr https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.ps1 -OutFile $env:TEMP\install.ps1; & $env:TEMP\install.ps1"
macOS / Linux (Bash):
curl -fsSL https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.sh | bashSau đó chạy:
agusageChạy lại lệnh cài đặt để cập nhật lên phiên bản mới nhất.
Windows:
iwr https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.ps1 -OutFile $env:TEMP\install.ps1; . $env:TEMP\install.ps1 -Version 0.5.0macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/tungcorn/antigravity-usage-checker/main/install.sh | bash -s -- -v 0.5.0-
Tải từ Releases
- Windows:
antigravity-usage-checker-windows-amd64.zip - macOS Intel:
antigravity-usage-checker-darwin-amd64.tar.gz - macOS Apple Silicon:
antigravity-usage-checker-darwin-arm64.tar.gz - Linux:
antigravity-usage-checker-linux-amd64.tar.gz
- Windows:
-
Giải nén file vào thư mục bạn chọn
-
Chạy chương trình:
- Windows: Double-click
agusage.exehoặc chạy từ terminal - macOS/Linux: Chạy
chmod +x agusagetrước, sau đó./agusage
- Windows: Double-click
-
(Tùy chọn) Thêm vào PATH để chạy từ mọi nơi:
- Windows:
- Di chuyển
agusage.exevào thư mục (ví dụ:C:\Tools\) - Nhấn
Win + R, gõsysdm.cpl, nhấn Enter - Chọn tab Advanced → Environment Variables
- Trong User variables, chọn
Path→ Edit → New - Thêm đường dẫn thư mục (ví dụ:
C:\Tools) → OK - Khởi động lại terminal
- Di chuyển
- macOS/Linux: Di chuyển vào
/usr/local/bin/(khuyến nghị):Hoặc thêm thư mục tùy chọn vào PATH trongsudo mv agusage /usr/local/bin/
~/.bashrchoặc~/.zshrc:export PATH="$PATH:/path/to/your/folder"
- Windows:
⚠️ Antigravity phải đang chạy
- 🎨 Màu sắc thông minh - Xanh lá khi quota còn nhiều (>50%), vàng khi trung bình (>20%), đỏ khi sắp hết
- 📊 Tính tổng thông minh - Tự động phát hiện và loại bỏ trùng lặp các quota pools dùng chung
- 🔄 Progress bar Unicode - Ký tự █ và ░ đẹp mắt cho thanh tiến độ
- ⚡ Nhanh và nhẹ - Viết bằng Go, binary đơn giản, không cần dependencies
- 💾 Cache offline - Hoạt động ngay cả khi Antigravity không chạy
agusage # Xem quota (hoặc dùng 'agu' cho ngắn gọn)
agu # Tên rút gọn của agusage
agusage --json # Xuất JSON
agusage --help # Trợ giúp| Nền tảng | Trạng thái |
|---|---|
| Windows | ✅ Đã test đầy đủ |
| macOS | ✅ Đã test CI |
| Linux | ✅ Đã test CI |
Bạn muốn đóng góp? Xem Hướng dẫn phát triển.
MIT © 2024-present
If you find this useful, give it a ⭐!
