Generate AI images up to 4K from text or other images directly in the command line.
imgen is a command-line interface (CLI) by developer lawrencewzen for AI image generation. It solves the problem of needing to create or modify images without leaving the terminal by leveraging an existing paid ChatGPT account. The tool requires zero extra configuration beyond a local Codex CLI login, providing a direct way to generate visual assets from text or existing images.
imgen is installed via a script for macOS, Linux, or Windows. Users interact with it through the terminal, providing a prompt and optional flags for input images, output path, size, and quality. It authenticates by reusing the local login state from the Codex CLI, eliminating the need for a separate API key. The tool outputs a PNG image file directly to the user's disk. It is open-source under the MIT license.
This tool is ideal for developers and command-line power users who want to generate or edit images quickly without switching to a web or GUI application.
The tool requires a paid ChatGPT subscription and an existing installation of the Codex CLI to function. Windows support is currently limited to 64-bit systems.