GuidesHosting choices

Gemini CLI in November 2026: install, sign in, Antigravity

Gemini CLI now serves Code Assist licences and paid API keys; free and AI Pro users moved to Antigravity CLI. Install it, sign in over SSH, find its config.

November 27, 2026The Everpod team
The short answer

Since June 18, 2026, Gemini CLI no longer serves free individual use or Google AI Pro and Ultra (Google One) subscribers: Google moved those users to its Antigravity CLI (agy). Gemini CLI itself is still open source and still released weekly (0.71.1 as of November 27, 2026), now for organisations with a Gemini Code Assist Standard or Enterprise licence or Code Assist for GitHub on Google Cloud, and for paid Gemini API and Vertex AI keys. Install it with npm install -g @google/gemini-cli on Node.js 20 or later, then run gemini. On a server over SSH it prints a sign-in URL and asks you to paste back the authorization code, or you skip the browser entirely with GEMINI_API_KEY.

What changed on June 18, 2026

Google announced the change on its developer blog on May 19, 2026: from June 18, Gemini CLI and the Gemini Code Assist IDE extensions stopped serving requests for Google AI Pro and Ultra and for people using Code Assist for individuals free of charge. Code Assist for GitHub went the same way, with no new installations on GitHub organisations from that date, except where an organisation uses it through Google Cloud. The repository’s README now opens with the same line:

Free individual access and Google AI Pro / Ultra (Google One) moved to Antigravity CLI on June 18, 2026
Copied

The authentication docs carry a banner for “Unpaid tier and Google One users”: “Gemini CLI was replaced by Antigravity CLI on June 18th, 2026.” So a guide from 2025 that tells you to sign in with any Google account and get a free daily allowance describes a route that no longer exists. Who can use what, as of November 2026:

You haveGemini CLIUse instead
Free individual use (Gemini Code Assist for individuals)
NoAntigravity CLI
Google AI Pro or Ultra (Google One)
NoAntigravity CLI
Gemini Code Assist Standard or Enterprise, through your organisation
Yes, unchanged; sign in with Google
Code Assist for GitHub through Google Cloud
Yes, unchanged
Code Assist for GitHub otherwise
No new installations from June 18; requests stop being served in the weeks after
A paid Gemini API key
YesOr Antigravity CLI with the key
A paid Vertex AI key on Google Cloud
Yes

The README describes the project now as “an open-source terminal agent maintained for enterprise Gemini Code Assist workflows on Google Cloud”, still under Apache 2.0, and it carries two warnings: it is “Not tuned for the Gemini 4 series (for example, Gemini 4 Argon) or future releases”, and “Don’t use Gemini CLI to benchmark Gemini models”. Google also lists a third tool beside the two, gemini-api, a stateless command line for the Gemini API that it says is not a coding harness, for scripts and CI.

Install Gemini CLI

The npm package is @google/gemini-cli, its command is gemini, and it needs Node.js 20 or later (the package’s engines field reads >=20). Any of these:

npm install -g @google/gemini-cli   # global install, any OS with Node 20+
npx @google/gemini-cli              # run it once without installing
brew install gemini-cli             # Homebrew, macOS or Linux
sudo port install gemini-cli        # MacPorts
Copied

Releases come on three npm tags: @latest is the stable build, published every Tuesday at 20:00 UTC; @preview follows the same evening at 23:59 UTC; and @nightly is built every day at 00:00 UTC with, in the README’s words, “pending validations and issues”. On November 24, 2026 those were 0.71.1, 0.72.0-preview.0 and a 0.71 nightly. Pick one explicitly with npm install -g @google/gemini-cli@preview or @latest. Inside a session, /about shows the version you are running.

For restricted environments, the README offers a conda environment with its own Node.js:

conda create -y -n gemini_env -c conda-forge nodejs
conda activate gemini_env
npm install -g @google/gemini-cli
Copied

If npm install -g fails with a permissions error on Linux, the cause and the fixes are the same as for any global npm package; the Codex CLI install guide walks through them for another npm-distributed agent.

Sign in: Code Assist, an API key or Vertex AI

The first run shows a dialog headed “Get started” that asks “How would you like to authenticate for this project?”, with three choices: Sign in with Google, Use Gemini API Key and Vertex AI. /auth inside a session opens the same dialog later. In Google Cloud Shell, an extra option uses the Cloud Shell user’s own credentials.

Sign in with Google is the route for a Code Assist licence, and with a paid licence from your organisation the README says to set the Google Cloud project. An account that needs a project and has none set stops with:

This account requires setting the GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID env var.
Copied

Use the project’s string ID, such as my-project-123; the CLI refuses a numeric project number.

export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
gemini
Copied

A Gemini API key comes from Google AI Studio and is billed per use. Google’s blog says Gemini CLI stays reachable with paid Gemini API keys, so this is the route for an individual developer who wants Gemini CLI rather than Antigravity:

export GEMINI_API_KEY="YOUR_API_KEY"
gemini
Copied

Vertex AI uses Google Cloud. With a Google Cloud API key:

export GOOGLE_API_KEY="YOUR_API_KEY"
export GOOGLE_GENAI_USE_VERTEXAI=true
gemini
Copied

With application default credentials or a service account instead, the authentication docs use GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION (and GOOGLE_APPLICATION_CREDENTIALS pointing at the service account’s JSON key), and warn that a GOOGLE_API_KEY or GEMINI_API_KEY left set in your shell must be unset to use application default credentials.

