Antigravity CLI Migration API Guide (2026): What Gemini CLI Users Should Change Now
Google’s May 19, 2026 developer announcement has a hard date developers shouldn’t ignore: on June 18, 2026, Gemini CLI and Gemini Code Assist IDE extensions stop serving requests for Google AI Pro and Ultra users, plus free Gemini Code Assist for individuals. Google’s recommended path is Antigravity CLI and Antigravity 2.0.
The headline sounds like a product migration. In practice, it’s a workflow migration. If your team used Gemini CLI as a cheap terminal agent, a PR helper, a refactor bot, or a background research runner, the important question isn’t “what command do I install next?” It’s “how do I keep coding agents reliable, measurable, and portable when the default surface changes?”
This guide gives you a practical migration plan. It focuses on the parts that tend to break: API keys, model routing, token budgets, background jobs, and fallback paths.
What Google Actually Announced
According to Google’s developer blog, Antigravity CLI is now available to everyone. Google also says Antigravity CLI keeps several important Gemini CLI concepts: Agent Skills, Hooks, Subagents, and Extensions, now framed as Antigravity plugins. The new pitch is faster execution, asynchronous multi-agent workflows, and a unified agent harness shared with Antigravity 2.0.
The consumer timeline matters:
| User Type | Impact | Recommended Action |
|---|---|---|
| Free Gemini Code Assist individual users | Requests stop being served after the transition window | Move terminal and IDE workflows to Antigravity CLI |
| Google AI Pro / Ultra users using Gemini CLI | Gemini CLI stops serving those plan-based requests | Install Antigravity CLI and validate agent workflows |
| Gemini Code Assist for GitHub individual installs | No new GitHub org installs, with request serving ending later | Audit CI and PR-review automations |
| Standard / Enterprise / Google Cloud users | Google says access remains unchanged | Keep current setup, but still test Antigravity CLI |
That split is easy to miss. If you’re enterprise, don’t panic. If you’re on individual access, don’t wait until a CI job or a weekend refactor suddenly stops working.
Migration Step 1: Inventory How Gemini CLI Is Used
Start with usage, not tooling. Most teams underestimate how many little scripts depend on a coding agent.
rg -n "gemini|gemini-cli|code assist|GEMINI_API_KEY|GOOGLE_API_KEY" \
.github scripts package.json pnpm-lock.yaml yarn.lock README.md
Group each hit into one of four buckets:
- Interactive terminal work: local prompts, one-off debugging, repo explanation.
- IDE workflows: inline code changes, refactors, commit help.
- CI or GitHub review: PR comments, test summaries, release notes.
- Background agents: long-running research, multi-file edits, dependency upgrades.
The third and fourth buckets need the most care. They spend tokens while you’re not watching.
Migration Step 2: Put a Routing Layer Between Tools and Models
Hard-coding one provider into every agent script is the fastest way to repeat this migration pain later. A thin router lets Antigravity CLI, Claude Code, Codex CLI, or your own scripts call a stable internal endpoint while you decide which upstream model handles each task.
Here’s a simple OpenAI-compatible request shape you can use as the common contract:
curl https://api.kissapi.ai/v1/chat/completions \
-H "Authorization: Bearer $KISSAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.5-flash",
"messages": [
{"role": "system", "content": "You are a careful coding agent. Return a concise patch plan first."},
{"role": "user", "content": "Review this pull request for risky database changes."}
],
"temperature": 0.2
}'
KissAPI is useful here because it gives you one OpenAI-compatible surface for multiple model families. That doesn’t replace Antigravity CLI; it makes your model access less brittle around it.
Migration Step 3: Separate Interactive Runs from Background Runs
Antigravity CLI’s asynchronous workflow direction is good. It also makes cost control more important. Background agents can quietly do expensive things: read the same files repeatedly, spawn subagents, retry failed commands, and produce huge summaries.
Give each run type a budget before you migrate:
| Workflow | Suggested Model Tier | Budget Rule |
|---|---|---|
| Explain a file | Fast/cheap model | One pass, no repo-wide scan |
| PR review | Mid-tier coding model | Diff only unless tests fail |
| Refactor across repo | Strong coding model | Plan first, edit second, cap retries |
| Research task | Fast model + search tools | Source cap and summary cap |
Before you move a job, estimate it. KissAPI’s token counter is handy for checking prompt size, and the API cost calculator is better than guessing from vibes.
Migration Step 4: Add a Small Node.js Compatibility Wrapper
If your existing scripts assume a Gemini-style provider but you want portable routing, hide provider choice behind a tiny client. This example uses an OpenAI-compatible endpoint so the rest of your script doesn’t care what model sits behind it.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.KISSAPI_API_KEY,
baseURL: process.env.AI_BASE_URL || "https://api.kissapi.ai/v1"
});
export async function askCodingAgent({ model, task, files }) {
const response = await client.chat.completions.create({
model,
temperature: 0.2,
messages: [
{
role: "system",
content: "You are a senior coding agent. Be specific, avoid broad rewrites, and flag risky assumptions."
},
{
role: "user",
content: `Task:\n${task}\n\nFiles:\n${files.join("\n")}`
}
]
});
return response.choices[0].message.content;
}
Then your CI job can switch models with an environment variable instead of a code change:
AI_BASE_URL="https://api.kissapi.ai/v1" \
KISSAPI_API_KEY="..." \
node scripts/review-pr.js --model gemini-3.5-flash
Migration Step 5: Keep Fallback Simple
Don’t build a giant orchestration system if all you need is “try model A, then model B.” A boring fallback is easier to debug at 2 a.m.
MODELS=("gemini-3.5-flash" "claude-sonnet-4-6" "gpt-5.5-mini")
for MODEL in "${MODELS[@]}"; do
echo "Trying $MODEL"
if node scripts/run-agent.js --model "$MODEL"; then
exit 0
fi
sleep 3
done
echo "All agent routes failed" >&2
exit 1
The right fallback depends on the task. For long code edits, compare model behavior on a fixed evaluation set before switching traffic. For quick explanations and summaries, failover can be more aggressive.
What Not to Migrate Blindly
Be careful with these three things:
- Plugin permissions: Any tool that can read files, run shell commands, or open network connections needs review after migration.
- Hidden context inflation: Multi-agent systems may pass large state between workers. Measure actual tokens, not just the user prompt.
- CI comments: Automated PR review is public inside your company. Keep secrets, credentials, and private business logic out of prompts.
My opinion: this transition is a warning shot for every team leaning on plan-bundled AI access. Coding agents are becoming real infrastructure. Treat them like infrastructure. Put them behind budgets, logs, routing, and permission boundaries.
Quick checklist: find Gemini CLI dependencies, classify workflows, set token budgets, move scripts behind an OpenAI-compatible client, test Antigravity CLI on one non-critical repo, then migrate CI jobs last.
Need a Stable API Route During the Migration?
Create a free KissAPI account and keep a model fallback ready while you move coding-agent workflows from Gemini CLI to Antigravity CLI.
Start FreeFAQ
What changed for Gemini CLI users on June 18, 2026?
Google said Gemini CLI and Gemini Code Assist IDE extensions would stop serving requests for Google AI Pro, Ultra, and free individual Code Assist users on June 18, 2026. Antigravity CLI is the recommended consumer migration path.
Do enterprise Gemini Code Assist users need to migrate immediately?
No. Google stated that Standard, Enterprise, Google Cloud GitHub integrations, and paid API-key users keep access unchanged. Still, it’s smart to test Antigravity CLI because future agent features will likely land there first.
How do I control API costs while moving coding agents?
Track token use by workflow, set per-run limits, route easy tasks to cheaper models, and keep fallback models for outages. Use the token counter before large runs and the cost calculator before enabling background agents.