Windows setup
Gemini CLI on Windows after the 2026 change: what to install and how
Updated November 17, 20268 min read
Gemini CLI on Windows still installs with npm install -g @google/gemini-cli in PowerShell, but since June 18, 2026 it only serves people with a paid Gemini API key or a company Gemini Code Assist Standard or Enterprise licence. Free users and Google AI Pro or Ultra subscribers now use Antigravity CLI (the agy command) instead. Read the box below to see which group you belong to, then follow the matching install steps.
Which Gemini terminal tool works for your account now
Most personal Google accounts need Antigravity CLI
If you sign in with a free Google account or pay for Google AI Pro or Ultra, Gemini CLI stopped answering your requests on June 18, 2026. Install Antigravity CLI instead. Keep Gemini CLI only if your company gives you a Gemini Code Assist Standard or Enterprise licence, or you pay for a Gemini API or Gemini Enterprise Agent Platform key.
| Your account | Install this on Windows | Command to start it |
|---|---|---|
| Free Google account (Gemini Code Assist for individuals) | Antigravity CLI | agy |
| Google AI Pro or Ultra subscriber | Antigravity CLI | agy |
| Company Gemini Code Assist Standard or Enterprise licence | Gemini CLI, unchanged | gemini |
| Paid Gemini API or Agent Platform key | Gemini CLI still works | gemini |
Not sure which you have? If you never set up billing in Google Cloud or AI Studio and nobody at work gave you a licence, you are in one of the first two rows.
How Gemini CLI handed over to Antigravity CLI: the 2026 timeline
- 2025: Google released Gemini CLI as a free, open-source terminal agent under the Apache 2.0 licence. Anyone with a Google account could use it.
- May 19, 2026: Google announced Antigravity CLI, a new terminal tool inside its Antigravity platform, "available to everyone" from that day. It is written in Go and shares its agent setup with the Antigravity 2.0 desktop app.
- June 18, 2026: Gemini CLI and the Gemini Code Assist editor extensions stopped serving Google AI Pro and Ultra users and free Code Assist for individuals users. The same day, Google stopped new installs of Gemini Code Assist for GitHub on GitHub organisations.
- After the cutoff: enterprise customers on Code Assist Standard or Enterprise kept their access unchanged, and Gemini CLI kept working with paid Gemini and Agent Platform API keys.
- Today: Gemini CLI's own install page says it has not been tuned for the Gemini 4 Argon model, and points people who want that model to Antigravity.
Many of the old features made the move. Google's transition post says Antigravity CLI keeps agent skills, hooks, subagents and extensions, with extensions now called Antigravity plugins. It also says the two tools are not yet matched feature for feature, so check that anything you depend on exists before you delete your old setup.
Install Antigravity CLI on Windows (free and Pro or Ultra users)
- 1
Open PowerShell
Press the Windows key, type PowerShell and open it. A normal window works.
- 2
Run the installer
Paste the PowerShell command below. If you prefer Command Prompt, use the CMD version instead. Either one installs
agyintoC:\Users\<you>\AppData\Local\agy\bin. - 3
Check it in a new window
Close PowerShell, open a fresh window and run
agy --version. A version number means it worked. - 4
Start it in your project
Move into your project folder with
cdand typeagy. The first launch asks you to choose a colour scheme, a display mode and whether you trust the folder. - 5
Bring over your old Gemini setup
If you used Gemini CLI before, the first run offers a checklist of things to move across. Run
agy plugin import geminito turn old Gemini extensions into Antigravity plugins.
irm https://antigravity.google/cli/install.ps1 | iexcurl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmdYour project notes keep working with no edits: Antigravity CLI reads GEMINI.md and AGENTS.md in the project folder and your global GEMINI.md in the .gemini folder of your user profile. Two things do move. Project skills go from .gemini\skills to .agents\skills, and MCP servers (connections to outside tools) now live in their own mcp_config.json file. To run a single prompt without the full screen app, use agy -p "your prompt". The Antigravity docs and our Google Antigravity guide cover sign-in and settings.
agy in one pane and your other agents in the panes beside it, with a light on each pane that shows when one is waiting for you.Install Gemini CLI on Windows with npm (API keys and company licences)
Google's installation page lists Windows 11 24H2 or newer, Node.js 20 or newer, and 4 GB of RAM for casual use or 16 GB for long sessions on big projects (as of November 2026).
- 1
Install Node.js
Gemini CLI is an npm package, so it needs Node.js. If you do not have it, the first command below installs the long-term support version. Close and reopen PowerShell afterwards.
- 2
Check the version
Run
node --version. It should print v20 or higher. - 3
Install Gemini CLI with npm
Run the npm command below. It installs the
geminicommand for every folder on your PC. - 4
Start it
Move into your project and type
gemini. To try it once without installing, runnpx @google/gemini-cliinstead. - 5
Sign in the way your account needs
Pick the sign-in that matches your licence or key. The PowerShell lines for each are just below.
winget install --id OpenJS.NodeJS.LTSnpm install -g @google/gemini-cliGemini CLI has three release channels. Stay on @latest unless you want to test new features early:
npm install -g @google/gemini-cli@latest
npm install -g @google/gemini-cli@preview
npm install -g @google/gemini-cli@nightlyGemini CLI PowerShell sign-in settings
PowerShell sets environment variables with $env:, not export. Use the block that matches your account: a paid Gemini API key, a Code Assist licence tied to a Google Cloud project, or Vertex AI.
# Paid Gemini API key
$env:GEMINI_API_KEY = "YOUR_API_KEY"
# Code Assist licence
$env:GOOGLE_CLOUD_PROJECT = "YOUR_PROJECT_ID"
# Vertex AI
$env:GOOGLE_API_KEY = "YOUR_API_KEY"
$env:GOOGLE_GENAI_USE_VERTEXAI = "true"Never paste a key into a file inside your project, because project files often end up on GitHub.
Three symbols that make your first Gemini CLI session easier
| Type | What it does | Example in PowerShell |
|---|---|---|
/ and a command | Runs a built-in command | /help, /model, /stats, /quit |
@ and a path | Adds a file or folder to your request | @src\app.ts explain this file |
! and a command | Runs a shell command and shows you the output | !npm test |
Run /init early. It writes a GEMINI.md file that Gemini reads at the start of every session, so put your build and test commands there. Rules you want in every project go in %USERPROFILE%\.gemini\GEMINI.md. If you switch on checkpointing (Gemini CLI's automatic save points) in your settings, /restore rolls the files back when an edit goes wrong. Our Gemini CLI guide explains the rest of the commands.
Gemini CLI PowerShell problems and how to fix them
"gemini.ps1 cannot be loaded because running scripts is disabled on this system"
PowerShell's execution policy blocks the small script launcher npm creates for each command. Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once and try again. That only changes the setting for your own user. If you would rather not touch the policy at all, type gemini.cmd instead of gemini, since npm also creates a .cmd launcher that the policy does not cover.
"The term 'gemini' is not recognized"
First open a new PowerShell window, because the one you installed from does not know about new commands. If it still fails, run npm prefix -g to see where npm puts global tools, and make sure that folder is on your PATH (the list of folders Windows searches for programs).
"npm is not recognized"
Node.js is missing or the window is too old to see it. Install it with winget install --id OpenJS.NodeJS.LTS, close every terminal, and open a fresh one.
export GEMINI_API_KEY does nothing
export is a Mac and Linux command. In PowerShell write $env:GEMINI_API_KEY = "YOUR_API_KEY" instead. In Command Prompt the form is set GEMINI_API_KEY=YOUR_API_KEY.
The API key vanishes when you open a new window
$env: only lasts for the window you typed it in. To keep it, run setx GEMINI_API_KEY "YOUR_API_KEY" once and open a new terminal. The window you ran setx in will not see the change, so test in the new one.
Sign-in works but every request is refused
You are almost certainly on a free, Google AI Pro or Ultra account, which Gemini CLI no longer serves. Install Antigravity CLI with the steps above. Your GEMINI.md notes come with you.
"agy" is not recognized after installing Antigravity CLI
Open a new window first. Then run Test-Path "$env:LOCALAPPDATA\agy\bin". If it prints True, the program is there and that folder needs adding to your user PATH. If it prints False, run the installer again.
Files are locked or edits fail in OneDrive folders
Any coding agent can trip over a folder that OneDrive is syncing while the agent edits it. Keep projects in a short local path such as C:\code\my-app.
Folders still have odd permissions after a sandboxed session
Gemini CLI's Windows sandbox marks the files and folders it writes to with a "Low" integrity level (a Windows trust label). Google's sandbox docs say those labels stay on disk after the session ends. Only point it at project folders. To put a folder back to normal, run the command below.
icacls "C:\path\to\dir" /setintegritylevel MediumStill stuck, or deciding whether Gemini is the right agent at all? Our three-way comparison puts it next to Claude Code and Codex, and the Claude Code on Windows page covers the same kind of PowerShell fixes for Anthropic's tool.
Gemini and Antigravity on Windows: common questions
How do I install Gemini CLI on Windows?
+
Install Node.js 20 or newer (for example winget install --id OpenJS.NodeJS.LTS), open a new PowerShell window, run npm install -g @google/gemini-cli, then type gemini in your project folder.
Is Gemini CLI still free on Windows?
+
No. Since June 18, 2026, free users and Google AI Pro or Ultra subscribers are served by Antigravity CLI. Gemini CLI still works with Code Assist Standard or Enterprise licences and paid API keys.
What is the Antigravity CLI install command for Windows?
+
In PowerShell run irm https://antigravity.google/cli/install.ps1 | iex, then open a new window and check it with agy --version.
Do I need WSL for Gemini CLI or Antigravity CLI?
+
No. Gemini CLI runs in PowerShell through Node.js, and Antigravity CLI has its own Windows installer for PowerShell and CMD.
Will my GEMINI.md file work in Antigravity CLI?
+
Yes. Antigravity CLI reads GEMINI.md and AGENTS.md in your project with no changes. Project skills need moving to .agents\skills.
Sources
Run up to 12 AI coding agents in one window.
Claude Code, Codex, Gemini, Grok and more, side by side. Windows and Mac. From $29 a month.
Get startedKeep reading
Status report
Gemini CLI status report: free limits, API keys and the move to Antigravity CLI
Product tour
A tour of Google Antigravity: the app, CLI, IDE, extensions and SDK
Three-way comparison
Claude Code vs Codex vs Gemini: the three CLI coding agents compared
Windows install guide
Claude Code Windows install: choose your method, then get it running
Windows setup
Codex on Windows: the app or the CLI, and how to set up each one