Antigravity Balance
Check your Antigravity AI model quota and token balance.
Quick Start
CODEBLOCK0
How It Works
- 1. Process Detection: Finds the running
language_server_macos_arm (or platform equivalent) process - Extracts Connection Info: Parses
--extension_server_port and --csrf_token from process args - Port Discovery: Scans nearby ports to find the HTTPS API endpoint (typically extensionPort + 1)
- Queries Local API: Hits INLINECODE3
- Displays Quota: Shows remaining percentage, reset time, and model info
Output Format
Default output shows:
- - User name, email, and tier
- Model name and remaining quota percentage
- Visual progress bar (color-coded: green >50%, yellow >20%, red ≤20%)
- Reset countdown (e.g., "4h 32m")
JSON output (--json) returns structured data:
CODEBLOCK1
Requirements
- - Node.js (uses built-in
https module) - Antigravity (or Windsurf) must be running
Troubleshooting
If the script fails:
- 1. Ensure Antigravity/Windsurf is running
- Check if the language server process exists: INLINECODE6
- The process must have
--app_data_dir antigravity in its args (distinguishes from other Codeium forks)
Platform-Specific Process Names
| Platform | Process Name |
|---|
| macOS (ARM) | INLINECODE8 |
| macOS (Intel) |
language_server_macos |
| Linux |
language_server_linux |
| Windows |
language_server_windows_x64.exe |
反重力平衡
检查你的反重力AI模型配额和令牌余额。
快速开始
bash
检查配额(自动检测本地反重力进程)
node scripts/agquota.js
JSON格式输出便于解析
node scripts/agquota.js --json
详细输出(调试用)
node scripts/agquota.js -v
工作原理
- 1. 进程检测:查找正在运行的languageservermacosarm(或对应平台版本)进程
- 提取连接信息:从进程参数中解析--extensionserverport和--csrftoken
- 端口发现:扫描邻近端口以找到HTTPS API端点(通常为extensionPort + 1)
- 查询本地API:访问https://127.0.0.1:{port}/exa.languageserverpb.LanguageServerService/GetUserStatus
- 显示配额:展示剩余百分比、重置时间和模型信息
输出格式
默认输出显示:
- - 用户名、邮箱和等级
- 模型名称和剩余配额百分比
- 可视化进度条(颜色编码:绿色>50%,黄色>20%,红色≤20%)
- 重置倒计时(例如:4小时32分钟)
JSON输出(--json)返回结构化数据:
json
{
user: { name: ..., email: ..., tier: ... },
models: [
{ label: Claude Sonnet 4.5, remainingPercent: 80, resetTime: ... }
],
timestamp: 2026-01-28T01:00:00.000Z
}
系统要求
- - Node.js(使用内置的https模块)
- 必须正在运行反重力(或Windsurf)
故障排除
如果脚本运行失败:
- 1. 确保反重力/Windsurf正在运行
- 检查语言服务器进程是否存在:ps aux | grep languageserver
- 进程参数中必须包含--appdata_dir antigravity(用于区分其他Codeium分支)
平台特定进程名称
| 平台 | 进程名称 |
|---|
| macOS(ARM) | languageservermacosarm |
| macOS(Intel) |
languageserver_macos |
| Linux | language
serverlinux |
| Windows | language
serverwindows_x64.exe |