← Back to Discover

Gemini CLI

An open-source command-line AI agent from Google that brings Gemini into the terminal to query and edit codebases and run scripted tasks. The README says a newer CLI now replaces it for some users.

Coding agentsCommand-line tools

What it does

Gemini CLI is an open-source agent for the terminal that gives direct access to Gemini models. It can be used to query and edit large codebases, generate apps from PDFs, images or sketches, debug with plain-language prompts, and automate tasks such as handling pull requests or rebases. It runs instantly with npx or installs globally with npm, Homebrew, MacPorts or Conda. A non-interactive mode takes a prompt on the command line and can return JSON or a stream of JSON events for scripts. It can be extended with MCP servers set in a settings file, custom commands and extensions, and it reads GEMINI.md context files. The docs list checkpointing, token caching, trusted folders, sandboxing and a VS Code companion. You can sign in with a Google account, use a Gemini API key with usage-based billing, or use Vertex AI for enterprise workloads. The README carries a notice: Gemini CLI is not optimised for the latest Gemini models, and Antigravity CLI is recommended instead. It also says unpaid-tier and Google One users were moved from Gemini CLI to Antigravity CLI on June 18th, 2026. The CLI itself is released under Apache 2.0.

Capabilities

  • Terminal agent for querying, editing and debugging codebases
  • Non-interactive mode with JSON and streaming JSON output
  • MCP server integration and custom extensions
  • GEMINI.md context files, checkpointing and token caching
  • Sign in with Google, a Gemini API key or Vertex AI
  • Open source under Apache 2.0

When to use it

  • You want a terminal agent that works with Gemini models through an API key or Vertex AI
  • You need scriptable, non-interactive runs with structured output
  • You want to connect MCP servers to a command-line agent