npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

imgforge

v1.2.0

Published

🎨 AI Image Generator CLI - Multi-provider, multi-model image generation from your terminal

Downloads

272

Readme

🎨 ImgForge - AI Image Generator CLI

Multi-provider, multi-model AI image generation, editing, and processing from your terminal.

Features

  • 5 Providers: OpenAI (DALL-E 3), Google Gemini (Nano Banana 2, Imagen 4), Stability AI (SD3), Replicate (Flux), Pollinations (Free)
  • 30+ Models: Switch between models with -m flag
  • Image Editing: img2img, inpainting with imgforge edit
  • Upscaling: 2x-4x AI upscaling with imgforge upscale
  • Background Removal: Transparent PNGs with imgforge remove-bg
  • Image Variations: Generate variations with imgforge vary
  • Batch Processing: YAML-driven batch generation with imgforge batch
  • Prompt Templates: Save & reuse prompts with variables
  • 15 Style Presets: photorealistic, anime, flat-design, watercolor, 3d-render, and more
  • 17 Aspect Ratios: 16:9, phone, og-image, instagram, story, and more
  • Cost Tracking: Monitor API spending with budget alerts
  • Provider Comparison: Compare same prompt across providers
  • Interactive Mode: Menu-driven UI for step-by-step generation
  • Generation History: JSON log with redo capability
  • Auto-Open: Open images after generation
  • Prompt Enhancement: AI-boosted prompts with --enhance
  • Zero Signup: Pollinations provider works without API key

Quick Start

# Install globally
npm install -g imgforge

# Generate with free provider (no API key needed!)
imgforge generate "a beautiful sunset over mountains"

# Use style presets and aspect ratios
imgforge generate "sunset" --preset photorealistic --ratio 16:9

# Configure a paid provider for better quality
imgforge config set gemini.apiKey AIzaSyxxx
imgforge generate "portrait" -p gemini -m gemini-2.5-flash-image

Commands

Generate Images

# Basic generation
imgforge generate "a futuristic cityscape"

# With style preset and ratio
imgforge generate "mountain landscape" --preset cinematic --ratio 16:9

# Choose provider and model
imgforge generate "portrait photo" -p openai -m dall-e-3
imgforge generate "anime girl" -p gemini -m gemini-2.5-flash-image
imgforge generate "realistic portrait" -p gemini -m gemini-3.1-flash-image-preview

# Custom size and output
imgforge generate "app icon" -W 512 -H 512 -o ./assets/icon.png

# With template
imgforge generate _ --template app-icon --var subject=weather --var color=blue

# Enhanced prompt
imgforge generate "cat" --enhance

# Auto-open after generation
imgforge generate "logo" --open

Edit Images (img2img / Inpainting)

imgforge edit "make it look cyberpunk" --input photo.png -p gemini
imgforge edit "add sunglasses" --input face.png --mask mask.png -p openai
imgforge edit "change background to beach" --input portrait.png -p stability

Upscale Images

imgforge upscale photo.png -s 4x -p stability
imgforge upscale photo.png --prompt "enhance details, vibrant" --creativity 0.3

Remove Background

imgforge remove-bg product.png -o transparent.png
imgforge remove-bg logo.png -p stability

Image Variations

imgforge vary logo.png -n 4 -p openai
imgforge vary design.png --strength 0.3 --prompt "warmer colors"

Compare Providers

imgforge compare "sunset over mountains" -p openai,gemini,pollinations

Batch Processing

imgforge batch assets.yaml
imgforge batch assets.yaml --dry-run

Example assets.yaml:

defaults:
  provider: gemini
  model: gemini-2.5-flash-image
  quality: hd

images:
  - name: icon
    prompt: "minimalist weather app icon, flat design"
    size: 512x512
    output: ./assets/icon.png

  - name: banner
    prompt: "futuristic city skyline at sunset"
    ratio: 16:9
    output: ./assets/banner.png

Prompt Templates

# Save template with variables
imgforge template save app-icon "minimalist {subject} app icon, {color} gradient, flat design"

# Use template
imgforge generate _ --template app-icon --var subject=weather --var color=blue

# List templates
imgforge template list

Style Presets

Available: photorealistic, anime, flat-design, watercolor, 3d-render, pixel-art, logo, icon, cinematic, oil-painting, comic, sketch, neon, isometric, vintage

imgforge generate "forest" --preset watercolor
imgforge generate "robot" --preset neon

Aspect Ratios

Available: 1:1, 16:9, 9:16, 4:3, 3:4, phone, desktop, og-image, twitter, instagram, story, favicon, banner, portrait, landscape

imgforge generate "banner" --ratio 16:9
imgforge generate "app screenshot" --ratio phone
imgforge generate "social post" --ratio instagram

Cost Tracking

imgforge cost summary           # monthly summary
imgforge cost pricing           # show all model prices
imgforge cost budget 10.00      # set $10/month budget
imgforge cost export costs.csv  # export to CSV

Configure API Keys

imgforge config set openai.apiKey sk-xxxxx
imgforge config set gemini.apiKey AIzaSyyyy
imgforge config set stability.apiKey sk-stab-zzzzz
imgforge config set replicate.apiKey r8_xxxxx

# Set defaults
imgforge config set defaults.provider gemini
imgforge config set defaults.preset photorealistic
imgforge config set autoOpen true

Interactive Mode

imgforge interactive

Providers

| Provider | Models | API Key | Capabilities | |----------|--------|---------|-------------| | Pollinations | flux, flux-realism, flux-anime, turbo | Not needed | Generate | | Gemini | Nano Banana 2, Imagen 4/3 | Required | Generate, Edit | | OpenAI | DALL-E 3, gpt-image-1 | Required | Generate, Edit, Variations | | Stability | SD3, Stable Image Ultra | Required | Generate, Edit, Upscale, Remove-BG | | Replicate | Flux Pro, Flux Schnell | Required | Generate |

Requirements

  • Node.js 20+

License

MIT