antigravity-kit
v0.0.6
Published
CLI toolkit to manage antigravity IDE rules and commands
Maintainers
Readme
✨ Features
- 🔐 Multi-account support - Manage multiple Google accounts for Antigravity IDE
- ⚡ Quick switching - Switch between profiles in seconds
- 💾 Profile backup - Each profile is stored separately with all settings intact
- 🖥️ Cross-platform - Works on macOS, Linux, and Windows
- 🔑 OAuth authentication - Secure Google sign-in with automatic token storage
- 📊 Quota monitoring - Real-time quota tracking with auto-refresh
- 🔒 Keychain storage - Secure token storage in macOS Keychain
📦 Installation
# Using npm
npm install -g antigravity-kit
# Using pnpm
pnpm add -g antigravity-kit
# Using yarn
yarn global add antigravity-kit🎯 Quick Start
# Interactive menu - select from available actions
agk auth
# Or use direct commands:
agk auth add # Add your first account
agk auth list # List all profiles
agk auth switch # Switch to a different profile
agk auth quota # Monitor quota usage
agk upgrade # Upgrade to latest version📖 Commands
The CLI can be invoked using any of these aliases:
antigravity-kitantigravikitagk(recommended - shortest)
auth add
Add a new Google Antigravity account profile.
# Default: OAuth sign-in (opens browser)
agk auth add
# Manual: IDE-based login
agk auth add --manual
# Force file storage instead of Keychain
agk auth add --insecureOptions:
| Flag | Description |
| ------------ | ------------------------------------------------------------- |
| --manual | Use manual IDE login instead of OAuth (opens Antigravity IDE) |
| --insecure | Store tokens in local file instead of macOS Keychain |
How it works:
OAuth Flow (default):
- Opens your browser for Google sign-in
- Captures authentication and creates a profile
- Stores refresh token securely (Keychain on macOS)
- Shows available quota for the account
Manual Flow (--manual):
- If an existing Antigravity login is detected, you'll be prompted to add it as a profile
- If no login exists, Antigravity IDE will open for you to sign in
- The CLI watches for authentication and saves your profile automatically
Example output:
◆ Add a new account
This will:
1. Open your browser for Google sign-in
2. Capture your login and create a profile
3. Store tokens for quota checking
🔐 Tokens will be stored in macOS Keychain
Saving profile...
┌ Profile Created ─────────────────────────────┐
│ │
│ Email: [email protected] │
│ Profile: ~/.antigravity-kit/profiles/... │
│ Status: Active │
│ Quota: 5 models available │
│ │
└──────────────────────────────────────────────┘
✔ Account [email protected] added successfully!auth list
List all saved Google Antigravity profiles.
agk auth listExample output:
◆ Saved Profiles
Email OAuth Storage Claude Gemini Size Created
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
● [email protected] ✓ 🔐 100% 80% (2h45m) 45.2 MB Dec 15, 2024
○ [email protected] ✓ 🔐 — — 38.7 MB Dec 10, 2024
○ [email protected] ✗ — — — 42.1 MB Nov 28, 2024
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
Active: [email protected]
Legend: ● Active ✓ OAuth 🔐 Keychain N% Quota (reset)
Total: 3 profiles
⟳ Auto-refresh in 30s | Press 'r' to reload | Press 'q' to exitLegend:
●(green) - Active profile○(dim) - Inactive profile✓- OAuth token stored (quota checking enabled)✗- No OAuth token (added with--manual)🔐- Token stored in KeychainN%- Quota usage percentage (with reset time if available)
auth switch
Switch between Google Antigravity profiles.
# Interactive selection
agk auth switch
# With workspace options
agk auth switch --workspace select # Choose workspace interactively
agk auth switch -w my-project # Open specific workspace by nameOptions:
| Flag | Alias | Description |
| -------------------- | ----- | ------------------------------------------------------------------ |
| --workspace <name> | -w | Specify a workspace to open. Use select to choose interactively. |
How it works:
- Displays a list of all saved profiles
- Select the profile you want to switch to
- OAuth check: If the profile has no OAuth token, you'll be prompted to sign in
- If Antigravity is running, you'll be prompted to close it
- Profile data is restored and Antigravity can be launched
- Workspace persistence: Your previously open workspace is remembered and reopened automatically
Example output:
◆ Switch Profile
Current profile: [email protected]
? Select a profile to switch to:
● [email protected] (active)
○ [email protected]
○ [email protected]
⚠ [email protected] has no OAuth token. Quota checking won't work.
? What would you like to do?
› Sign in with OAuth first
Continue without OAuth
Cancel
Antigravity is currently running. Close it to continue? … yes
Closing Antigravity...
? Launch Antigravity with the new profile? … yes
✔ Switched to [email protected] and opened my-projectauth remove
Remove a Google Antigravity profile.
agk auth removeHow it works:
- Displays a list of all saved profiles with sizes
- Select the profile to remove
- Confirm deletion (shows disk space that will be freed)
- If the active profile is removed, another profile becomes active
Example output:
◆ Remove Profile
? Select a profile to remove:
● [email protected] (active) 45.2 MB
○ [email protected] 38.7 MB
? Are you sure you want to remove [email protected]?
This will free up 38.7 MB of disk space. … yes
Removing profile...
✔ Profile [email protected] removedauth quota
Monitor quota usage for Google Antigravity accounts in real-time.
# Check quota for active profile
agk auth quota
# Check quota for specific account
agk auth quota --account [email protected]
# Set custom refresh interval (seconds)
agk auth quota --interval 60Options:
| Flag | Alias | Description |
| ---------------------- | ----- | ---------------------------------------------------------- |
| --account <email> | -a | Email of the account to check (defaults to active profile) |
| --interval <seconds> | -i | Auto-refresh interval in seconds (default: 30, min: 10) |
Interactive Controls:
- Press
rto manually reload quota data - Press
qto exit the monitor
Example output:
◆ Quota Monitor
Monitoring quota for [email protected]
Refresh interval: 30s
📊 Quota Status - [email protected]
💎 Subscription: Gemini Business
┌────────────────────────────┬──────────────────┬───────────────┐
│ Model │ Quota │ Reset Time │
├────────────────────────────┼──────────────────┼───────────────┤
│ gemini-2.0-flash │ ████████░░ 80% │ in 2h 45m │
│ gemini-2.0-pro │ ██████░░░░ 60% │ in 2h 45m │
│ claude-3.5-sonnet │ ██████████ 100% │ — │
└────────────────────────────┴──────────────────┴───────────────┘
⟳ Auto-refresh in 28s | Press 'r' to reload | Press 'q' to exitRequirements:
- OAuth token must be stored for the account
- Use
agk auth add(without--manual) to enable quota checking
upgrade
Upgrade antigravity-kit to the latest version.
# Interactive check and upgrade
agk upgrade
# Upgrade to latest stable version
agk upgrade --latest
# Upgrade to latest beta version
agk upgrade --beta
# Check for updates only
agk upgrade --checkOptions:
| Flag | Description |
| ---------- | ------------------------------------ |
| --latest | Upgrade to the latest stable version |
| --beta | Upgrade to the latest beta version |
| --check | Check for updates without installing |
How it works:
- Checks npm registry for new versions.
- Compares with your current installed version.
- Allows interactive selection of version (Stable vs Beta) if not specified via flag.
- Runs
npm install -g antigravity-kit@<version>to perform the upgrade.
🔐 Token Security
Antigravity Kit supports secure token storage for OAuth authentication:
| Platform | Storage Method | Notes |
| -------- | -------------- | ----------------------------------------------- |
| macOS | Keychain | Default. Uses macOS Keychain for secure storage |
| Linux | File | Stored in ~/.antigravity-kit/tokens/ |
| Windows | File | Stored in ~/.antigravity-kit/tokens/ |
Flags:
- Use
--insecurewithauth addto force file-based storage on macOS - Keychain storage may require user permission on first use
🖥️ Platform Support
| Platform | Status | Notes |
| -------- | ------ | ----------------------------------------------------------------- |
| macOS | ✅ | Looks for Antigravity.app in /Applications or ~/Applications |
| Linux | ✅ | Uses antigravity command or checks /usr/bin, /usr/local/bin |
| Windows | ✅ | Supports Git Bash, MSYS, Cygwin. Looks in Program Files |
📁 Profile Storage
Profiles are stored in ~/.antigravity-kit/profiles/. Each profile contains a complete copy of the Antigravity user data directory, including:
- Authentication tokens
- Settings and preferences
- Extensions (if any)
- Workspace data
⚙️ Requirements
- Node.js >= 18.0.0
- Antigravity IDE installed on your system
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE.md file for details.
🙏 Acknowledgments
- Built with citty for CLI framework
- Interactive prompts powered by @clack/prompts
- Beautiful gradients with gradient-string
