agy-switch
by jack101a
README.md
# ā” agy-switch
> **The modern multi-account controller, live AI quota monitor, and MCP server for Google Antigravity.**
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org)
[](https://modelcontextprotocol.io)
---
## ⨠Features
- š± **Mobile & Desktop Responsive TUI**: Automatically adapts to narrow mobile viewports (< 55 cols) on Termux, SSH, and web terminals with zero distortion.
- š **Mouse & Touch Tap Support**: Click or tap directly on any account card in terminal to switch instantly.
- ā” **Single-Key Quick Switch**: Press `1`-`9` to switch active profiles in a single keypress.
- ā±ļø **Live Relative Reset Countdowns**: View exact time remaining until quota refresh (e.g. `ā³ Resets in 4h 38m (Sat 05:03 AM)`).
- š **Native Antigravity MCP Server**: Ask Antigravity in chat to switch accounts or check remaining quota.
- š **Mobile-Friendly Web Dashboard**: Optional browser dashboard (`http://0.0.0.0:7823`) with remote QR/browser sign-in.
- š ļø **Scriptable CLI**: Full command-line interface with `--json` support for piping into shell scripts.
---
## šø TUI Preview
```text
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā” AG SWITCHBOARD ā Multi-Account AI Quota Controller ā
ā Select account to activate ⢠Press [a] to add, [d] to remove
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā
ACTIVE ACCOUNT ā
[1] Zero One (user@gmail.com) [Google AI Pro]
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Claude Sonnet 4.6 āāāāāāāāāā 54% Resets: in 4h 38m (Sat 05:03 AM)
ā Gemini 3.7 Flash āāāāāāāāāā 6% Resets: in 4h 22m (Sat 04:47 AM)
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā¶ SELECTED [2] Work Account (work@domain.com) [Google AI Pro] [Press 2/ENTER to Switch]
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Claude Sonnet 4.6 āāāāāāāāāā 100% ā Resets: in 18h 59m (Sat 07:26 PM)
ā Gemini 3.7 Flash āāāāāāāāāā 92% Resets: in 4d 11h (Wed 11:58 AM)
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā [1-9] Quick Switch [a] Add Account [d] Remove Account [r] Refresh [w] Web Dashboard [q] Exit
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
```
---
## š Installation & Usage
### 1. Install Globally (Direct from GitHub)
```bash
npm install -g jack101a/agy-switch
```
Then run anytime:
```bash
agy-switch
```
### 2. Run Directly with NPX (Zero install)
```bash
npx github:jack101a/agy-switch
```
### 3. Install from Source
```bash
git clone https://github.com/jack101a/agy-switch.git
cd agy-switch
npm install
npm run build
./bin/agy-auth.js
```
---
## š® Interactive TUI Controls
| Hotkey | Action |
| :--- | :--- |
| **`1` - `9`** | **Instant 1-key switch** to account `1`, `2`... |
| **`ā` / `ā`** | Navigate between accounts |
| **Click / Tap** | Select and activate account directly with mouse or touch |
| **`Enter` / `Space`** | Activate highlighted account |
| **`a`** | **Add new Google account** (in-terminal OAuth prompt) |
| **`d`** or **`x`** | **Disconnect / remove** highlighted account |
| **`r`** | Live refresh quotas from Google Cloud |
| **`w`** | Launch local web dashboard on `http://0.0.0.0:7823` |
| **`q`** / **`Esc`** | Exit |
---
## š» CLI Commands
| Command | Usage | Description |
| :--- | :--- | :--- |
| `agy-switch` | `agy-switch` | Launch full interactive TUI dashboard |
| `agy-switch list` | `agy-switch list [--json]` | List connected accounts & active status |
| `agy-switch switch` | `agy-switch switch <name\|#>` | Switch active account instantly |
| `agy-switch quota` | `agy-switch quota [name\|#]` | Detailed model quota table with reset countdowns |
| `agy-switch add` | `agy-switch add` | Connect a new Google account via OAuth |
| `agy-switch remove` | `agy-switch remove <name\|#>` | Disconnect an account |
| `agy-switch dashboard` | `agy-switch dashboard` | Start local web dashboard on port `7823` |
| `agy-switch help` | `agy-switch help` | Display CLI help menu |
---
## š Antigravity 2.0 MCP Integration
Add `agy-switch` to your `~/.gemini/config/mcp_config.json` (or Claude Desktop / Cursor):
```json
{
"mcpServers": {
"agy-switch": {
"command": "node",
"args": ["/path/to/agy-switch/dist/mcp-server.js"]
}
}
}
```
Now you can control accounts directly in your AI chat:
- *"What is my remaining quota on Claude and Gemini?"*
- *"Switch active account to Zero One"*
- *"List all connected accounts"*
---
## š License
MIT Ā© 2026 Antigravity Community
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues