{"id":49960300,"url":"https://github.com/saadnvd1/imgforge","last_synced_at":"2026-05-18T02:13:17.429Z","repository":{"id":354749891,"uuid":"1225002131","full_name":"saadnvd1/imgforge","owner":"saadnvd1","description":"Generate images with OpenAI from your terminal. One file, zero dependencies.","archived":false,"fork":false,"pushed_at":"2026-04-29T21:13:39.000Z","size":1655,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T23:21:57.450Z","etag":null,"topics":["ai-image","cli","developer-tools","gpt-image-2","image-generation","openai","python","terminal","text-to-image","zero-dependencies"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saadnvd1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-29T21:06:49.000Z","updated_at":"2026-04-29T21:13:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saadnvd1/imgforge","commit_stats":null,"previous_names":["saadnvd1/imgforge"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/saadnvd1/imgforge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadnvd1%2Fimgforge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadnvd1%2Fimgforge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadnvd1%2Fimgforge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadnvd1%2Fimgforge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saadnvd1","download_url":"https://codeload.github.com/saadnvd1/imgforge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadnvd1%2Fimgforge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-image","cli","developer-tools","gpt-image-2","image-generation","openai","python","terminal","text-to-image","zero-dependencies"],"created_at":"2026-05-18T02:13:15.921Z","updated_at":"2026-05-18T02:13:17.422Z","avatar_url":"https://github.com/saadnvd1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imgforge\n\nGenerate images with OpenAI from your terminal. One file, zero dependencies.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/hero.png\" alt=\"imgforge demo\" width=\"700\"/\u003e\n\u003c/p\u003e\n\n## Why imgforge\n\n- **Zero dependencies** — stdlib only. No `pip install`, no venv, no SDK. Just Python 3.10+\n- **One file** — `curl` it, `chmod +x`, done. 440 lines, runs anywhere Python runs\n- **Cost-aware** — shows estimated cost before and after every generation. No surprise bills\n- **Built-in templates** — prompt templates for product shots, social media, diagrams, blog images\n- **Full API coverage** — sizes, quality tiers, formats, batch generation, transparent backgrounds\n\n## Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/saadnvd1/imgforge/main/imgforge -o ~/.local/bin/imgforge \u0026\u0026 chmod +x ~/.local/bin/imgforge\n```\n\nSet your API key:\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\n```\n\n## Usage\n\n```bash\n# Generate an image\nimgforge gen \"a cat astronaut floating in space\"\n\n# Specific size and quality\nimgforge gen \"mountain landscape at sunset\" -s landscape -q high\n\n# Multiple images at once\nimgforge gen \"minimalist logo variations\" -n 4 -s square\n\n# Custom output path and format\nimgforge gen \"product hero shot\" -o hero.webp -f webp\n\n# Estimate cost without generating\nimgforge cost -s landscape -q high -n 10\n\n# Browse prompt templates\nimgforge templates\nimgforge templates product-hero\n```\n\n### Edit existing images\n\n\u003e **Note:** OpenAI's edits endpoint does not yet support `gpt-image-2` (April 2026). The edit command is implemented and ready — will work once OpenAI enables it.\n\n```bash\nimgforge edit photo.jpg \"make it look like a watercolor painting\"\nimgforge edit photo.jpg \"replace the sky with aurora\" -m sky-mask.png\nimgforge edit logo.png bg.jpg \"place the logo in the center\"\n```\n\n## Reference\n\n### Sizes\n\n| Shortcut | Resolution | Use case |\n|----------|-----------|----------|\n| `square` / `1k` | 1024x1024 | Social posts, icons |\n| `portrait` | 1024x1536 | Mobile, posters |\n| `landscape` / `wide` | 1536x1024 | Blog headers, OG images |\n| `hd` / `2k` | 2048x2048 | Print, high-res |\n| `4k` | 3840x2160 | Widescreen, cinematic |\n\nOr pass any `WxH` directly.\n\n### Quality and cost\n\n| Quality | ~Cost/image | When to use |\n|---------|------------|-------------|\n| `low` | $0.011 | Drafts, exploration, bulk |\n| `medium` | $0.042 | General use, social media |\n| `high` | $0.167 | Final assets, typography |\n\n### Templates\n\nBuilt-in prompt templates for common use cases:\n\n| Template | What's in it |\n|----------|-------------|\n| `product-hero` | App icons, device frames, SaaS dashboards |\n| `social-media` | OG images, GitHub previews, YouTube thumbnails |\n| `diagrams` | Architecture diagrams, flowcharts, ER diagrams |\n| `blog-images` | Hero images, comparison splits, abstract patterns |\n| `creative` | Isometric art, pixel art, posters, neon signs |\n\nTemplates are markdown files in `templates/`. Add your own.\n\n## Use with AI coding agents\n\nimgforge includes a `SKILL.md` that AI coding agents (Claude Code, Codex, etc.) can read to use the tool effectively. Instead of writing naive prompts, the agent references the built-in prompt examples and writes structured prompts that produce better results.\n\nJust point your agent at the repo and ask it to generate an image — it handles the rest.\n\n## Requirements\n\n- Python 3.10+\n- An [OpenAI API key](https://platform.openai.com/api-keys) with image generation access\n- That's it\n\n## License\n\nMIT\n\n## Author\n\nBuilt by [Saad Naveed](https://saadnaveed.com). More open source tools at [saadnaveed.com/projects](https://saadnaveed.com/projects).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadnvd1%2Fimgforge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadnvd1%2Fimgforge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadnvd1%2Fimgforge/lists"}