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

@miyakoh/slimg

v0.1.0

Published

AI-powered image generator CLI using Google Imagen 4 with Gemini prompt enhancement

Readme

slimg

AI-powered image generator CLI using Google Imagen 4 with Gemini prompt enhancement.

Short theme text is automatically expanded into a detailed image generation prompt by Gemini, then passed to Imagen 4 for high-quality image output.

Installation

# Run directly with npx (no install needed)
npx @miyakoh/slimg "your prompt" -o output.png

# Install globally
npm install -g @miyakoh/slimg

# Use as a Claude Code skill
npx skills add miyakoh/slimg

Setup

Set your Google API key as an environment variable:

export GOOGLE_API_KEY="your-api-key"
# or
export GEMINI_API_KEY="your-api-key"

Get your API key from Google AI Studio.

Usage

slimg "<prompt>" -t <style> -a <ratio> -o <output-path>

Examples

# Slide background (flat style, 16:9)
slimg "abstract geometric pattern, navy and teal gradients" \
  -t flat -a 16:9 -o images/bg.png

# Concept illustration
slimg "cloud architecture diagram, modern and clean" \
  -t illustration -a 16:9 -o images/concept.png

# Icon
slimg "security shield icon, teal accent" \
  -t minimal -a 1:1 -o images/icon.png

# Fast generation
slimg "team collaboration" \
  -t corporate -a 16:9 -e imagen4-fast -o images/team.png

# Skip prompt enhancement
slimg "a detailed prompt you wrote yourself" \
  --no-enhance -o images/raw.png

Options

| Option | Values | Default | |--------|--------|---------| | -t, --style | realistic, illustration, flat, anime, watercolor, oil-painting, pixel-art, sketch, 3d-render, corporate, minimal, pop-art | flat | | -a, --aspect-ratio | 16:9, 4:3, 1:1, 9:16, 3:4 | 16:9 | | -o, --output | Output file path | required | | -e, --engine | imagen4, imagen4-fast, imagen4-ultra | imagen4 | | -f, --format | png, jpg, jpeg | auto-detected from output path | | --no-enhance | Skip Gemini prompt enhancement | false | | --dry-run | Show config without API calls | false | | --debug | Print enhanced prompt | false |

Style Guide

| Use Case | Style (-t) | Aspect Ratio (-a) | |----------|-------------|-------------------| | Product photos, landscapes | realistic | 16:9, 4:3 | | Characters, mascots | anime, illustration | 1:1, 3:4 | | Icons, logos | flat, minimal | 1:1 | | Art, posters | watercolor, oil-painting, pop-art | any | | Game assets | pixel-art, 3d-render | 1:1 | | Business, presentations | corporate | 16:9 | | Concept sketches | sketch | any |

Engines

| Engine | Description | |--------|-------------| | imagen4 | Standard quality (default) | | imagen4-fast | Faster generation, slightly lower quality | | imagen4-ultra | Highest quality, slower |

How It Works

  1. Prompt Enhancement - Your short theme is expanded by Gemini into a detailed image generation prompt with style, lighting, composition, and color descriptions
  2. Image Generation - The enhanced prompt is sent to Google Imagen 4 API
  3. Output - The generated image is saved to the specified path

Programmatic Usage

import { createClient, enhancePrompt, generateImage, resolveApiKey } from "@miyakoh/slimg";

const apiKey = resolveApiKey();
const client = createClient(apiKey);

const prompt = await enhancePrompt(client, "sunset over mountains", "realistic");
const imageBuffer = await generateImage(client, prompt, {
  engine: "imagen4",
  aspectRatio: "16:9",
  format: "png",
});

License

MIT