cockpit gen-image
cockpit gen-imageの構文、オプション、結果、制約をcockpit CLIの正本から自動生成したリファレンスです。
最新バージョンでは、画面や操作が一部異なる場合があります。
このReference本文は、アプリが配布するcockpit CLIヘルプと同じ英語の正本から自動生成されています。日本語の概念説明と安全な使い方はcockpit CLIを参照してください。
Usage: cockpit gen-image --prompt <text> --out <path> [options]
Generate one image with an external provider and save it to --out (.png or .jpg). Self-contained: any agent can call this, including agents with no native image tool. Uses the provider's own credentials. When --provider is omitted, uses codex with gpt-image-2.
cat prompt.txt | cockpit gen-image --stdin --out image.png --json
cockpit gen-image --provider codex --model gpt-image-2 --prompt "a friendly shiba in soft watercolor, white background" --size 1024x1024 --out image.png --json
cockpit gen-image --provider antigravity --prompt "the same shiba, now wearing a scarf" --reference image.png --size 1024x1024 --out image-2.png --json
cockpit gen-image --provider grok-build --prompt "a cinematic product photo of a brass desk lamp" --size 1536x1024 --out lamp.jpg --json
Options:
--prompt <text>— image description (or use--stdin)--out <path>— output image path (required)--provider <name>—codex(default),antigravity, orgrok-build--model <name>— codex: image model (defaultgpt-image-2); antigravity:agydriver model (image backend is fixed)--size <WxH>— image size, e.g.1024x1024,1536x1024(default1024x1024)--reference <path>— reference image for style/character consistency (repeatable)--stdin— read the prompt from stdin--json— JSON output
Providers:
codex— OpenAI image generation (gpt-image-2) via the Codex subscriptionantigravity— Google Gemini image backend via the Antigravity free quota; outputs JPG (auto-converted to PNG when--outends in.png)grok-build— xAI Imagine (grok-imagine-image) via the Grok Build / SuperGrok subscription; outputs JPG (auto-converted to PNG for.png--out)
After generating, open the saved file in the side panel when the user needs to inspect it: cockpit side-panel file image.png --mode preview --json. For short videos, see cockpit gen-video help.
Antigravity image generation runs the official Agy CLI with automatic updates disabled (AGY_CLI_DISABLE_AUTO_UPDATE=1).
When no image is saved, the command exits 1 with an error and a detail object: provider, the provider CLI's exitCode, and stderrTail, the end of its standard error. The secret forms cockpit feedback hides (tokens, keys, cookies, Bearer and Basic credentials, private key blocks, and secret-named values in JSON, YAML, .env, shell, curl, HTTP headers, and escaped JSON in logs, including values that continue on later lines) are replaced with <redacted>, and URLs are reduced to scheme and host, before the tail is cut to the last 20 lines and 2000 characters; a cut tail starts with …. stderrTail is "" when the provider wrote nothing, and null when it could not be read or redacted. Standard output is never included.
{"ok":false,"error":"Image generation failed: /work/image.png","detail":{"provider":"codex","exitCode":1,"stderrTail":"ERROR: ... \"code\":\"model_not_found\" ... \"password\":<redacted>"}}