If you read a guide about the "free Gemini CLI" and it does not work, you did nothing wrong: on 18 June 2026 Gemini CLI stopped serving Google AI Pro, Google AI Ultra and free individual accounts, replaced by Antigravity CLI (command agy). The change had been announced on 19 May, thirty days earlier. Still served are users with a Gemini Code Assist Standard or Enterprise licence and those who authenticate with a paid API key (so the announcement of 19 May says; on free-tier keys the announcements say nothing). Today's README adds two warnings: Gemini CLI is not optimised for Gemini 4 and must not be used to measure the models.
On top of that, on 27 October 2026 gemini-api came out in beta, a third CLI, stateless, designed for agents with shell access, scripts and CI. Three tools with similar names and different purposes. This article separates them, shows you how to check what the migration brings along, and proposes a protocol to compare Gemini with other assistants: what you can measure yourself, not what the press releases claim.
Series "Google Gemini for Developers", article 6 of 6. Prerequisites: the Interactions API (article 2) and the terms on data (article 5). I am not affiliated with Google. Sources consulted on 13 November 2026. I did not install or run any assistant CLI, neither Gemini CLI nor Antigravity nor
gemini-api: the listings that run on test files I ran, the one with the CLI commands is a schema to adapt, not executed.
The three tools, kept apart
| Gemini CLI | Antigravity (App, CLI, IDE, SDK) | gemini-api CLI | |
|---|---|---|---|
| What it is | Open-source terminal agent (Apache-2.0), maintained for the Gemini Code Assist workflows | Agent platform: desktop app, agy CLI, extensions for six editors and an IDE of its own, Python SDK | Stateless command-line client for agents, scripts and CI (beta, Apache-2.0) |
| Who it serves today | Code Assist Standard or Enterprise licences; paid API key or Vertex AI | Personal accounts (Free, Pro, Ultra); teams in Gemini Enterprise, under the Google Cloud terms | Anyone with an API key |
| Cost | Per token (key) or licence | Quota per plan; neither prices nor quota amounts in the pages read | Per token |
| Installation | npm install -g @google/gemini-cli, brew install gemini-cli | Google's installation script for the CLI, pip install google-antigravity for the SDK | Script on GitHub, go install, precompiled archives |
The row that weighs most is the third. With the API key you pay for what you consume and can calculate it in advance, as in article 4; with Antigravity you pay with a quota that the documentation describes only in words. The installation pages ask you to run scripts downloaded from the internet (curl ... | bash): read them first, as you would with any script taken from the network.
Gemini CLI: what remains
The README says it is "maintained for enterprise Gemini Code Assist workflows on Google Cloud" and that free access and access with Google AI Pro and Ultra have moved to Antigravity. The announcement on the developers' blog is dated 19 May 2026, the shutdown date 18 June: thirty days. The ways of access remain three: a Google account with a paid licence (GOOGLE_CLOUD_PROJECT is required), a key in GEMINI_API_KEY with pay-as-you-go billing, or Vertex AI. The project is alive: the repository's last update is dated 13 November 2026 and releases come out every Tuesday. But the README warns that it is not optimised for the Gemini 4 series and that its harness produces unrepresentative scores if you use it to measure the models.
Antigravity: what really changes
The documentation describes four surfaces: the desktop app (from 2.5), the agy CLI (from 1.2), the extensions for VS Code, JetBrains, Visual Studio, Zed, Xcode and Eclipse plus an IDE of its own, and a Python SDK. Agents work in "projects" and can operate in local mode, directly in your folders, or in an isolated Git worktree: the second is the prudent choice when you let an agent work unsupervised. The /usage command shows credit consumption and quota limits.
On the plans the official page is clear and poor in numbers. Google AI Ultra has the highest quota, refreshed every five hours, and access to third-party models; Google AI Pro has a high quota refreshed every five hours up to the weekly limit; the others receive "a meaningful quota, refreshed weekly". The quota follows the total work of the agent, not the number of prompts, and the limits can change. Pro and Ultra can buy credits beyond the quota. Two sentences weigh: the page gives neither prices nor quota amounts, and says that today there is no support for bringing your own key or your own endpoint, nor for organisational tiers with a custom contract. I add what I did not read: the terms on Antigravity's data use for personal accounts. Do not assume that those of the Gemini API from article 5 apply.
gemini-api: the tool for automation
It is described as a "stateless, zero-dependency" client for coding agents, scripts and pipelines, and it runs on the Interactions API. It generates text and media, analyses files, audio, video and YouTube URLs, launches managed agents. Among the commands in the guide are generate, image, tts, music, video, analyze, transcribe, agent, files, models, configure, auth, whoami, plus others for environments, webhooks and triggers. It is an open-source beta that can change between minor versions: the documentation recommends pinning an exact version in automated environments, and the latest release I found is v0.4.6 of 10 November 2026 (GitHub API).
# SCHEMA TO ADAPT, NOT EXECUTED: it needs the CLI installed and a key. Commands from the official guide.
export GEMINI_API_KEY="YOUR_KEY" # in CI: from the secrets manager, never in the repository
gemini-api whoami # where the active credential comes from
gemini-api generate "Confirm in one sentence that the CLI is configured." --dry-run # preview of the request, without sending it
git log --oneline v1.4.0..HEAD | gemini-api generate "Write the release notes." \
--stdin --stream=false --body '{"store": false}' # no copy on the server
# Schema to adapt, not executed: syntax checked with bash -n, commands from the official guide.
The block uses the three features that make the CLI suitable for automation. whoami says where the credential comes from, useful in CI to notice a wrong key. --dry-run shows the request without sending it and with the credentials masked. --body '{"store": false}' passes an Interactions API property so as not to leave a copy of the interaction on the server (article 5). The page warns that --body is merged with the command-line options and that a conflict on the same key makes the command fail with code 2: the other codes are 0 for success, 1 for network or API error and 3 for authentication. In a pipeline check the exit code, not the text.
Migrating from Gemini CLI: what the installer brings along
The announcement of 18 June says that installing Antigravity CLI detects the Gemini CLI folder and copies skills, MCP servers and agent profiles, with compatibility for gemini.md files. The migration page adds the details that explain why trusting it is not enough. On first launch a list asks what to convert. Extensions become plugins with agy plugin import gemini. Project skills change folder, from .gemini/skills/ to .agents/skills/, and must be moved by hand. MCP servers leave settings.json and go into mcp_config.json, with the key serverUrl in place of url and httpUrl. The page admits only partial parity with Gemini CLI.
Now the security point. Imported MCP servers are code that your agent can invoke with your permissions, and they are transferred without you re-examining them. After the migration open the list and remove what you do not recognise. The listing makes it concrete on a test folder built by the script.
"""After migrating from Gemini CLI: list inherited MCP servers and skills, to review by eye.
It runs on a TEST folder created here; on yours, pass the project root as an argument."""
import json
import sys
import tempfile
from pathlib import Path
RISKY = ("npx", "uvx", "bunx", "curl", "bash", "sh") # they download or run code on the fly
def audit(base: Path):
cfg = json.loads((base / ".gemini" / "settings.json").read_text(encoding="utf-8"))
for name, server in sorted(cfg.get("mcpServers", {}).items()):
if "command" in server:
line = " ".join([server["command"], *server.get("args", [])])
note = "downloads or runs code on the fly" if server["command"] in RISKY else "local command"
else:
key = next((k for k in ("url", "httpUrl") if k in server), None)
line = server.get(key, "?")
note = f"remote; the key '{key}' becomes 'serverUrl' in Antigravity" if key else "remote"
print(f"MCP {name:16} {line}\n -> {note}")
skills = base / ".gemini" / "skills"
for folder in sorted(p for p in skills.iterdir() if p.is_dir()) if skills.is_dir() else []:
print(f"SKILL {folder.name:16} -> move to .agents/skills/ if it is a project skill")
if len(sys.argv) > 1:
audit(Path(sys.argv[1]))
else:
with tempfile.TemporaryDirectory() as tmp:
base = Path(tmp)
(base / ".gemini" / "skills" / "summarize-pr").mkdir(parents=True)
(base / ".gemini" / "settings.json").write_text(json.dumps({"mcpServers": {
"filesystem": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "./src"]},
"internal-index": {"url": "https://mcp.example.com/sse"},
"local-tools": {"command": "python3", "args": ["tools/local_mcp.py"]},
}}), encoding="utf-8")
audit(base)
# Output (run twice, identical output):
# MCP filesystem npx -y @modelcontextprotocol/server-filesystem ./src
# -> downloads or runs code on the fly
# MCP internal-index https://mcp.example.com/sse
# -> remote; the key 'url' becomes 'serverUrl' in Antigravity
# MCP local-tools python3 tools/local_mcp.py
# -> local command
# SKILL summarize-pr -> move to .agents/skills/ if it is a project skill
The function audit reads .gemini/settings.json and prints, for each server, what it would start: a local command, a command that downloads and runs code on the fly (npx, uvx, curl, a shell), or a remote address. In the example, filesystem starts with npx -y, that is it downloads the latest version of a package at every start: it is the kind of line to pin to a version or remove. internal-index uses the old key url, which in Antigravity becomes serverUrl. The list of risky words is a heuristic of mine, not a rule of the documentation. Pass your project's root as an argument to really use it; the script writes nothing.
What an agent costs via API
Whoever used Gemini CLI for free and moves to the API key needs an order of magnitude. The listing works out a day with declared assumptions (200 turns, 30,000 context tokens re-read at every turn, 1,500 tokens generated) with the prices of the Pricing page, with and without cache.
"""A day of an agent via API: 200 turns, each with 30,000 context tokens re-read and 1,500 generated.
All MY ASSUMPTION; the prices are those of the Pricing page, 2026-11-13 (dollars per million tokens)."""
PRICES = { # (input, output, input read from the cache)
"gemini-4-hydrogen": (1.50, 7.50, 0.075),
"gemini-3.8-flash (until 31 Dec 2026)": (0.75, 3.75, 0.075),
}
TURNS, CONTEXT, GENERATED = 200, 30_000, 1_500
for name, (p_in, p_out, p_cache) in PRICES.items():
input_tokens, output_tokens = TURNS * CONTEXT, TURNS * GENERATED
for cache_share in (0.0, 0.9): # share of the input that comes back from the cache
cost = (input_tokens * ((1 - cache_share) * p_in + cache_share * p_cache) + output_tokens * p_out) / 1e6
print(f"{name:40} cache {int(cache_share * 100):>2}%: {cost:5.2f} dollars a day")
# Output (run twice, identical output):
# gemini-4-hydrogen cache 0%: 11.25 dollars a day
# gemini-4-hydrogen cache 90%: 3.56 dollars a day
# gemini-3.8-flash (until 31 Dec 2026) cache 0%: 5.62 dollars a day
# gemini-3.8-flash (until 31 Dec 2026) cache 90%: 1.98 dollars a day
Without cache a day costs 11.25 dollars with Hydrogen and 5.62 with 3.8 Flash. If 90% of the input comes back from the cache, the cost drops to 3.56 and 1.98: it is an assumption about the cache share, not a measurement, and as seen in article 4 implicit caching is not guaranteed. The figure says one thing only: with the key you can decide with a number. With Antigravity you cannot, because the quota has no published amount, and so you cannot even compare it with these dollars. The prices of 3.8 Flash apply until 31 December 2026, then they double; those of Hydrogen, read on 13 November, have no stated expiry.
Three scenarios, with the constraint written down
These are scenarios built by me, with declared assumptions, not real cases.
Someone who programmed as a hobby on the free tier
By hand today. A person develops projects in their spare time with Gemini CLI and their own Google account. What changes. Since June that access is gone: the roads are Antigravity with the free plan (weekly quota) or the pay-as-you-go API key, with the calculations of the listing. What goes wrong. Two things: Antigravity's quota cannot be compared with a cost, and with a free-tier key the code falls under the rules of article 5. For a public project it is fine, for the employer's code it is not.
A web agency with three developers
By hand today. Each has their own personal tool and chooses independently. What changes. Whoever used Gemini CLI with an individual account has had to change. The risk is not the price but fragmentation: three tools, three context files (GEMINI.md, AGENTS.md, an editor's rules), no shared convention. What goes wrong. Clients' code passes through tools with different terms that nobody has read. Minimum decision: one approved tool for clients' code, on a paid project, and a written exception for the others.
A CI pipeline with gemini-api
By hand today. A team writes release notes by hand from a list of merge requests: twenty minutes per release (assumption). What changes. A pipeline step invokes gemini-api generate with the list and saves a draft; the team rereads it. The tool has no state, so every run is independent. What goes wrong. It is a beta: the version is pinned, as the documentation recommends, and the step never publishes by itself. The notes may contain clients' names: paid project, not free.
Gemini against the others: a protocol, not a ranking
This site already has a comparison of Cursor, Copilot and Claude Code and, in the series on the other assistant, the eighth article on Codex, with prices, models and permissions reread at the sources on 13 November 2026. I do not repeat them. I add what I can say about Gemini on the basis of pages read, and what I cannot.
| Criterion | Gemini, pages of 13 November 2026 |
|---|---|
| Predictable price | API: published per million tokens, with dated price-list changes (Argon doubles on 1 December, 3.8 Flash on 1 January). Antigravity: quota with no numbers or prices |
| Context window | 1,048,576 tokens shared in the Gemini 4 models; accuracy that drops on several scattered facts (article 4) |
| Data and training | API: rules of the terms by tier and by geographic area (article 5). Personal Antigravity: not read |
| Product stability | Gemini CLI withdrawn for consumers with 30 days' notice; 3.7 Flash deprecated after eight weeks (article 1) |
| Quality on your code | I do not know it, and neither do you until you measure |
On quality I write nothing: I have no measurement of my own, and I have not read public benchmarks at the source. There is a useful warning from the README: if you want to measure a Gemini model, do not use Gemini CLI, because its harness is not tuned for Gemini 4+; use the agent the model is designed for, or the API with your test code.
The protocol: two weeks, three tasks
- Choose three real tasks from your repository: fixing a bug with a failing test, a small feature, a refactoring that does not change behaviour. Fix the starting commit for each.
- Give each tool the same task, with the same commit and the same instructions, in a separate branch or worktree.
- Measure the time to green tests, the human interventions, the size of the diff, the cost (tokens or quota consumed) and whether the result passes review.
- Repeat after two weeks: the tools change, a measurement without a date goes stale.
- Write down the decision with the date and the rule for rethinking it.
The order matters: the starting commits must be fixed before launching the tools, otherwise each starts from different code and the comparison does not hold. The listing summarises the measurements collected in a CSV; the one below contains invented numbers, to make the script run, and the tools are called A, B and C on purpose.
"""Summarises the measurements of the comparison protocol. The numbers in the CSV below are INVENTED,
they only serve to make the script run; the tools are called A, B and C on purpose."""
import csv
import io
import statistics
SAMPLE = """tool,task,minutes_to_green_tests,interventions,diff_lines,cost_usd,passes_review
A,bug,12,1,18,0.40,yes
A,feature,35,4,140,1.10,yes
A,refactoring,50,6,420,2.30,no
B,bug,9,0,22,0.55,yes
B,feature,41,3,95,0.90,yes
B,refactoring,38,2,260,1.70,yes
C,bug,20,2,60,0.20,no
C,feature,30,5,180,0.35,yes
C,refactoring,45,7,300,0.60,no
"""
rows = list(csv.DictReader(io.StringIO(SAMPLE)))
for s in sorted({r["tool"] for r in rows}):
mine = [r for r in rows if r["tool"] == s]
times = sorted(int(r["minutes_to_green_tests"]) for r in mine)
median = statistics.median(times)
assert median == times[len(times) // 2] # second calculation: with three measurements it is the middle one
passed = sum(r["passes_review"] == "yes" for r in mine)
print(f"{s}: median time {median:>4} min | interventions {sum(int(r['interventions']) for r in mine):>2} | "
f"diff {sum(int(r['diff_lines']) for r in mine):>3} lines | cost {sum(float(r['cost_usd']) for r in mine):4.2f} $ | "
f"review passed {passed}/{len(mine)}")
# Output (run twice, identical output):
# A: median time 35 min | interventions 11 | diff 578 lines | cost 3.80 $ | review passed 2/3
# B: median time 38 min | interventions 5 | diff 377 lines | cost 3.15 $ | review passed 3/3
# C: median time 30 min | interventions 14 | diff 540 lines | cost 1.15 $ | review passed 1/3
With three tasks per tool the median is simply the middle measurement, and the script checks it with a second calculation. The invented data show why a single column misleads: C has the lowest median time and the lowest cost, but requires 14 interventions and passes one review out of three; B is slower than C but passes all the reviews. No conclusion about A, B or C concerns real tools. The rule you draw from it is yours: decide beforehand which column weighs most, because afterwards the temptation is to choose the one that favours the tool you like.
What you can do now
You can say who is still served by Gemini CLI and why a guide from a year ago does not help you. You can tell Antigravity, which is a platform with quotas, from gemini-api, which is a client for automation with per-token cost. You can check what a configuration migration brings you, in particular the MCP servers, and you can set up a comparison between assistants with your own tasks, fixed commits and a dated decision.
The thread of the whole series, if you want to go over it: the models and prices, with names that change every few weeks (article 1); the key and the Interactions API (article 2); the functions, structured JSON and Google Search (article 3); the context, thinking and caching (article 4); the limits and the terms on data (article 5). They are the five points where a choice is paid for with money, with time or with other people's data.
What I did not verify
- The prices of the Google AI Pro and Ultra plans and the amount of Antigravity quota: not published in the pages read.
- The licence of Antigravity CLI and the terms on Antigravity's data use for personal accounts: not read.
- The real behaviour of
agy plugin import geminiand of thegemini-apicommands: read in the guides, not run. - The quality of the code produced by the different tools: no measurement of mine, no benchmark read.
The first point is resolved only when the supplier publishes the numbers. The other three you close yourself, with a reading of the terms and a trial on a test folder before touching a real project.
Frequently asked questions
Does Gemini CLI still work?
For people using a Gemini Code Assist Standard or Enterprise licence or a paid API key, yes. Since 18 June 2026 it no longer serves Google AI Pro, Google AI Ultra and free individual accounts, which moved to Antigravity CLI. The README warns that it is not optimised for Gemini 4.
Does Antigravity CLI work with my API key?
For the app and CLI quotas, no: the plans page says there is no support for bringing your own key or endpoint to get more limits. The Antigravity Python SDK, however, is configured with GEMINI_API_KEY.
Which developer assistant should I choose?
The one that wins on three real tasks from your repository, measured for two weeks on time, quality and cost. This article proposes the protocol; the other tools' prices and features must be reread at the source on the day you choose.
Sources
- Announcement of 18 June 2026 in the Gemini CLI discussion - end of service for individual accounts, what the installer copies, who is not affected, consulted on 2026-11-13
- An important update: Transitioning Gemini CLI to Antigravity CLI - announcement of 19 May 2026 and timetable for consumers and enterprises, consulted on 2026-11-13
- Gemini CLI README - current status, warnings on Gemini 4 and on benchmarks, authentication, release channels, Apache-2.0 licence (GitHub API), consulted on 2026-11-13
- Antigravity: Get started - surfaces, installation, local and worktree modes,
/usagecommand, consulted on 2026-11-13 - Antigravity: Plans - quotas per plan, credits, absence of BYOK and of custom organisational tiers, consulted on 2026-11-13
- Antigravity CLI: Migrating from Gemini CLI -
agy plugin import gemini, new skill and MCP paths,serverUrlkey, partial parity, consulted on 2026-11-13 - Gemini API CLI - commands,
--dry-run,--body, exit codes, beta warning, consulted on 2026-11-13 - gemini-api-cli: Releases - version v0.4.6 of 10 November 2026 and the repository's Apache-2.0 licence (GitHub API), consulted on 2026-11-13
- Gemini Developer API pricing - input, output and cache prices of Hydrogen and 3.8 Flash, consulted on 2026-11-13
Commenti
Caricamento commenti...
Sign in to comment