chatgpt-imagegen  by leeguooooo

ChatGPT subscription image generation CLI

Created 1 month ago
272 stars

Top 94.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a zero-dependency Python command-line interface (CLI) and AI agent skill for generating images using an existing ChatGPT subscription, eliminating the need for an OPENAI_API_KEY. It targets users who want to leverage their ChatGPT Plus or even free accounts for image creation directly from the terminal or within AI agent workflows, offering a cost-effective alternative to direct API usage.

How It Works

The tool operates via a single, stdlib-only Python script. It supports two backends: 'web', which drives a logged-in Chrome browser instance using the chrome-use tool (consuming no Codex usage), and 'codex', which makes headless calls to the Codex endpoint (metered Codex usage). The default 'auto' backend intelligently prefers the 'web' backend to conserve quota and falls back to 'codex' if a browser is unavailable. For AI agents, it installs as a skill that self-heals by downloading the CLI on first use.

Quick Start & Requirements

  • Primary install / run command:
    • For AI agents: npx skills add leeguooooo/chatgpt-imagegen -g
    • Standalone CLI: git clone https://github.com/leeguooooo/chatgpt-imagegen && sudo install chatgpt-imagegen/chatgpt-imagegen /usr/local/bin/chatgpt-imagegen
  • Non-default prerequisites and dependencies: Python 3.10+, a ChatGPT subscription. For the 'web' backend: a signed-in Chrome browser and the chrome-use extension. For the 'codex' backend: npm i -g @openai/codex and codex login.
  • Links: docs/how-it-works.md for technical details.

Highlighted Details

  • Zero-dependency, single-file Python CLI.
  • Supports free ChatGPT accounts for image generation.
  • Seamless integration as an AI agent skill with self-healing download mechanism.
  • Image-to-image generation capabilities via the -i flag.
  • Reusable style presets (--style) for consistent aesthetics or character generation.

Maintenance & Community

The project includes an automatic update check that notifies users of newer versions. Specific community links (Discord, Slack) or detailed contributor information are not explicitly detailed in the README.

Licensing & Compatibility

The project is licensed under the MIT License. While the MIT license permits commercial use, users must adhere to OpenAI's Terms of Use, which prohibit using personal ChatGPT subscriptions to power public-facing services.

Limitations & Caveats

The 'web' backend processes requests serially, while 'codex' supports up to four parallel requests. The shared ChatGPT subscription quota limits sustained generation to approximately 10 images per minute. For features like true quality=high, native transparent backgrounds, deterministic billing, or sustained high throughput, the official OpenAI API is recommended. The tool relies on internal OpenAI APIs that are subject to change or restriction.

Health Check
Last Commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
7
Issues (30d)
5
Star History
120 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.