chatgpt-imagegen

作者 leeguooooo已验证

Use your ChatGPT subscription to generate images from the command line — no OPENAI_API_KEY, no gateway, no daemon. Zero-dep Python CLI + AI-agent skill.

320
Stars
32
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/leeguooooo/chatgpt-imagegen

快速入门

使用 chatgpt-imagegen 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

chatgpt-imagegen

CI

English | 中文

Generate images with your ChatGPT subscription — no OPENAI_API_KEY.

A tiny zero-dependency Python CLI (and AI-agent skill): one file, stdlib only. Works on a free ChatGPT account too — the default backend just drives the normal ChatGPT web chat, where even free-tier users get image generation.

chatgpt-imagegen "a watercolor cat sitting on a windowsill" -o cat.png
# -> saved: cat.png  (812,344 bytes)  size=1024x1024  quality=medium
image

Install

Needs Python 3.10+ and a ChatGPT subscription (free tier works).

For AI agents (recommended) — drops the skill into Claude Code, Codex, Cursor, etc.:

npx skills add leeguooooo/chatgpt-imagegen -g

Then just ask: "画一张 …" / "generate a hero banner for the README".

Standalone CLI — no pip, no virtualenv:

git clone https://github.com/leeguooooo/chatgpt-imagegen
sudo install chatgpt-imagegen/chatgpt-imagegen /usr/local/bin/chatgpt-imagegen

You also need one backendweb (default, drives your logged-in Chrome, spends no Codex-usage) or codex (headless fallback). chatgpt-imagegen doctor shows what's ready. → Backends & troubleshooting

Got a Gemini subscription too? Two more backends use it instead of OpenAI: --backend gemini (drives a logged-in gemini.google.com Chrome) and --backend agy (the Antigravity CLI, headless). They bill separate quotas from each other, so either can cover for the other. Neither is ever chosen automatically — ask by name. Pin the subscribed Chrome profile with --gemini-profile, since most profiles are signed in to some Google account. Note that Gemini text-to-image output carries a visible watermark in the bottom-right corner (image-to-image does not), and --size steers the aspect ratio there rather than the exact pixel count.

Upgrade

chatgpt-imagegen update

It runs the skills manager for you — directly when skills is on PATH, through npx when it isn't (it usually isn't). The CLI also nudges you at most once a day when a newer version exists, listing what changed since yours; CHATGPT_IMAGEGEN_NO_UPDATE_CHECK=1 turns that off.

On 0.23.1 or earlier? That self-update only looked for a global skills and gave up when it was missing, so it cannot deliver its own fix. Bootstrap once with:

npx -y skills update chatgpt-imagegen

After that chatgpt-imagegen update works on its own.

Usage

chatgpt-imagegen "moody mountain sunset" -o web/hero.png --size 1536x1024
chatgpt-imagegen "make it a warm golden-hour photo, cinematic 35mm" -i photo.jpg   # reference the subject
chatgpt-imagegen "a different fictional person" --composition-ref photo.jpg        # borrow the framing, not the face
chatgpt-imagegen "a robot mascot" --style doodle                                    # apply a gallery style (auto-pulled + saved)
chatgpt-imagegen animate "a dog happily wagging its tail" --style-online snoopy --also-gif
OUT=$(chatgpt-imagegen "icon" --quiet)                                              # capture the path

All three below came straight out of the commands above — no retouching:

Watercolor cat on a windowsillMoody mountain sunsetCoffee shop logo
"a watercolor cat sitting on a windowsill""moody mountain sunset" --size 1536x1024"a coffee shop logo, circular emblem"

animate asks the image model for a strict 4×2 sprite sheet, crops eight equal frames, rejects obvious subject drift, and writes a smooth ping-pong loop. It defaults to animated WebP; pass --animation-format gif or --also-gif when GIF compatibility matters. The source sprite PNG is always kept beside the animation. Animation post-processing needs ImageMagick (magick); WebP output additionally needs libwebp (img2webp). chatgpt-imagegen doctor reports whether both are installed.

Full options: chatgpt-imagegen --help. → Generate images · Styles

Community styles

Browse and reuse art styles other people tuned — a public gallery at drawstyle.leeguoo.com. No script update needed:

chatgpt-imagegen "a fox barista" --style-online doodle  # generate with a gallery style, nothing saved
chatgpt-imagegen style search "watercolor mascot"       # search the gallery
chatgpt-imagegen style publish mystyle --category cute --from-last   # share yours (one-time login)

A style can pin a character, not just a look. Style assets carry reference images, so the same character comes back in a brand-new scene:

chatgpt-imagegen style add pip --kind character --ref pip-ref.png
chatgpt-imagegen "a fox barista" --style pip
Pip the fox — character referencePip the fox, redrawn in a cafe scene
the pinned referencegenerated from "a fox barista"

Gallery packages can be characters too — xiaohei is one.

Using gallery styles · Submitting a style

Learn more

License

MIT — see LICENSE.

Disclaimer

This tool calls ChatGPT's internal backend-api/codex endpoint — the same one the official Codex CLI uses. It is not a documented public API; OpenAI could change or restrict it at any time. Use at your own risk and within the OpenAI Terms of Use — in particular, do not use your ChatGPT subscription to power a public-facing image generation service.

Keywords

ChatGPT subscription image generation, free ChatGPT account image generation, use ChatGPT Plus for image API, gpt-image-2 without OPENAI_API_KEY, gpt-image-2 ChatGPT subscription, image_generation tool Responses API, ChatGPT image CLI, Codex CLI image_gen as standalone tool, DALL-E via ChatGPT Plus, OAuth-backed OpenAI image generation, no-API-key image generation, AI agent image generation skill, Claude Code image skill, OpenAI image generation without billing.

中文: 用 ChatGPT 订阅生成图片、免费 ChatGPT 账号生图、ChatGPT Plus 生图工具、不用 API key 生图、gpt-image-2 用订阅、ChatGPT 订阅生图 CLI、Codex CLI 生图能力独立工具、给 AI agent 用的生图 skill、本地生图脚本、零依赖 Python 生图工具。

常见问题

What is chatgpt-imagegen?

chatgpt-imagegen is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by leeguooooo. Use your ChatGPT subscription to generate images from the command line — no OPENAI_API_KEY, no gateway, no daemon. Zero-dep Python CLI + AI-agent skill. It has 320 GitHub stars.

Is chatgpt-imagegen safe to use?

Yes. chatgpt-imagegen passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install chatgpt-imagegen?

Clone the repository with "git clone https://github.com/leeguooooo/chatgpt-imagegen" and add it to your Claude Code skills directory (see the Installation section above). chatgpt-imagegen ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is chatgpt-imagegen written in?

chatgpt-imagegen is primarily written in Python. It is open-source under leeguooooo on GitHub, so you can review or fork the full source.

Are there alternatives to chatgpt-imagegen?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh chatgpt-imagegen against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情