Green computer code text scrolling on a dark terminal screen, illustrating Gemini CLI terminal coding
Photo by Jake Walker on Unsplash · source · credits

Gemini CLI in 2026: Install for Code Assist Teams (and When to Use Antigravity)

Also available in Hindi: यह लेख हिंदी में पढ़ें

Gemini CLI is Google's open-source terminal agent for working with Gemini models against your local project: explain code, edit files, run tools and connect MCP servers. In mid-2026 Google changed who should install which CLI. This tutorial follows the current official README and Cloud docs, not older “free for everyone” blog posts.

Read this before you install

The google-gemini/gemini-cli README status note says:

Google Cloud's Gemini CLI page repeats the warning: for the best coding experience with the latest Gemini models, use Antigravity CLI. Code Assist quotas for Gemini CLI are shared with Gemini Code Assist agent mode; pay-as-you-go Gemini API keys are also mentioned.

Which Google CLI to choose per official README

Install Gemini CLI

From the project README and geminicli.com docs:

npm install -g @google/gemini-cli
# or one-shot
npx @google/gemini-cli
# macOS/Linux alternative listed in the README
brew install gemini-cli

Cloud Shell users get Gemini CLI without extra setup per Google Cloud docs. Follow the official authentication guide for Code Assist, Vertex or API key paths your organisation supports — do not assume a free personal Google AI login still works for this binary.

First useful session

Gemini CLI install, auth, explore and GEMINI.md steps

  1. cd into a git repo and create a clean branch.
  2. Run gemini for an interactive REPL, or gemini -p "Summarize this repository's layout" for a one-shot prompt (cheatsheet patterns from the docs).
  3. Ask read-only questions first: how tests run, where auth lives, what a failing stack trace means.
  4. Add project memory with GEMINI.md (documented under project context) so recurring rules stay out of every prompt.
  5. For edits, keep scope tight, review diffs, and prefer plan/read-only modes when available before write-heavy steps.
  6. Resume work with session flags such as gemini -r "latest" when the cheatsheet matches your installed version (gemini --help to confirm).

When to choose Antigravity instead

Pick Antigravity CLI if you are an individual on free / Google AI Pro & Ultra, or you need Gemini 4-series interactive multi-agent coding. Pick Gemini API CLI when you only need a stateless API helper for scripts or other agents. Stay on Gemini CLI when your company already standardises on Code Assist Standard/Enterprise or Code Assist for GitHub and your admin confirms quota and data-protection settings.

For broader agent comparisons, see Claude Code vs Codex and how to build an AI agent.

Sources

Related reading: Claude Code Tutorial for Beginners (2026 Guide), Claude Code vs Antigravity: Which Should You Use?, Antigravity Knowledge Work Layout: Setup Guide for Teams and Gemini 2.5 Pro and Flash Deprecation: Migration Checklist.

FAQ

Is Gemini CLI still free for personal Google AI plans?

According to the official README, free individual access and Google AI Pro/Ultra moved to Antigravity CLI on 18 June 2026. Gemini CLI targets Code Assist Standard/Enterprise (and related GitHub Code Assist) workflows.

How do I install it quickly?

npm install -g @google/gemini-cli, npx @google/gemini-cli, or brew install gemini-cli as listed in the README. Confirm auth against current docs for your account type.

Can I use it in Cloud Shell?

Yes. Google Cloud documentation says Gemini CLI is available in Cloud Shell without additional setup.

Should I benchmark Gemini 4 with Gemini CLI?

No. The README explicitly says the harness is not tuned for Gemini 4+ and scores would be unrepresentative.

About the author

Suraj Kumar builds and edits AIUseFlow, a directory of AI tools for vibe coders, agent builders and creators. News summaries are written in our own words and link to the original reporting. How we rank tools.

Get the weekly stack

Rank movers and new AI tools for builders, once a week. Free, no spam, unsubscribe anytime.