
gemini-cli
Google's own terminal coding agent — Gemini models only, and personal Google sign-in no longer reaches it
What is gemini-cli?
Google's own agent for the terminal: it reads a repository, edits files, runs shell commands, and can ground an answer in a live Google Search without extra setup. A read-only plan mode drafts the work before anything is written, a policy file settles in advance which tools may run, and one extension can install MCP servers, commands, subagents, skills and hooks together. It talks only to Gemini models, so it is a poor fit if you expect to switch providers or work offline — and since 18 June 2026 a personal Google sign-in no longer reaches it, leaving an API key, Vertex AI, or a Code Assist Standard or Enterprise licence.
What can you do with gemini-cli?
- Point it at a repo and give it standing instructions — It starts in the working directory, and
--include-directories ../lib,../docspulls in sibling folders. Standing instructions live in GEMINI.md files — one in your home directory, any in the workspace and its parent folders, plus more picked up mid-task the first time a tool touches a directory — and every file found is concatenated and sent with each prompt, not just at startup. - Make it plan before it touches anything — Plan mode is a read-only state whose only write is a Markdown plan you review and edit; Shift+Tab cycles between it, the default confirm-every-step mode, and auto-edit. Policy rules can settle allow, deny or ask per tool ahead of time, and an administrator's rules outrank a user's.
- Roll back a turn, or the whole session —
/rewind, or Esc twice, lists earlier turns and offers to undo the chat, the agent's file edits, or both. A separate checkpointing setting goes further and snapshots the project into a shadow Git repository before each edit. - Look things up mid-task — Google Search grounding and a page-fetching tool are built in, so the agent can check current library documentation or an unfamiliar error while it works instead of reasoning from what the model memorised.
- Install a whole toolset in one command —
gemini extensions install <github url>adds an extension that bundles MCP servers, custom slash commands, subagents, agent skills and hooks together — one install rather than many edits to settings.json, which matters when a team shares a setup. - Run it from a script or a pull request —
gemini -p "…" --output-format jsonreturns the reply, token counts and any error as one object,stream-jsonemits events line by line for long jobs, and Google's run-gemini-cli Action wires the same binary into PR review and issue triage.
Before you choose gemini-cli
- A personal Google account stopped working as a sign-in route on 18 June 2026, yet the README and setup guide shipped in the 0.55 line still recommend it, so newcomers follow the docs into a dead login.Reported in#27998
- Only Google's own Gemini models are supported: as of the 0.55 line there is no route to an OpenAI-compatible endpoint or to Ollama, and a locally run model can only be used to make routing decisions.Reported in#5938
Star history
17 Aug to 30 Oct · +2.1k
Frequently asked questions
Is gemini-cli free for commercial use?
gemini-cli is released under the Apache-2.0 licence — OSI-approved open source, which permits commercial use.
How can gemini-cli be deployed?
gemini-cli is available as Runs locally.