161 lines
5.2 KiB
YAML
161 lines
5.2 KiB
YAML
# ============================================================
|
||
# AgentDock 适配器 · Google Gemini CLI(Wave 2.1)
|
||
# 数据依据:调研底稿 agent-cli-survey-2026-08-24.md §3 + 架构 §3.3
|
||
# ============================================================
|
||
id: gemini
|
||
name: Gemini CLI
|
||
name_zh: Gemini CLI
|
||
vendor: Google
|
||
status: available
|
||
adapter_version: 1.1.0
|
||
license: Apache-2.0
|
||
|
||
platforms:
|
||
windows:
|
||
architectures: [x64]
|
||
notes: 官方要求 Windows 11 24H2+
|
||
linux:
|
||
distributions: [ubuntu]
|
||
architectures: [x64]
|
||
min_ubuntu: "20.04"
|
||
|
||
official:
|
||
homepage: https://github.com/google-gemini/gemini-cli
|
||
docs: https://geminicli.com/docs/get-started/installation/
|
||
allowed_hosts: [registry.npmjs.org, geminicli.com, github.com]
|
||
|
||
runtime_deps:
|
||
- id: node
|
||
semver_range: ">=20"
|
||
required_for: [install, run]
|
||
|
||
install:
|
||
preferred: npm
|
||
channels:
|
||
- id: npm
|
||
platforms: [windows, linux]
|
||
command: [npm, install, -g, "@google/gemini-cli"]
|
||
package: "@google/gemini-cli"
|
||
elevate: never
|
||
post_checks: [detect]
|
||
|
||
detect:
|
||
executable: gemini
|
||
version_args: ["--version"]
|
||
|
||
update:
|
||
method: npm_update
|
||
command: [npm, update, -g, "@google/gemini-cli"]
|
||
source:
|
||
kind: npm
|
||
package: "@google/gemini-cli"
|
||
|
||
uninstall:
|
||
method: npm_uninstall
|
||
command: [npm, uninstall, -g, "@google/gemini-cli"]
|
||
keep_config_default: true
|
||
|
||
authorization:
|
||
modes:
|
||
- mode: browser_oauth
|
||
command: [gemini]
|
||
notes_zh: 运行 gemini 选「Sign in with Google」浏览器登录
|
||
- mode: api_key
|
||
env_keys: [GEMINI_API_KEY]
|
||
notes_zh: 设置 GEMINI_API_KEY 环境变量(AI Studio 申请)
|
||
|
||
# 配置机制(调研底稿 §3「配置机制」):用户级 ~/.gemini/settings.json(JSON,官方发布 JSON Schema)
|
||
# 关键键:model.name(默认模型)、security.auth.selectedType(认证方式);
|
||
# 环境变量:GEMINI_API_KEY / GOOGLE_GEMINI_BASE_URL(须 HTTPS)/ GEMINI_MODEL。
|
||
configuration:
|
||
files:
|
||
- path: "~/.gemini/settings.json"
|
||
format: json
|
||
scope: user
|
||
environment:
|
||
- key: GEMINI_API_KEY
|
||
sensitive: true
|
||
maps_to_field: api_key
|
||
fields:
|
||
- id: model.name
|
||
label_zh: 默认模型
|
||
group: common
|
||
help_zh: 官方键 model.name,settings.json 中的默认模型
|
||
required: false
|
||
sensitive: false
|
||
type: string
|
||
storage: file
|
||
docs_url: https://geminicli.com/docs/reference/configuration/
|
||
- id: env.GOOGLE_GEMINI_BASE_URL
|
||
label_zh: Base URL
|
||
group: advanced
|
||
help_zh: 官方环境变量 GOOGLE_GEMINI_BASE_URL(覆盖 Gemini API 默认地址,须 HTTPS,代理/网关场景);写入 settings.json 的 env 块
|
||
required: false
|
||
sensitive: false
|
||
type: url
|
||
storage: file
|
||
docs_url: https://geminicli.com/docs/reference/configuration/
|
||
- id: api_key
|
||
label_zh: API Key
|
||
group: auth
|
||
help_zh: 存入系统密钥库(对应环境变量 GEMINI_API_KEY,AI Studio 申请)
|
||
required: false
|
||
sensitive: true
|
||
type: string
|
||
storage: keyring
|
||
docs_url: https://geminicli.com/docs/get-started/authentication/
|
||
|
||
models:
|
||
list:
|
||
- id: gemini-3-pro
|
||
label_zh: Gemini 3 Pro
|
||
- id: gemini-2.5-flash
|
||
label_zh: Gemini 2.5 Flash
|
||
- id: gemini-2.5-pro
|
||
label_zh: Gemini 2.5 Pro
|
||
|
||
diagnostics:
|
||
- rule_id: path.not_installed
|
||
- rule_id: path.not_in_path
|
||
- rule_id: dependency.node_below_min
|
||
- rule_id: version_conflict.multiple_copies
|
||
- rule_id: config.corrupt
|
||
|
||
documentation:
|
||
quickstart_zh: 安装后运行 `gemini` 选「Sign in with Google」登录,或用 `gemini -p "提示词"` 无头执行。
|
||
install_zh: 推荐 `npm install -g @google/gemini-cli`(需 Node 20+);免安装可用 `npx @google/gemini-cli` 临时试用。
|
||
auth_zh: ① Google 账号 OAuth:运行 `gemini` 选「Sign in with Google」浏览器登录(免费档 60 请求/分钟);② API Key:设置 GEMINI_API_KEY 环境变量(AI Studio 申请,免费档 1000 请求/天);③ Vertex AI 走 ADC/服务账号(本表单不覆盖)。
|
||
commands:
|
||
- cmd: gemini
|
||
desc_zh: 启动交互式会话
|
||
- cmd: gemini -p "提示词"
|
||
desc_zh: 强制非交互模式,单次执行
|
||
- cmd: gemini -p "提示词" --output-format json
|
||
desc_zh: 以 JSON 输出结果
|
||
- cmd: gemini -m <模型>
|
||
desc_zh: 指定模型
|
||
- cmd: gemini -i
|
||
desc_zh: 执行后进入交互模式
|
||
- cmd: gemini --version
|
||
desc_zh: 显示版本号
|
||
- cmd: npx @google/gemini-cli
|
||
desc_zh: 免安装临时运行
|
||
- cmd: GEMINI_API_KEY=<key> gemini
|
||
desc_zh: 用 API Key 环境变量启动
|
||
params:
|
||
- param: -p / --prompt
|
||
desc_zh: 强制非交互模式
|
||
- param: --output-format
|
||
desc_zh: 输出格式(text / json / stream-json)
|
||
- param: -m / --model
|
||
desc_zh: 指定模型
|
||
- param: -i
|
||
desc_zh: 执行后转交互
|
||
- param: -v / --version
|
||
desc_zh: 显示版本号并退出
|
||
updated_at: "2026-08-25"
|
||
risks_zh:
|
||
- 官方发行形态为 npm 包,依赖 Node 20+,适配器已声明运行时门槛
|
||
- Windows 官方要求 11 24H2+,低版本 Win10 显示「官方未支持」
|
||
- Vertex AI(ADC/服务账号)与 security.auth.selectedType 高级配置本表单不覆盖,以官方文档为准
|