ag-quota-0.1.0 is not a library.
Antigravity Account TUI
A Terminal User Interface (TUI) for monitoring Antigravity Claude Proxy account usage and quotas in real-time.
Features
- Real-time account monitoring - View all accounts with status, last used time, and quota reset times
- Model quota table - See per-model quota percentages for each account in a table format
- Auto-refresh - Data refreshes automatically every 30 seconds
- Keyboard navigation - Full keyboard control with vim-style bindings
- Color-coded status - Green for available, yellow for rate-limited, red for exhausted/invalid
- Wait time display - Shows remaining wait time for rate-limited quotas
Installation
Prerequisites
- Rust 1.70+ installed
- The Antigravity Claude Proxy server running on
localhost:8040
Build
The binary will be at ./target/release/ag-tui.exe (Windows) or ./target/release/ag-tui (Linux/macOS).
Usage
Run
# Direct run with cargo
# Run with custom URL
# Run with debug mode to see raw responses
# Or run the binary directly
# With custom URL
Command Line Options
ag-tui [OPTIONS]
Options:
-u, --url <URL> API URL to fetch account data from [default: http://localhost:8040/account-limits]
-d, --debug Enable debug mode to show raw responses
-h, --help Print help
-V, --version Print version
Keyboard Shortcuts
| Key | Action |
|---|---|
↑ / k |
Scroll up in models list |
↓ / j |
Scroll down in models list |
PgUp |
Page up (10 items) |
PgDn |
Page down (10 items) |
Home |
Go to top |
End |
Go to bottom |
r |
Refresh data manually |
a |
Toggle auto-refresh |
h or ? |
Show help popup |
q or Esc |
Quit |
Ctrl+C |
Force quit |
Layout
The TUI displays:
-
Header - Shows timestamp, account summary (total, available, rate-limited, invalid)
-
Accounts Table - Shows all accounts with:
- Account email (shortened)
- Status (ok, limited with count, invalid, disabled)
- Last used timestamp
- Quota reset time
-
Models Table - Shows model quotas with:
- Model name in first column
- Quota percentage for each account
- Color-coded: Green (>30%), Yellow (10-30%), Red (<10%)
- Wait time shown for rate-limited quotas (e.g., "0% (wait 1h23m45s)")
-
Footer - Keyboard shortcuts reference
API Endpoint
The TUI fetches data from:
http://localhost:8040/account-limits
Make sure your Antigravity Claude Proxy server is running before starting the TUI.
Dependencies
ratatui- Terminal UI frameworkcrossterm- Cross-platform terminal handlingreqwest- HTTP client for API callstokio- Async runtimeserde- JSON serializationchrono- Date/time handlingclap- Command line argument parsinganyhow- Error handling
Troubleshooting
"Failed to parse JSON" Error
If you see an error about JSON parsing:
- Check if the proxy is running: Make sure the Antigravity Claude Proxy is running on the expected port (default: 8040)
- Use debug mode: Run with
--debugflag to see the raw response - Check the URL: Verify the URL is correct with
--url - Test with curl: Try manually fetching data:
Connection Errors
If you see "Failed to connect to server":
- Verify the proxy is running:
npm startin the proxy directory - Check if the port is correct (default 8040)
- Make sure no firewall is blocking the connection
HTML Instead of JSON
If the error mentions "Server returned HTML instead of JSON", the endpoint might be returning an error page. Check that:
- The proxy server is fully initialized
- The
/account-limitsendpoint exists in your proxy version
License
MIT