engineering / agent

Gemini CLI

An open-source AI agent for the terminal that uses Gemini models, with built-in file, shell and web tools and MCP server support.

At a glance

Purpose
An open-source AI agent for the terminal that uses Gemini models, with built-in file, shell and web tools and MCP server support.
Runs in
Local agent with shell
Operating systems
macOS, Linux
Needs
Runtime: Node.js for the Anaconda installation; Needs internet: Yes; Needs accounts or API keys beyond your agent: Not stated
Files and data
Reads files: Yes; Writes files: Yes; Sends data to other services: Yes
Tool type
Agent
Delivery
From GitHub
Version
Latest on the main branch
Access
Code on GitHub
Compatibility
According to the README, the install routes are npx, npm, Homebrew for macOS and Linux, MacPorts for macOS, and Anaconda for restricted environments. It names a VS Code companion in its IDE integration documentation and a GitHub Action. It describes Gemini models through Sign in with Google, a Gemini API key or Vertex AI, and MCP servers for custom tools.
External costs
The README lists three authentication options. It says Sign in with Google has a free tier of 60 requests per minute and 1,000 requests per day with a personal Google account. It says a Gemini API key has a free tier with usage-based billing when you upgrade for higher limits, and that Vertex AI has higher rate limits with a billing account. It mentions a paid Code Assist License from an organization. It states no prices.
Permissions
The README offers execution through npx and global installation through npm, Homebrew or MacPorts, including a sudo MacPorts command. The README describes Google account browser sign-in, a Gemini API key or Vertex AI credentials. The README lists file operations, shell commands, web fetching and Google Search grounding. The README shows access to additional directories with --include-directories and configuration of MCP servers in ~/.gemini/settings.json. The README describes codebase edits and complex rebases, and its MCP examples include database queries and sending a commit summary to Slack. The README describes GitHub Action workflows with pull-request feedback, issue labeling and scheduled automation. The top-level inventory includes scripts/, but the README does not describe that folder's contents. The README links separate sandboxing guidance and a Trusted Folders page described as controlling execution policies by folder.
Usage terms
Apache License 2.0, as stated in the repository. See its LICENSE file for the exact terms.

What it does

According to the README, Gemini CLI is an open-source AI agent that brings Gemini into your terminal. The README lists built-in tools for Google Search grounding, file operations, shell commands and web fetching, and support for MCP servers that you configure in ~/.gemini/settings.json.

The README describes uses such as querying and editing large codebases, generating apps from PDFs, images or sketches, debugging with natural language, and automating operational tasks such as querying pull requests or handling complex rebases. It also describes conversation checkpointing, custom context files named GEMINI.md, custom commands, and a non-interactive mode for scripts that can return text, JSON or streaming JSON.

The README describes a separate Gemini CLI GitHub Action with automated feedback and suggestions on pull requests, issue triage, and on-demand help when you mention @gemini-cli in issues and pull requests. The repository also contains skill folders, for example under .gemini/skills and packages/core/src/skills/builtin.

Who it is for

Developers who work in the command line and want an AI agent that uses Gemini models.

Example tasks

Run gemini -p "Explain the architecture of this codebase" for a text response in non-interactive mode.
Add --output-format json to the same command for structured output.
Configure an MCP server in ~/.gemini/settings.json to add custom tools.
Add a GEMINI.md context file to give Gemini CLI persistent context for a project.
Add the Gemini CLI GitHub Action to your GitHub workflows.

Getting started

The README says you can run it without installing:
npx @google/gemini-cli
Or install it globally with one of:
npm install -g @google/gemini-cli
brew install gemini-cli
sudo port install gemini-cli
It lists Homebrew for macOS and Linux and MacPorts for macOS. It also gives an Anaconda route for restricted environments that installs Node.js in a conda environment and then installs through npm.
Start with:
gemini
Then choose Sign in with Google and follow the browser authentication flow when prompted, or use another authentication option.
The README has the exact commands.

Limitations

The README lists three authentication options: Sign in with Google through a browser flow, a Gemini API key set in GEMINI_API_KEY, and Vertex AI. For Sign in with Google, the README lists automatic updates to the latest models. For Vertex AI, it sets GOOGLE_API_KEY to your key and GOOGLE_GENAI_USE_VERTEXAI to true. For a paid Code Assist License from your organization, it says to set the Google Cloud Project. It describes preview, stable and nightly release channels. It says preview releases may contain regressions or other outstanding issues, and that nightly releases should be assumed to have pending validations and issues. It links to separate installation guidance for recommended system specifications.
The repository can change at any time; check its README before you install.

Data practices

The README has no data handling section. What is sent where depends on the authentication option you choose: Sign in with Google, a Gemini API key or Vertex AI. Its Legal section links Terms & Privacy, and its documentation list links Telemetry & Monitoring, which it describes as usage tracking. The README itself does not say how to turn telemetry off.

Community experience

Not rated yet

Sign in to share your experience.

Comments 0

No comments yet.

Sign in to comment

Report a listing concern