/install gemini-image-cli
Gemini Image CLI
Use ./scripts/gemini-image.sh for Gemini native image generation. Prefer this bundled script over writing one-off curl commands.
Workflow
- Run
./scripts/gemini-image.shwith the user's prompt and any requested options. - Do not ask which endpoint to use for ordinary requests. The script auto-selects the provider: local Gemini-compatible proxy first, then Google fallback.
- Keep default settings for ordinary single-image generation:
gemini-3.1-flash-image-preview, size512, aspect16:9. - Use
gemini-2.5-flash-imagewhen latency matters more than latest image quality. - Use
gemini-3-pro-image-previewwhen the user needs stronger instruction following, text rendering, or professional-quality output. - Confirm before multi-model batches, many retries, or other repeated calls that may consume extra quota.
- Read
references/behavior.mdonly when explaining provider/security tradeoffs, choosing non-default models, configuring a local Gemini-compatible proxy, troubleshooting slow or failed requests, or modifying the CLI.
Common Commands
Generate one image:
./scripts/gemini-image.sh "A cute orange kitten sitting on a soft blanket"
Generate with an explicit output path or prefix. The script chooses the final extension from the returned image MIME type:
./scripts/gemini-image.sh "画两只小猫在打闹" --output ./out/kittens.png
Use a faster model:
./scripts/gemini-image.sh "画两只小猫在打闹" --model gemini-2.5-flash-image
Force Google official endpoint:
./scripts/gemini-image.sh "画两只小猫在打闹" --provider google
Force local proxy endpoint:
./scripts/gemini-image.sh "画两只小猫在打闹" --provider local
Use a larger output size:
./scripts/gemini-image.sh "A cinematic poster of two kittens" --size 1K --aspect 16:9
Use an input image for image-guided generation or editing:
./scripts/gemini-image.sh "Turn this cat photo into a watercolor illustration" --image cat.jpg
Output Contract
The script prints human-readable logs to stderr and machine-readable results to stdout.
Successful stdout lines:
image=\x3Cpath>
raw_json=\x3Cpath>
text=\x3Cpath>
duration_seconds=\x3Cseconds>
text= appears only when --with-text is enabled.
Safety
Do not expose full Google Gemini API keys in conversation or source files. Prefer the local proxy mode when the runtime should not have access to the real Google key.
The script masks keys in curl logs and redacts input-image base64 from printed request bodies.
Do not enable retries automatically for ambiguous multi-request tasks. Retries can submit additional generation requests and may incur additional cost.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gemini-image-cli - 安装完成后,直接呼叫该 Skill 的名称或使用
/gemini-image-cli触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Gemini Image CLI 是什么?
Generate and edit images with a bundled Gemini native image-generation CLI. Use when the user asks Codex to create images with Gemini, use Gemini image gener... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 120 次。
如何安装 Gemini Image CLI?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gemini-image-cli」即可一键安装,无需额外配置。
Gemini Image CLI 是免费的吗?
是的,Gemini Image CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Gemini Image CLI 支持哪些平台?
Gemini Image CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Gemini Image CLI?
由 pluiez(@pluiez)开发并维护,当前版本 v0.1.0。