feat: add catalog-linked image generation CLI (gpt-image-2) - #22
Open
tecnos-okazaki wants to merge 9 commits into
Open
feat: add catalog-linked image generation CLI (gpt-image-2)#22tecnos-okazaki wants to merge 9 commits into
tecnos-okazaki wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: bc6beffd465b
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: 75275998c8b5
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: fa673b6da681
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: 10487a1b2f95
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: bc0e91665aad
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: e6aec3138771
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: 6381064bbcac
Adds CMS-free generation: --prompt for arbitrary text and --no for a README No.<n> prompt, plus --readme-list. Keeps the CMS --id/--list paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: f33191d4f6fa
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L Entire-Checkpoint: e6a99cf5416d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a CLI (
pnpm run image) that generates images with OpenAIgpt-image-2from prompts sourced three ways:
--prompt "<text>"— free text (no CMS)--no <n>— a prompt parsed from the local README by its "No." heading (no CMS)--id <id>— a prompt fetched live from the CMS (needsCMS_HOST/CMS_API_KEY)Plus
--readme-list/--listfor discovery. Images are written tooutput/(git-ignored). Prompts flagged
needReferenceImagesare skipped with a warning(v1 is text-to-image only).
Changes
scripts/generate-image.ts— CLI entry point + arg routingscripts/utils/image-generator.ts— thinopenai.images.generatewrapper (base64 → Buffer)scripts/utils/prompt-preparer.ts(+ tests) — pure helpers: clean content,{argument}detect/substitute, slug/filenamescripts/utils/readme-parser.ts(+ tests) — parse prompts from a generated READMEscripts/utils/cms-client.ts— addfetchPromptByIdpackage.json—image+testscripts,openaidependency.gitignore— ignoreoutput/LOCAL_DEVELOPMENT.mdusage + design spec/plan underdocs/superpowers/Testing
pnpm test— 11/11 unit tests passgpt-image-2:--promptand--no 5each produced a valid 1024×1024 PNG.Notes
gpt-image-2.docs/superpowers/specs/2026-07-16-catalog-image-generation-cli-design.md🤖 Generated with Claude Code
https://claude.ai/code/session_0195oxt5sg7RGriWmxL1Hw3L