← 返回
未分类 Key 中文

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...
使用Gemini原生图像生成CLI生成和编辑图像。当用户请求Codex使用Gemini创建图像时调用。
pluiez pluiez 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 380
下载
💾 0
安装
1
版本
#latest

概述

Gemini Image CLI

Use ./scripts/gemini-image.sh for Gemini native image generation. Prefer this bundled script over writing one-off curl commands.

Workflow

  1. Run ./scripts/gemini-image.sh with the user's prompt and any requested options.
  2. Do not ask which endpoint to use for ordinary requests. The script auto-selects the provider: local Gemini-compatible proxy first, then Google fallback.
  3. Keep default settings for ordinary single-image generation: gemini-3.1-flash-image-preview, size 512, aspect 16:9.
  4. Use gemini-2.5-flash-image when latency matters more than latest image quality.
  5. Use gemini-3-pro-image-preview when the user needs stronger instruction following, text rendering, or professional-quality output.
  6. Confirm before multi-model batches, many retries, or other repeated calls that may consume extra quota.
  7. Read references/behavior.md only 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=<path>
raw_json=<path>
text=<path>
duration_seconds=<seconds>

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.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 07:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 335 📥 94,857
design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 137 📥 53,264
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 435 📥 118,087