cli-gpt-image
Installation
SKILL.md
cli-gpt-image
Generate and edit images with gpt-image-2 by reusing the OAuth token the Codex CLI already
stored at ~/.codex/auth.json. The gpt-image CLI talks directly to ChatGPT's Codex
backend — no API key, no proxy, no server. It saves each image with a 6-char id and returns the
absolute path in a JSON envelope, then tells you (via next_action) to Read the image and
revise. This closes a tight generate → inspect → revise loop you can run unattended.
Prerequisites
- The user is logged into the Codex CLI so
~/.codex/auth.jsonexists. If missing, the CLI returnserror.class:"auth"with the suggestioncodex login. python3(>= 3.7). No pip packages — the CLI is stdlib-only.- Install the command once:
scripts/install.sh(putsgpt-imageon~/.local/bin). If it's not on PATH, call the script directly:scripts/gpt-image ....