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.json exists. If missing, the CLI returns error.class:"auth" with the suggestion codex login.
  • python3 (>= 3.7). No pip packages — the CLI is stdlib-only.
  • Install the command once: scripts/install.sh (puts gpt-image on ~/.local/bin). If it's not on PATH, call the script directly: scripts/gpt-image ....

The loop — GENERATE → READ → CRITIQUE → REVISE

Installs
1
First Seen
Jun 9, 2026
cli-gpt-image — yigitkonur/skill-cli-gpt-image