A key typed into export lands in your shell history. To keep it out and have it load every time, put it in ~/.gemini/.env, which Gemini CLI reads on start, and make that file readable by you alone:

mkdir -p ~/.gemini
read -rsp 'Gemini API key: ' k; echo
(umask 077; printf 'GEMINI_API_KEY=%s\n' "$k" >> ~/.gemini/.env); unset k
chmod 600 ~/.gemini/.env   # the line is appended, so other variables already in the file stay
Copied

One catch: Gemini CLI looks for a .env in the current directory and its parents before your home directory, and in the docs’ words “Variables are loaded from the first file found, not merged.” A project with its own .env hides the key in your home one.

Signing in on a headless server over SSH

“Sign in with Google” normally opens a browser and catches the answer on a local port (127.0.0.1), which a server reached over SSH has neither of. Gemini CLI switches to a manual flow on its own when it decides not to open a browser: on Linux when none of DISPLAY, WAYLAND_DISPLAY or MIR_SOCKET is set (the usual SSH session), on macOS and Windows when SSH_CONNECTION is set, and anywhere CI is set. Where it guesses wrong, for instance over SSH with X forwarding, force the manual flow:

NO_BROWSER=true gemini
Copied

Choose “Sign in with Google” and the terminal shows two prompts:

Please visit the following URL to authorize the application:
...
Enter the authorization code:
Copied

Open the URL in a browser on your own laptop or phone, sign in with the account that holds the Code Assist licence, and paste the code the page gives you back into the SSH session. You have five minutes before it gives up with “Authorization timed out after 5 minutes.” Remember GOOGLE_CLOUD_PROJECT in the same shell, as above.

The sign-in is cached in ~/.gemini/oauth_creds.json, written readable by your user only, and later runs reuse it. That matters for scripts: a non-interactive run (gemini -p, or anything without a terminal) cannot show the URL prompt, and stops with:

Manual authorization is required but the current session is non-interactive.
Copied

So sign in once interactively, in a normal SSH session, before you put Gemini CLI in a cron job or a timer. For unattended work on a server, an API key in ~/.gemini/.env avoids the browser altogether. To keep an interactive session alive after you disconnect, run it inside tmux.

Where Gemini CLI keeps its config

Everything per user lives in ~/.gemini/; set GEMINI_CLI_HOME to move the root it is created under.

PathWhat it holds
~/.gemini/settings.json
Your settings, MCP servers included
.gemini/settings.json
The project’s settings, in its root
/etc/gemini-cli/settings.json
System settings on Linux, which override user and project files
/etc/gemini-cli/system-defaults.json
System defaults on Linux, which user and project files override
~/.gemini/.env
Environment variables such as your API key
~/.gemini/oauth_creds.json
The cached Google sign-in
~/.gemini/GEMINI.md
Instructions for every project; a project’s own GEMINI.md files are read as well
~/.gemini/tmp/
Per-project working data, chats and shell history

On macOS the two system files are under /Library/Application Support/GeminiCli/ and on Windows under C:\ProgramData\gemini-cli\. The full order, lowest first, is defaults, system defaults, user, project, system, environment variables, then command-line flags. Gemini CLI reads GEMINI.md, not AGENTS.md, unless you add the file name to its settings; the AGENTS.md guide shows the setting.

Running it without a prompt open

Passing a prompt with -p runs Gemini CLI once and exits, which is what a script or a scheduled job wants:

gemini -p "Explain the architecture of this codebase"
gemini -p "Explain the architecture of this codebase" --output-format json
gemini -p "Run tests and deploy" --output-format stream-json   # one JSON event per line
Copied

It exits 0 on success, 1 on a general or API error, 42 on an invalid prompt or arguments and 53 when it hits its turn limit, so a script can tell a bad call from a failed one.

Antigravity CLI, if Gemini CLI no longer takes your account

Antigravity CLI is a separate program with its own command, agy, which Google says “took inspiration from core Gemini CLI product and harness components”. Google’s download page (version 1.5.16 on November 27, 2026) installs it with a script:

curl -fsSL https://antigravity.google/cli/install.sh | bash     # macOS and Linux
irm https://antigravity.google/cli/install.ps1 | iex             # Windows PowerShell
Copied

Its install docs sign it in with a personal Google account on the Free, Pro or Ultra plan, or on Google Cloud with a Gemini Enterprise licence or your own project, and note that “Google Workspace plans don’t include Antigravity plans.” Over SSH, they say it “detects the SSH environment and prints a unique, secure authorization URL”, and you paste the code from your browser back into the remote prompt, as with Gemini CLI. With an API key the environment variable is not enough on its own: also set modelProvider to gemini in ~/.gemini/antigravity-cli/settings.json, because, in Google’s words, “Only setting a GEMINI_API_KEY environment variable on its own has no effect.”

Coming from Gemini CLI, the migration guide says the first agy run finds your existing profile in ~/.gemini and offers to bring over extensions, settings and session tokens. What moves, and what you do by hand:

If you are choosing a terminal agent rather than following Google’s path, the Claude Code alternatives guide sets Antigravity CLI and Gemini CLI beside Codex, OpenCode, Pi and the rest, and choosing a VPS for a coding agent covers the server any of them runs on.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.