graph TD
A[用户在终端输入] --> B[CLI 解析与上下文装配]
B --> C[构造请求<br/>系统提示+历史+工具清单]
C --> D[调用 Gemini 模型]
D --> E{"响应类型?"}
E -->|"文本回答"| F[渲染到终端]
E -->|"函数调用"| G[工具调度器]
G --> H{"工具类型?"}
H -->|"文件读写"| I[本地文件系统]
H -->|"Shell 执行"| J[子进程执行]
H -->|"搜索/检索"| K[内容检索]
I --> L[结果回灌上下文]
J --> L
K --> L
L --> D
F --> M[会话持久化]
Read before installing — Gemini CLI status & tool guide
Enterprise Code Assist only: Designed for Gemini Code Assist Standard / Enterprise licenses and Code Assist for GitHub on Google Cloud (your access remains unchanged).
No free tier or Google AI plans: Free individual access and Google AI Pro / Ultra (Google One) moved to Antigravity CLI on June 18, 2026 (transition post).
Not optimized for Gemini 4+: Not tuned for the Gemini 4 series (for example, Gemini 4 Argon) or future releases in this or later generations.
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.
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.
Gemini CLI (gemini) is an open-source terminal agent maintained for enterprise
Gemini Code Assist workflows on Google Cloud. Learn more in the
Gemini CLI documentation.
New preview releases will be published each week at UTC 23:59 on Tuesdays. These
releases will not have been fully vetted and may contain regressions or other
outstanding issues. Please help us test and install with preview tag.
npm install -g @google/gemini-cli@preview
Stable
New stable releases will be published each week at UTC 20:00 on Tuesdays, this
will be the full promotion of last week’s preview release + any bug fixes
and validations. Use latest tag.
npm install -g @google/gemini-cli@latest
Nightly
New releases will be published each day at UTC 00:00. This will be all changes
from the main branch as represented at time of release. It should be assumed
there are pending validations and issues. Use nightly tag.
npm install -g @google/gemini-cli@nightly
📋 Key Features
Code Understanding & Generation
Query and edit large codebases
Generate new apps from PDFs, images, or sketches using multimodal capabilities
Debug issues and troubleshoot with natural language
Automation & Integration
Automate operational tasks like querying pull requests or handling complex
rebases
评论