# gemini-cli

> Terminal AI agent providing direct command line access to Google Gemini models with file operations, web search, and tool integration.

Stars: 108.7k · Language: TypeScript · License: Apache-2.0 · Categories: AI

- Repository: https://github.com/google-gemini/gemini-cli
- Website: https://geminicli.com
- Page: https://www.trmn.sh/tools/gemini-cli

## Install

- Homebrew: `brew install gemini-cli`
- npm: `npm install -g @google/gemini-cli`
- npx: `npx @google/gemini-cli`

## Overview

Gemini CLI is a terminal-based AI agent that provides direct command line access to Google Gemini models. It operates as an interactive conversational interface where users can query AI models, analyze codebases, generate applications from various inputs including PDFs and images, and automate development tasks.

The tool includes built-in capabilities for file system operations, shell command execution, Google Search grounding for real-time information, and web content fetching. It supports Model Context Protocol (MCP) for extending functionality with custom tools and integrations. Users can configure custom context files (GEMINI.md) to tailor behavior for specific projects and use conversation checkpointing to save and resume complex sessions.

Gemini CLI offers multiple authentication methods including OAuth with Google accounts (providing 60 requests/min and 1,000 requests/day in the free tier), Gemini API keys, and Vertex AI integration for enterprise use. The tool supports both interactive terminal sessions and non-interactive scripting modes with JSON output formats for automated workflows. It integrates with GitHub Actions for automated code reviews and issue triage, making it suitable for developers, DevOps teams, and automation engineers working primarily in terminal environments.

### Installation

```bash
# via Homebrew
brew install gemini-cli
```

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

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

![Gemini CLI terminal interface](https://media.trmn.sh/cached/32ae5f77034d59b8e8455801e1827faf9b964e89afa766bfa32f0076fc6f98c4.png)

## Alternatives

- [OmO](https://www.trmn.sh/tools/oh-my-openagent.md): Terminal coding agent run through the omo command. It runs on senpi, a fork of pi, and can split a job into parallel agents across multiple models. (TypeScript, 70.6k stars)
- [Claude Code](https://www.trmn.sh/tools/claude-code.md): AI-powered coding assistant that runs in the terminal and understands your codebase to execute tasks through natural language commands. (TypeScript, 154.3k stars)
- [oh-my-pi](https://www.trmn.sh/tools/oh-my-pi.md): Terminal coding agent (fork of Pi) with LSP and DAP debugger integration, subagents, Python/Bun execution, and in-process native tools. Supports 60+ providers. (TypeScript, 37.5k stars)
- [Continue](https://www.trmn.sh/tools/continue.md): Open-source coding agent distributed as a CLI, VS Code extension, and JetBrains plugin. Repository is read-only after the final 2.0.0 release. (TypeScript, 36.4k stars)
- [OpenClaude](https://www.trmn.sh/tools/openclaude.md): Open-source terminal coding-agent CLI that works with OpenAI-compatible APIs, Gemini, GitHub Models, Codex, Ollama and other cloud or local model backends. (TypeScript, 34.2k stars)

## Guides

- [Claude Code Alternatives](https://www.trmn.sh/alternatives/claude-code): Claude Code alternatives: OpenCode, Codex CLI, Gemini CLI, Aider and Goose compared by providers, agents, git handling and free tiers.
- [codex Alternatives](https://www.trmn.sh/alternatives/codex): Codex alternatives: OpenCode, Claude Code, Gemini CLI, Aider and Goose compared by model support, interface and workflow.
- [gemini-cli Alternatives](https://www.trmn.sh/alternatives/gemini-cli): Alternatives to gemini-cli: opencode, claude-code, codex, goose, and aider compared by provider support, agents, and workflow.
- [Goose Alternatives](https://www.trmn.sh/alternatives/goose): Goose alternatives compared: OpenCode, Claude Code, Aider, Codex and Gemini CLI, with how each differs on scope, providers and workflow.
- [Open Interpreter Alternatives](https://www.trmn.sh/alternatives/open-interpreter): Open Interpreter alternatives: Goose, opencode, Claude Code, Codex and Gemini CLI compared on interfaces, providers and approval controls.
- [opencode Alternatives](https://www.trmn.sh/alternatives/opencode): opencode alternatives: Claude Code, codex, Gemini CLI, Aider and Goose compared by interface, model support and git workflow.
- [Best AI Coding Agents for the Terminal](https://www.trmn.sh/best/ai-coding-agents): Compare terminal AI coding agents: opencode, Claude Code, codex, Gemini CLI, aider, Goose and Open Interpreter by workflow and model support.
- [gemini-cli vs Goose](https://www.trmn.sh/compare/gemini-cli-vs-goose): gemini-cli vs Goose: a Gemini-only TypeScript terminal agent against a Rust agent with desktop app, CLI, API and 15+ providers.

---

Canonical: https://www.trmn.sh/tools/gemini-cli
