# Gemini CLI

Canonical: https://cqbase.net/en/entry/gemini-cli
Chinese: https://cqbase.net/zh/entry/gemini-cli
English: https://cqbase.net/en/entry/gemini-cli

> Google’s terminal agent for Gemini, including MCP client support.

google-gemini/gemini-cli is an Apache-2.0 terminal agent. The site is geminicli.com. It puts Gemini in the command line, and the repository topics include both MCP client and server. It fits people who already use Gemini and want the work to happen in a repository instead of a browser tab.

Start with read-only questions so you can see which files it touches, then allow edits. If you attach MCP servers, read each server’s permissions. Do not connect a long list at once.

Note (verified 15 November 2026): Google's [official announcement](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/) (published 19 May 2026) says that from 18 June 2026, Gemini CLI no longer serves Google AI Pro and Ultra users or people using it free through Gemini Code Assist for individuals. Individual users should switch to [Antigravity CLI](https://antigravity.google/product/antigravity-cli). Organizations on a Gemini Code Assist Standard or Enterprise license, and anyone with a paid Gemini API key, can keep using Gemini CLI.

## What problem it solves

Gemini CLI (the command is `gemini`) is Google’s open-source terminal coding agent. The repository is [google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli), licensed under Apache-2.0. In a project directory it can read code, edit files, and run commands, and it can act as an MCP client. You can also keep project conventions in `GEMINI.md`.

Read the status note at the top of the repository first. As of the 2026-11-15 check, the official README says Gemini CLI is intended for organizations with a **Gemini Code Assist Standard or Enterprise** license, or Code Assist for GitHub on Google Cloud, and it can still be used with existing paid Gemini or Vertex API keys. The personal free path and Google AI Pro / Ultra (Google One) moved to [Antigravity CLI](https://antigravity.google/product/antigravity-cli) (the command is `agy`) on 2026-06-18. See Google’s [transition post](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/). Do not treat older tutorials that promise a large free daily quota on Gemini CLI as the current default.

## Who it is for

It is for people whose organization already has Code Assist Standard or Enterprise, or who already have a usable paid API or Vertex key and want Gemini in the terminal. If you are on a personal free account or Google AI Pro / Ultra, official guidance is to use Antigravity CLI rather than keep Gemini CLI as your personal daily driver.

The install docs also require Node.js 20.0.0 or later, and a location that is supported for Gemini Code Assist. Use Google’s official pages for the current list. This page does not state an unverified conclusion about mainland China, and it does not discuss workarounds.

## How to install it

Verified on 2026-11-15 (Asia/Shanghai). The commands come from the current README and the [installation docs](https://geminicli.com/docs/get-started/installation/). The common install is:

```bash
npm install -g @google/gemini-cli
```

You can also run it without a global install:

```bash
npx @google/gemini-cli
```

On macOS or Linux you can use `brew install gemini-cli`. After install, run `gemini` in a project directory.

Organization users should sign in with a Google account and set a Google Cloud project when the docs ask for one. If you use a Gemini API key:

```bash
export GEMINI_API_KEY="YOUR_API_KEY"
```

Then start `gemini` and choose the API-key option. Get the key from Google AI Studio. Do not commit it or paste it into the chat. Vertex AI follows the official authentication docs. Add MCP servers with `gemini mcp add`, or by editing `~/.gemini/settings.json`. Project conventions can live in `GEMINI.md`.

On quotas: the geminicli.com quota page still lists numbers for the personal free tier and for Google AI Pro / Ultra, but that page no longer matches the repository README or the transition announcement (published 2026-05-19). Treat the README and the announcement as authoritative. If you need personal or Pro / Ultra quotas, read the official Antigravity CLI docs instead.

## A worked example

One README getting-started prompt asks the agent to summarize recent repository changes. This guide did not run it, so it does not invent a summary.

1. Confirm that your account is still a supported Gemini CLI path (organization Code Assist, or a usable paid API / Vertex key). If you are on the personal free tier or on Pro / Ultra, use Antigravity CLI instead.
2. Run `gemini` in the repository and finish sign-in.
3. Send the README example: `Give me a summary of all of the changes that went in yesterday`. Official docs say it should inspect local changes and summarize them.
4. Compare the answer with `git log` or a diff yourself. Do not treat one reply as a verified changelog. If you want file edits, give a narrow follow-up and review the diff.

## Common pitfalls

- Following an old tutorial and signing into Gemini CLI with a personal free account or Google AI Pro / Ultra. Official posts say those paths stopped being served by Gemini CLI and the Code Assist IDE extensions on 2026-06-18; use Antigravity CLI instead. If you see 403 or an eligibility error, read the transition post before reinstalling. [Issue #24517](https://github.com/google-gemini/gemini-cli/issues/24517) reported 403 errors for Google One subscribers (now closed; the context may have changed).
- Treating stale quota-page numbers as a current guarantee. Use the repository README.
- Wiring in too many secrets or MCP servers at once. Start with read-only questions so you can see which files it touches, and review each MCP server’s permissions.
- Capacity or rate limits. [Issue #24937](https://github.com/google-gemini/gemini-cli/issues/24937) tracks 429 and capacity problems. Official docs mention `/stats model` for session usage. Do not assume the old personal free quota still applies.

## FAQ

### Can I still use Gemini CLI for free with a personal Google account?

According to the transition post (published 2026-05-19, effective 2026-06-18) and the current README, the personal free path and Google AI Pro / Ultra moved to Antigravity CLI. Gemini CLI remains for organization Code Assist Standard / Enterprise, Code Assist for GitHub, and existing paid API or Vertex keys.

### Which command should a personal user install?

The official comparison says personal free accounts, Google AI Pro / Ultra, and the Gemini 4 series should use Antigravity CLI (`agy`). The `gemini` command in this repository is aimed at organization Code Assist workflows.

### Which Node.js version do I need?

The official installation docs require Node.js 20.0.0 or later.

### How do I add MCP servers?

Use `gemini mcp add`, or edit `~/.gemini/settings.json`. Then check with `gemini mcp list`. Add only the servers you need.

### What is GEMINI.md?

It is Gemini CLI’s project convention file, similar to instruction files in other coding agents. Official `GEMINI.md` docs recommend putting build commands and standing rules there.

## Sources and license

The [google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli) repository is licensed under Apache-2.0. This page is a paraphrase, for CQBase — Context & Query Base, of the README, the [installation docs](https://geminicli.com/docs/get-started/installation/), the [authentication docs](https://geminicli.com/docs/get-started/authentication), and the [transition post](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/), all checked on 2026-11-15. If product ownership or install commands change, the repository and official site win.

## Catalog record

- Author: google-gemini
- License: Apache-2.0
- Source: https://github.com/google-gemini/gemini-cli
- Added: 2026-11-15
- GitHub stars: 108841 (captured 2026-11-15)

