Standalone CLI
Run codex-imagegen from a Python virtualenv and save exactly one output image path.
Python CLI + Claude Code plugin
Generate and edit raster images through Codex CLI built-in $imagegen, attach reference images, inspect dry runs, and use a Claude Code slash command or model-invoked skill.
The bridge keeps the implementation small: no runtime dependencies, no direct OpenAI Images API client, and tests that verify command construction without spending image-generation quota.
Run codex-imagegen from a Python virtualenv and save exactly one output image path.
Install codex-image as a local marketplace plugin and invoke /codex-image:generate.
Dry-run diagnostics, output validation, reference-image checks, and default stripping of Codex/OpenAI API-key variables.
The Python package installs the standalone CLI. The Claude Code plugin installs from the repository marketplace layout.
codex login.git clone https://github.com/pablopda/codex-imagegen-bridge.git
cd codex-imagegen-bridge
python3 -m venv .venv
. .venv/bin/activate
pip install .
codex-imagegen --help
Reference images are attached with repeatable -i flags. The bridge passes the generated prompt through stdin so image paths and instructions stay separate.
--dry-run to inspect the command and prompt first.
codex-imagegen \
-p "Restyle this logo as a minimal app icon" \
-i logo.png \
-f outputs/logo-icon.png \
--size square \
--quality high
The bundled plugin is self-contained for Claude Code's plugin cache and can be installed from this repository as a local marketplace.
/codex-image:generate.scripts/doctor./plugin marketplace add https://github.com/pablopda/codex-imagegen-bridge.git
/plugin install codex-image@codex-imagegen-bridge
/reload-plugins
/codex-image:generate square app icon,
save to outputs/icon.png
Codex ImageGen Bridge is designed to reduce accidental direct API-key-backed execution, not to become a general secret-isolation sandbox.
OPENAI_API_KEY and CODEX_API_KEY are removed from the codex exec subprocess by default.
--dry-run prints the exact command, generated prompt, and stripped env var names without invoking $imagegen.
The CLI treats missing, stale, and empty output files as failed generation instead of reporting success.