OpenAI image generation & editing for the terminal — live streaming, parallel, image-to-image.
brew install aayush9029/tap/pixRequires OPENAI_API_KEY in your environment. Defaults to gpt-image-2.5-sunburst.
pix "a corgi astronaut on mars, cinematic"
pix -n 4 --progress "isometric tiny village"
echo "neon koi fish" | pix -s landscape -q high
pix -s 4k -q max "misty fjord at dawn"
pix -b "studio ghibli style" -p "rainy train station"
pix -i photo.png "make it cyberpunk, neon rain"
pix -i a.png -i b.png --transparent "merge them into a single sticker"Images save as <sanitized-prompt>-<timestamp>[-vN].<ext> and update in place as partial frames stream in — open the file once and watch it sharpen.
| Option | Description |
|---|---|
-m, --model <id> |
gpt-image-2.5-sunburst (default), gpt-image-2.5-flare (faster), gpt-image-1-mini (cheapest) |
-p, --prompt <text> |
Prompt text (overrides positional / stdin) |
-b, --base <text> |
Base prompt prepended to the main prompt |
-i, --image <path> |
Input image for editing (repeatable, up to 16) |
-n <1-10> |
Variants generated in parallel |
-s, --size <size> |
square / landscape / portrait / 4k / auto / WIDTHxHEIGHT (multiples of 16, ratio up to 3:1, max 3840x2160) |
-q, --quality <level> |
auto / low / medium / high / xhigh / max (xhigh and max need a 2.5 model) |
-f, --format <ext> |
png / jpeg / webp |
--compression <0-100> |
Compression for jpeg / webp |
--transparent |
Transparent background (png / webp only) |
-o, --output <dir> |
Output directory (default .) |
--json |
Emit a JSON summary |
- Resolves the prompt from
--prompt, positional args, or stdin; optionally prepends--base. - Picks the endpoint:
POST /v1/images/generationswhen there are no-iinputs,POST /v1/images/edits(multipart) otherwise. - Fans out
-nparallel goroutines — each variant is an independent streaming API call withpartial_images=3(the cap OpenAI exposes). - Every partial frame and the final image land at the same canonical filename via
tempfile + rename, so the file stays valid at all times and viewers that watch file mtime see it refine.
macOS, OPENAI_API_KEY exported. All supported models allow streaming, transparency, and image-to-image editing.
MIT