Generate, edit, and manage images via OpenAI's GPT Image and DALL-E models.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install openai-image-cli或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install openai-image-cli⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/openai-image-cli/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: openai-image-cli version: 1.0.0 description: Generate, edit, and manage images via OpenAI's GPT Image and DALL-E models. metadata: { "openclaw": { "emoji": "🎨", "requires": { "bins": ["openai-image"], "envs": ["OPENAI_API_KEY"] } }, } ---
Generate, edit, and create variations of images using OpenAI's latest models.
npm install -g @versatly/openai-image-cli
# Via environment variable
export OPENAI_API_KEY=sk-...
# Or via config
openai-image config set api-key sk-...
# Generate an image
openai-image generate "A futuristic city at sunset"
# High quality landscape
openai-image generate "Mountain panorama" -s 1536x1024 -q high
# Multiple images with transparency
openai-image generate "Logo design" -n 4 -b transparent
# Edit an existing image
openai-image edit photo.png "Add sunglasses to the person"
# Create variations (DALL-E 2)
openai-image vary original.png -n 3
| Model | Description | Notes | |-------|-------------|-------| | gpt-image-1.5 | Latest GPT Image (default) | Best quality, recommended | | gpt-image-1 | GPT Image | Good balance | | gpt-image-1-mini | GPT Image Mini | Cost-effective | | dall-e-3 | DALL-E 3 | Deprecated May 2026 | | dall-e-2 | DALL-E 2 | Deprecated May 2026, supports variations |
Create images from text prompts.
openai-image generate "prompt" [options]
Options:
-m, --model <model> Model (default: gpt-image-1.5)
-s, --size <size> Size: 1024x1024, 1536x1024, 1024x1536, auto
-q, --quality <quality> Quality: auto, high, medium, low
-n, --count <n> Number of images (1-10)
-f, --format <format> Format: png, jpeg, webp
-o, --output <path> Output file/directory
-b, --background <bg> Background: auto, transparent, opaque
--compression <0-100> Compression level for jpeg/webp
--moderation <level> Content moderation: auto, low
--stream Enable streaming with partial images
--partial-images <0-3> Partial images during streaming
--json Output JSON response
--dry-run Show request without executing
Edit existing images with prompts.
openai-image edit <image> "instructions" [options]
Options:
--mask <path> Mask image for inpainting
--images <paths...> Additional reference images (up to 16)
-s, --size <size> Output size
-q, --quality <quality> Quality level
-n, --count <n> Number of variations
-f, --format <format> Output format
-o, --output <path> Output path
Examples:
# Simple edit
openai-image edit photo.png "Add sunglasses"
# Inpainting with mask
openai-image edit room.png "Add a plant" --mask mask.png
# Multi-image composite
openai-image edit base.png "Create gift basket" --images item1.png item2.png
Create variations of an image (DALL-E 2 only).
openai-image vary <image> [options]
Options:
-n, --count <n> Number of variations (1-10)
-s, --size <size> Size: 256x256, 512x512, 1024x1024
-o, --output <path> Output path/directory
Generate multiple images from a file or stdin.
openai-image batch [options]
Options:
-i, --input <file> Input file (text or JSONL)
--stdin Read from stdin
-m, --model <model> Model for all generations
-o, --output-dir <dir> Output directory
--parallel <n> Concurrent requests (default: 3)
--delay <ms> Delay between requests (default: 100)
JSONL format:
{"prompt": "A red car", "size": "1024x1024", "quality": "high"}
{"prompt": "A blue boat", "size": "1536x1024"}
Manage CLI configuration.
openai-image config set <key> <value>
openai-image config get <key>
openai-image config list
openai-image config reset
openai-image config path
Keys: api-key, default-model, default-size, default-quality, default-format, output-dir
List available models.
openai-image models [--json]
View local generation history.
openai-image history [-n <limit>] [--json] [--clear]
✓ Generated image saved to ./generated-1707500000.png
Model: gpt-image-1.5
Size: 1024x1024
Quality: high
Tokens: 150 (text: 10, image: 140)
--json){
"success": true,
"file": "./generated-1707500000.png",
"model": "gpt-image-1.5",
"size": "1024x1024",
"quality": "high",
"usage": {
"total_tokens": 150,
"input_tokens": 50,
"output_tokens": 100
}
}
| Model | Sizes | |-------|-------| | GPT Image | 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), auto | | DALL-E 3 | 1024x1024, 1792x1024, 1024x1792 | | DALL-E 2 | 256x256, 512x512, 1024x1024 |
-b transparent -f png for logosgpt-image-1-mini for draftsopenai-image history安装 OpenAI Image CLI 后,可以对 AI 说这些话来触发它
Help me get started with OpenAI Image CLI
Explains what OpenAI Image CLI does, walks through the setup, and runs a quick demo based on your current project
Use OpenAI Image CLI to generate, edit, and manage images via OpenAI's GPT Image and DALL-E...
Invokes OpenAI Image CLI with the right parameters and returns the result directly in the conversation
What can I do with OpenAI Image CLI in my design & creative workflow?
Lists the top use cases for OpenAI Image CLI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/openai-image-cli/ 目录(个人级,所有项目可用),或 .claude/skills/openai-image-cli/(项目级)。重启 AI 客户端后,用 /openai-image-cli 主动调用,或让 AI 根据上下文自动发现并使用。
OpenAI Image CLI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
OpenAI Image CLI 可免费安装使用。请查阅仓库了解许可证信息。
Generate, edit, and manage images via OpenAI's GPT Image and DALL-E models.
OpenAI Image CLI 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using OpenAI Image CLI
Identifies repetitive steps in your workflow and sets up OpenAI Image CLI to handle them automatically