Skip to content
Back to search

gemini-cli

SkillWorks with Gemini CLIGitHub

An open-source AI agent that brings the power of Gemini directly into your terminal.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/google-gemini/gemini-cli with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/google-gemini/gemini-cli'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/google-gemini-gemini-cli/badge.svg)](/listings/google-gemini-gemini-cli)

HTML

<a href="/listings/google-gemini-gemini-cli"><img src="/api/listings/google-gemini-gemini-cli/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

See [Gemini CLI installation, execution, and releases](https://www.geminicli.com/docs/get-started/installation) for recommended system specifications and a detailed installation guide.

Quick Install

Run instantly with npx

# Using npx (no installation required)
npx @google/gemini-cli

Install globally with npm

npm install -g @google/gemini-cli

Install globally with Homebrew (macOS/Linux)

brew install gemini-cli

Install globally with MacPorts (macOS)

sudo port install gemini-cli

Install with Anaconda (for restricted environments)

# Create and activate a new environment
conda create -y -n gemini_env -c conda-forge nodejs
conda activate gemini_env

# Install Gemini CLI globally via npm (inside the environment)
npm install -g @google/gemini-cli

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 371 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Gemini CLI
  2. [![Gemini CLI CI](https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml)
  3. [![Gemini CLI E2E (Chained)](https://github.com/google-gemini/gemini-cli/actions/workflows/chained_e2e.yml/badge.svg)](https://github.com/google-gemini/gemini-cli/actions/workflows/chained_e2e.yml)
  4. [![Version](https://img.shields.io/npm/v/@google/gemini-cli)](https://www.npmjs.com/package/@google/gemini-cli)
  5. [![License](https://img.shields.io/github/license/google-gemini/gemini-cli)](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
  6. [![View Code Wiki](https://assets.codewiki.google/readme-badge/static.svg)](https://codewiki.google/github.com/google-gemini/gemini-cli?utm_source=badge&utm_medium=github&utm_campaign=github.com/google-gemini/gemini-cli)
  7. <!-- prettier-ignore -->
  8. > [!IMPORTANT]
  9. > **Read before installing — Gemini CLI status & tool guide**
  10. >
  11. > - **Enterprise Code Assist only:** Designed for **Gemini Code Assist Standard / Enterprise** licenses and **Code Assist for GitHub** on Google Cloud (your access remains unchanged).
  12. > - **No free tier or Google AI plans:** Free individual access and **Google AI Pro / Ultra** (Google One) moved to [Antigravity CLI](https://antigravity.google/product/antigravity-cli) on June 18, 2026 ([transition post](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/)).
  13. > - **Not optimized for Gemini 4+:** Not tuned for the **Gemini 4** series (for example, [Gemini 4 Argon](https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-argon/)) or future releases in this or later generations.
  14. > - **Not for model benchmarks:** Don't use Gemini CLI to benchmark Gemini models—its harness isn't tuned for Gemini 4+ and produces unrepresentative scores.
  15. >
  16. > **Which Google CLI do you need?**
  17. >
  18. > | Tool | Best for | Links |
  19. > | :--- | :--- | :--- |
  20. > | **[Antigravity CLI](https://antigravity.google/product/antigravity-cli)** (`agy`) | Interactive multi-agent coding terminal. Use for **Gemini 4 Argon**+, free / **Google AI Pro & Ultra** accounts, or Google Cloud. | [Download](https://antigravity.google/download) · [Migrate](https://antigravity.google/docs/cli/gcli-migration) · [Argon post](https://antigravity.google/blog/gemini-4-argon-in-google-antigravity) |
  21. > | **[Gemini API CLI](https://github.com/google-gemini/gemini-api-cli)** (`gemini-api`) | Stateless API CLI *(not a coding harness)*. Gives agents (`agy`, Claude Code, Codex), scripts, and CI direct commands for Gemini models, media gen, file analysis, and managed agents. | [GitHub](https://github.com/google-gemini/gemini-api-cli) · [Releases](https://github.com/google-gemini/gemini-api-cli/releases) · [API docs](https://ai.google.dev/gemini-api/docs) |
  22. > | **Gemini CLI** (`gemini`, *this repo*) | Organizations with **Gemini Code Assist Standard / Enterprise** or **Code Assist for GitHub** on Google Cloud *(plus legacy paid API / Vertex keys)*. | [Docs](https://geminicli.com/docs/) |
  23. Gemini CLI (`gemini`) is an open-source terminal agent maintained for enterprise
  24. Gemini Code Assist workflows on Google Cloud. Learn more in the
  25. [Gemini CLI documentation](https://geminicli.com/docs/).
  26. ## 📦 Installation
  27. See
  28. [Gemini CLI installation, execution, and releases](https://www.geminicli.com/docs/get-started/installation)
  29. for recommended system specifications and a detailed installation guide.
  30. ### Quick Install
  31. #### Run instantly with npx
  32. ```bash
  33. # Using npx (no installation required)
  34. npx @google/gemini-cli
  35. ```
  36. #### Install globally with npm
  37. ```bash
  38. npm install -g @google/gemini-cli
  39. ```
  40. #### Install globally with Homebrew (macOS/Linux)
  41. ```bash
  42. brew install gemini-cli
  43. ```
  44. #### Install globally with MacPorts (macOS)
  45. ```bash
  46. sudo port install gemini-cli
  47. ```
  48. #### Install with Anaconda (for restricted environments)
  49. ```bash
  50. # Create and activate a new environment
  51. conda create -y -n gemini_env -c conda-forge nodejs
  52. conda activate gemini_env
  53. # Install Gemini CLI globally via npm (inside the environment)
  54. npm install -g @google/gemini-cli
  55. ```
  56. ## Release Channels
  57. See [Releases](https://www.geminicli.com/docs/changelogs) for more details.
  58. ### Preview
  59. New preview releases will be published each week at UTC 23:59 on Tuesdays. These
  60. releases will not have been fully vetted and may contain regressions or other
  61. outstanding issues. Please help us test and install with `preview` tag.
  62. ```bash
  63. npm install -g @google/gemini-cli@preview
  64. ```
  65. ### Stable
  66. - New stable releases will be published each week at UTC 20:00 on Tuesdays, this
  67. will be the full promotion of last week's `preview` release + any bug fixes
  68. and validations. Use `latest` tag.
  69. ```bash
  70. npm install -g @google/gemini-cli@latest
  71. ```
  72. ### Nightly
  73. - New releases will be published each day at UTC 00:00. This will be all changes
  74. from the main branch as represented at time of release. It should be assumed
  75. there are pending validations and issues. Use `nightly` tag.
  76. ```bash
  77. npm install -g @google/gemini-cli@nightly
  78. ```
  79. ## 📋 Key Features
  80. ### Code Understanding & Generation
  81. - Query and edit large codebases
  82. - Generate new apps from PDFs, images, or sketches using multimodal capabilities
  83. - Debug issues and troubleshoot with natural language
  84. ### Automation & Integration
  85. - Automate operational tasks like querying pull requests or handling complex
  86. rebases
  87. - Use MCP servers to connect new capabilities, including
  88. [media generation with Imagen, Veo or Lyria](https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia)
  89. - Run non-interactively in scripts for workflow automation
  90. ## 🔐 Authentication Options
  91. Choose the authentication method that best fits your needs:
  92. ### Option 1: Sign in with Google (OAuth login using your Google Account)
  93. #### When using a paid Code Assist License from your organization, remember to set the Google Cloud Project
  94. ```bash
  95. # Set your Google Cloud Project
  96. export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
  97. gemini
  98. ```
  99. ### Option 2: Gemini API Key
  100. **✨ Best for:** Developers who need specific model control or paid tier access
  101. **Benefits:**
  102. - **Model selection**: Choose specific Gemini models
  103. - **Usage-based billing**: Upgrade for higher limits when needed
  104. ```bash
  105. # Get your key from https://aistudio.google.com/apikey
  106. export GEMINI_API_KEY="YOUR_API_KEY"
  107. gemini
  108. ```
  109. ### Option 3: Vertex AI
  110. **✨ Best for:** Enterprise teams and production workloads
  111. **Benefits:**
  112. - **Enterprise features**: Advanced security and compliance
  113. - **Scalable**: Higher rate limits with billing account
  114. - **Integration**: Works with existing Google Cloud infrastructure
  115. ```bash
  116. # Get your key from Google Cloud Console
  117. export GOOGLE_API_KEY="YOUR_API_KEY"
  118. export GOOGLE_GENAI_USE_VERTEXAI=true
  119. gemini
  120. ```
  121. For Google Workspace accounts and other authentication methods, see the
  122. [authentication guide](https://www.geminicli.com/docs/get-started/authentication).
  123. ## 🚀 Getting Started
  124. ### Basic Usage
  125. #### Start in current directory
  126. ```bash
  127. gemini
  128. ```
  129. #### Include multiple directories
  130. ```bash
  131. gemini --include-directories ../lib,../docs
  132. ```
  133. #### Use specific model
  134. ```bash
  135. gemini -m gemini-2.5-flash
  136. ```
  137. #### Non-interactive mode for scripts
  138. Get a simple text response:
  139. ```bash
  140. gemini -p "Explain the architecture of this codebase"
  141. ```
  142. For more advanced scripting, including how to parse JSON and handle errors, use
  143. the `--output-format json` flag to get structured output:
  144. ```bash
  145. gemini -p "Explain the architecture of this codebase" --output-format json
  146. ```
  147. For real-time event streaming (useful for monitoring long-running operations),
  148. use `--output-format stream-json` to get newline-delimited JSON events:
  149. ```bash
  150. gemini -p "Run tests and deploy" --output-format stream-json
  151. ```
  152. ### Quick Examples
  153. #### Start a new project
  154. ```bash
  155. cd new-project/
  156. gemini
  157. > Write me a Discord bot that answers questions using a FAQ.md file I will provide
  158. ```
  159. #### Analyze existing code
  160. ```bash
  161. git clone https://github.com/google-gemini/gemini-cli
  162. cd gemini-cli
  163. gemini
  164. > Give me a summary of all of the changes that went in yesterday
  165. ```
  166. ## 📚 Documentation
  167. ### Getting Started
  168. - [**Quickstart Guide**](https://www.geminicli.com/docs/get-started) - Get up
  169. and running quickly.
  170. - [**Authentication Setup**](https://www.geminicli.com/docs/get-started/authentication) -
  171. Detailed auth configuration.
  172. - [**Configuration Guide**](https://www.geminicli.com/docs/reference/configuration) -
  173. Settings and customization.
  174. - [**Keyboard Shortcuts**](https://www.geminicli.com/docs/reference/keyboard-shortcuts) -
  175. Productivity tips.
  176. ### Core Features
  177. - [**Commands Reference**](https://www.geminicli.com/docs/reference/commands) -
  178. All slash commands (`/help`, `/chat`, etc).
  179. - [**Custom Commands**](https://www.geminicli.com/docs/cli/custom-commands) -
  180. Create your own reusable commands.
  181. - [**Context Files (GEMINI.md)**](https://www.geminicli.com/docs/cli/gemini-md) -
  182. Provide persistent context to Gemini CLI.
  183. - [**Checkpointing**](https://www.geminicli.com/docs/cli/checkpointing) - Save
  184. and resume conversations.
  185. - [**Token Caching**](https://www.geminicli.com/docs/cli/token-caching) -
  186. Optimize token usage.
  187. ### Tools & Extensions
  188. - [**Built-in Tools Overview**](https://www.geminicli.com/docs/reference/tools)
  189. - [File System Operations](https://www.geminicli.com/docs/tools/file-system)
  190. - [Shell Commands](https://www.geminicli.com/docs/tools/shell)
  191. - [Web Fetch & Search](https://www.geminicli.com/docs/tools/web-fetch)
  192. - [**MCP Server Integration**](https://www.geminicli.com/docs/tools/mcp-server) -
  193. Extend with custom tools.
  194. - [**Custom Extensions**](https://geminicli.com/docs/extensions/writing-extensions) -
  195. Build and share your own commands.
  196. ### Advanced Topics
  197. - [**Headless Mode (Scripting)**](https://www.geminicli.com/docs/cli/headless) -
  198. Use Gemini CLI in automated workflows.
  199. - [**IDE Integration**](https://www.geminicli.com/docs/ide-integration) - VS
  200. Code companion.
  201. - [**Sandboxing & Security**](https://www.geminicli.com/docs/cli/sandbox) - Safe
  202. execution environments.
  203. - [**Trusted Folders**](https://www.geminicli.com/docs/cli/trusted-folders) -
  204. Control execution policies by folder.
  205. - [**Enterprise Guide**](https://www.geminicli.com/docs/cli/enterprise) - Deploy
  206. and manage in a corporate environment.
  207. - [**Telemetry & Monitoring**](https://www.geminicli.com/docs/cli/telemetry) -
  208. Usage tracking.
  209. - [**Tools reference**](https://www.geminicli.com/docs/reference/tools) -
  210. Built-in tools overview.
  211. - [**Local development**](https://www.geminicli.com/docs/local-development) -
  212. Local development tooling.
  213. ### Troubleshooting & Support
  214. - [**Troubleshooting Guide**](https://www.geminicli.com/docs/resources/troubleshooting) -
  215. Common issues and solutions.
  216. - [**FAQ**](https://www.geminicli.com/docs/resources/faq) - Frequently asked
  217. questions.
  218. - Use `/bug` command to report issues directly from the CLI.
  219. ### Using MCP Servers
  220. Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with
  221. custom tools:
  222. ```text
  223. > @github List my open pull requests
  224. > @slack Send a summary of today's commits to #dev channel
  225. > @database Run a query to find inactive users
  226. ```
  227. See the
  228. [MCP Server Integration guide](https://www.geminicli.com/docs/tools/mcp-server)
  229. for setup instructions.
  230. ## 🤝 Contributing
  231. We welcome contributions! Gemini CLI is fully open source (Apache 2.0), and we
  232. encourage the community to:
  233. - Report bugs and suggest features.
  234. - Improve documentation.
  235. - Submit code improvements.
  236. - Share your MCP servers and extensions.
  237. See our [Contributing Guide](./CONTRIBUTING.md) for development setup, coding
  238. standards, and how to submit pull requests.
  239. Check our [Official Roadmap](https://github.com/orgs/google-gemini/projects/11)
  240. for planned features and priorities.
  241. ## 📖 Resources
  242. - **[Free Course](https://learn.deeplearning.ai/courses/gemini-cli-code-and-create-with-an-open-source-agent/information)** -
  243. Learn the basics.
  244. - **[Official Roadmap](./ROADMAP.md)** - See what's coming next.
  245. - **[Changelog](https://www.geminicli.com/docs/changelogs)** - See recent
  246. notable updates.
  247. - **[NPM Package](https://www.npmjs.com/package/@google/gemini-cli)** - Package
  248. registry.
  249. - **[GitHub Issues](https://github.com/google-gemini/gemini-cli/issues)** -
  250. Report bugs or request features.
  251. - **[Security Advisories](https://github.com/google-gemini/gemini-cli/security/advisories)** -
  252. Security updates.
  253. ### Uninstall
  254. See the [Uninstall Guide](https://www.geminicli.com/docs/resources/uninstall)
  255. for removal instructions.
  256. ## 📄 Legal
  257. - **License**: [Apache License 2.0](LICENSE)
  258. - **Terms of Service**:
  259. [Terms & Privacy](https://www.geminicli.com/docs/resources/tos-privacy)
  260. - **Security**: [Security Policy](SECURITY.md)
  261. <p align="left">
  262. <a href="https://www.star-history.com/google-gemini/gemini-cli">
  263. <picture>
  264. <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=google-gemini/gemini-cli&theme=dark" />
  265. <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=google-gemini/gemini-cli" />
  266. <img alt="Star History Rank" src="https://api.star-history.com/badge?repo=google-gemini/gemini-cli" />
  267. </picture>
  268. </a>
  269. </p>
  270. ---
  271. <p align="center">
  272. Built with ❤️ by Google and the open source community
  273. </p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.