is Google’s open-source coding agent for the terminal. Before you install anything, there is one question to settle, because Google settled it in the project’s own README.
First: is Gemini CLI the tool for your account?
The note at the top of the Gemini CLI README says that for unpaid-tier and Google One users, Gemini CLI was replaced by Antigravity CLI on June 18, 2026. The same README says Gemini CLI is not optimized for the latest Gemini models, and points to Antigravity CLI for the best coding experience with them.
Google’s announcement adds who keeps Gemini CLI: it stays available with paid Gemini API keys, and organizations using it through a Gemini Code Assist Standard or Enterprise license keep their access unchanged.
So:
- You sign in with a free personal Google account, or through a Google One / Google AI Pro or Ultra subscription: your tool is Antigravity CLI. Its command is
agy, and Google’s migration guide says it reads the same GEMINI.md and AGENTS.md files this course teaches. - You use a paid Gemini or Gemini Enterprise Agent Platform API key, or an organization’s Gemini Code Assist Standard or Enterprise license: Gemini CLI is still yours, and every command in this course is its command.
If you are on Antigravity CLI
Stay with the course. Starting in the right folder, writing a project context file, reading a change before you approve it and committing before a task are the same habits in both tools. The commands, flags and settings in these lessons are Gemini CLI’s; look up the Antigravity CLI equivalents in its own documentation rather than assuming they match.
What the install actually does
It puts one program, gemini, into a folder your shell searches — your . It runs on , so you need Node installed first; the installation guide lists the minimum version and the recommended system specs.
Install it
From the official installation guide:
npm install -g @google/gemini-cli
On macOS or Linux with Homebrew:
brew install gemini-cli
Or run it once without installing anything:
npx @google/gemini-cli
The -g in the command installs it as a program for your user, not as a library inside one project.
Then check it from a new terminal window:
gemini --version
Release channels
Gemini CLI ships three:
- Stable, published weekly, uses the
latesttag. The install command above, with no tag, gets you this one. Use it. - Preview, also weekly, with the
previewtag. Not fully vetted; may contain regressions. - Nightly, every day, with the
nightlytag. Everything on the main branch, with validations still pending.
gemini update updates to the latest version.
Install it the npm way in the terminal below. The simulator does not run the agent, but the install command is the real one.
Quick check
A tutorial tells you to install @google/gemini-cli@nightly to get a feature. What are you signing up for?
The first run: signing in
Start it with gemini. The model runs on Google’s side, so it asks how you will authenticate. The authentication guide lists three ways:
Sign in with Google. Choose it, and Gemini CLI opens a sign-in page in your browser. Your credentials are then cached locally for future sessions. Google AI Pro and Ultra subscriptions (the README’s “Google One users”) were moved to Antigravity CLI on June 18, 2026 — see the section above.
Use a Gemini API key. Google’s announcement says Gemini CLI “will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys”, so the key has to be a paid one; a free-of-charge key is the unpaid tier the README sends to Antigravity CLI. Create the key in Google AI Studio, put it in an environment variable, start gemini, and choose Use Gemini API key:
export GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
gemini
Vertex AI. For Google Cloud users. You set GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION and authenticate with Google Cloud credentials.
Company, school and Google Workspace accounts also need a Google Cloud project set before signing in with Google; the authentication guide walks through it.
Keys are passwords
An is a credential with usage attached to it. Keep it in an environment variable or a that Git ignores, never in a source file or a commit.
Is Gemini CLI free?
It depends on your account, and the answer changed in 2026. The Gemini CLI README says unpaid-tier and Google One users were moved to Antigravity CLI on June 18, 2026, while Google's announcement says Gemini CLI stays available with paid Gemini API keys and for organizations on Code Assist Standard or Enterprise licenses. The lessons on this site are free and run in a browser simulator either way.
Does Gemini CLI work on Windows?
Yes. Its installation guide lists Windows alongside macOS and Linux, with Bash, Zsh or PowerShell as the shell, and gives PowerShell versions of the environment-variable commands.