Google Antigravity and AGY CLI: Install and Connect to OriginCoder
Published 2026-12-01
Google Antigravity (AGY) is Google's AI-first development platform spanning four surfaces: the terminal CLI (agy), the desktop app (Antigravity App / 2.0), IDE extensions and standalone Antigravity IDE, and the Python SDK. Both AGY CLI (agy) and the Python SDK natively support API-key mode with a custom Gemini-compatible endpoint, so you can route requests directly through OriginCoder without signing in to a Google account.
This guide covers installing the tools and wiring them up with OriginCoder's Base URL and API key.
Prerequisites and OriginCoder Endpoints
- An OriginCoder account with a balance or active subscription. Create an account and check per-model pricing on the Model Pricing page.
- An API key created on the API Keys page in the console under either a Gemini group or an Antigravity group.
Use the Base URL matching your key's group (do not append /v1beta; the client appends it automatically):
| Key Group | Target Clients | OriginCoder Base URL |
|---|---|---|
| Gemini group | AGY CLI / Gemini CLI / SDK (Gemini-native protocol) | https://origincoder.com |
| Antigravity group | AGY CLI / Gemini CLI / SDK (dedicated Antigravity route) | https://origincoder.com/antigravity |
| Antigravity group (Claude protocol) | Claude Code and Anthropic-protocol clients | https://origincoder.com/antigravity |
You can also click Use Key on any API key in the OriginCoder console to copy the exact Base URL and snippet for that key's group.
1. Install Antigravity CLI (agy)
Run the Official Installer
macOS / Linux:
curl -fsSL https://antigravity.google/cli/install.sh | bash
Default binary path: ~/.local/bin/agy.
Windows (PowerShell):
irm https://antigravity.google/cli/install.ps1 | iex
Windows (CMD):
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd
Default Windows binary directory: C:\Users\<username>\AppData\Local\agy\bin.
Verify Installation and PATH
Open a new terminal window and run:
agy --version
If macOS or Linux reports agy: command not found, add ~/.local/bin to ~/.zshrc or ~/.bashrc and reopen your terminal:
export PATH="$HOME/.local/bin:$PATH"
2. Connect AGY CLI to OriginCoder (Base URL + API Key)
To bypass Google account sign-in and send requests through OriginCoder, complete both steps below (setting GEMINI_API_KEY alone without configuring modelProvider has no effect).
Step 1: Enable API-Key Mode in settings.json
Create or edit ~/.gemini/antigravity-cli/settings.json (%USERPROFILE%\.gemini\antigravity-cli\settings.json on Windows):
{
"modelProvider": "gemini"
}
Step 2: Export OriginCoder's Base URL and Your API Key
Replace sk-xxxx with your OriginCoder API key. If your key belongs to an Antigravity group, change the URL to https://origincoder.com/antigravity:
macOS / Linux (zsh / bash):
# Use https://origincoder.com for a Gemini-group key
# Use https://origincoder.com/antigravity for an Antigravity-group key
export GOOGLE_GEMINI_BASE_URL="https://origincoder.com"
export GEMINI_API_KEY="sk-xxxx"
Add both lines to ~/.zshrc or ~/.bashrc and run source ~/.zshrc to persist them across sessions.
Windows (PowerShell):
$env:GOOGLE_GEMINI_BASE_URL="https://origincoder.com"
$env:GEMINI_API_KEY="sk-xxxx"
Windows (CMD):
set GOOGLE_GEMINI_BASE_URL=https://origincoder.com
set GEMINI_API_KEY=sk-xxxx
Note: AGY CLI reads credentials strictly from
GEMINI_API_KEYandGOOGLE_GEMINI_BASE_URLin your shell environment. It does not load.envfiles and ignoresGOOGLE_API_KEY.
Step 3: Launch and Verify
Move into any project directory and start agy:
cd /path/to/your-project
agy
When configured correctly:
- The CLI skips the Google sign-in screen and opens directly with Gemini API key displayed in the header.
- Send a quick test prompt, then open Usage in the OriginCoder console to confirm the request, model name, token count, and cost appear.
To verify your endpoint and key independently with curl:
# Gemini-group key
curl -sS "https://origincoder.com/v1beta/models" \
-H "x-goog-api-key: sk-xxxx"
# Antigravity-group key
curl -sS "https://origincoder.com/antigravity/v1beta/models" \
-H "x-goog-api-key: sk-xxxx"
3. Install Antigravity App (Desktop) and IDE Extensions
Alongside the CLI, Google Antigravity also ships a parallel desktop app (Antigravity 2.0) and editor extensions.
Antigravity App (Desktop)
Download the installer from antigravity.google/download:
- macOS (macOS 13 Ventura+): Download the Apple Silicon or Intel
.dmg, open it, and drag Antigravity into Applications (choose Replace when upgrading). - Windows (Windows 10/11 64-bit): Run the x64 or ARM64
.exeinstaller. - Linux (glibc >= 2.28): Extract the
.tar.gzarchive and launch:
tar -xzf Antigravity.tar.gz
./Antigravity
When starting a project task in the App, choose between Local mode (edits your working directory directly) and New worktree mode (runs in an isolated Git worktree for parallel tasks).
Antigravity IDE and Editor Extensions
| Editor | Installation & Requirements |
|---|---|
| VS Code (1.90+) | Open Extensions (Cmd+Shift+X / Ctrl+Shift+X), search for Google Antigravity, and install |
| JetBrains IDEs (2026.2.1+) | Open JetBrains AI > Settings > Agents, search for Antigravity, and install (GoLand, IDEA, PyCharm, WebStorm, etc.) |
| Android Studio | Open the Agent tool window and select Google Antigravity, or install from Settings > Tools > AI > Agents > Marketplace |
| Zed (0.140.0+) | Run agent: open settings in the Command Palette, then External Agents > Add > Install from Registry |
| Visual Studio / Xcode / Eclipse | Install Google Antigravity from Visual Studio Marketplace, Xcode Settings > Intelligence, or Eclipse Marketplace |
| Standalone Antigravity IDE | Download directly from antigravity.google/download |
Authentication note: The desktop App and IDE extensions default to Google account or Gemini Enterprise sign-in. To bill all requests through OriginCoder's Base URL and API key, use AGY CLI (
agy) above, Gemini CLI (sameGOOGLE_GEMINI_BASE_URL+GEMINI_API_KEYenv vars), Claude Code (see Claude Code Custom API Guide), or Codex CLI (see Codex CLI Setup Guide).
4. Install the Antigravity Python SDK with OriginCoder
Install the official package inside a Python 3.10+ environment:
# pip
pip install google-antigravity
# uv
uv add google-antigravity
Export OriginCoder's Base URL and your API key before running your scripts:
# Use https://origincoder.com for a Gemini-group key
# Use https://origincoder.com/antigravity for an Antigravity-group key
export GOOGLE_GEMINI_BASE_URL="https://origincoder.com"
export GEMINI_API_KEY="sk-xxxx"
5. Everyday Usage Tips
Essential CLI Slash Commands
Type / inside agy to open the command menu:
| Command | Purpose |
|---|---|
/plan |
Draft and review a step-by-step plan before editing code |
/diff |
Inspect file changes across turns and commits interactively |
/compact |
Summarize long conversation history to free context space |
/context |
Inspect token usage across the current context window |
/effort |
Adjust the model's reasoning effort level |
/agents |
Switch custom agents and monitor background subagents |
/codesearch |
Search code across the active workspace interactively |
/fork |
Branch the conversation to test an alternative approach |
/config |
Open the interactive settings overlay |
/clear / /exit |
Start a fresh session / exit the CLI (or press Ctrl+D twice) |
Context Mentions, Permissions, and .agents/
@mentions: Type@in the App or CLI to attach files, directories, terminal output, prior sessions, rules, or MCP tools.- Permissions and sandboxing: Configure tool approval policies (
request-review,proceed-in-sandbox,always-proceed), terminal sandboxing, non-workspace file access, and network access in Settings or/config. - Shared
.agents/folder: Place project rules, skills, and hooks in<project-root>/.agents/so CLI, Desktop App, and IDE automatically share them.
6. Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
agy still shows the Google sign-in screen and ignores your key |
"modelProvider": "gemini" is missing or misspelled in ~/.gemini/antigravity-cli/settings.json |
Set "modelProvider": "gemini" in settings.json and restart agy |
CLI exits saying GEMINI_API_KEY is not set |
modelProvider is set to gemini, but GEMINI_API_KEY is missing from the shell environment (or only placed in .env) |
Export GEMINI_API_KEY in your shell profile (~/.zshrc / ~/.bashrc) |
| Every request returns 404 | GOOGLE_GEMINI_BASE_URL includes a trailing /v1beta or /v1 |
Set it to https://origincoder.com (Gemini group) or https://origincoder.com/antigravity (Antigravity group) |
| 401, 403, or platform mismatch | The key's group does not match the endpoint (e.g., using an OpenAI/Claude key, or an Antigravity-group key against the root URL) | Check the key's group and verify the exact Base URL in the console Use Key dialog |
agy: command not found |
Install directory is not on PATH |
Add ~/.local/bin (macOS/Linux) or %LOCALAPPDATA%\agy\bin (Windows) to PATH and reopen your terminal |
| Switching back to Google account sign-in | modelProvider is still present in settings.json |
Remove "modelProvider" from settings.json and restart agy |
Billing and Security
- Every request routed through OriginCoder deducts from your balance or subscription quota and appears in the console Usage log.
- Keep your API key in environment variables rather than committing it to Git. Review the Terms of Service before sending sensitive code through any gateway.
- OriginCoder is an independent platform and is not affiliated with Google.
Next: call Gemini from code in Gemini API through an OpenAI-compatible gateway, or connect Claude Code in OriginCoder Quick Start.