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 🙏

© 2025 – Pkg Stats / Ryan Hefner

imjen

v0.0.8

Published

Imjen is a command-line tool for generating AI-powered images using the Replicate API. It's optimized for creating minimalistic flat vector icons and other images with customizable prompts and dimensions.

Readme

Imjen - AI Image Generator

Imjen is a command-line tool for generating AI-powered images using the Replicate API. It's optimized for creating minimalistic flat vector icons and other images with customizable prompts and dimensions.

Quick Start with npx

You can run Imjen directly without installation using npx:

npx imjen

Prerequisites

  • Replicate API Token: You need a Replicate API token to use this tool. Get one at replicate.com
  • Node.js: Required for npx execution

Setup

  1. Set your API token (choose one method):

    • Environment variable: export REPLICATE_API_TOKEN=your_token_here
    • Or add it to your configuration file (see Configuration section)
  2. Run the tool:

    npx imjen

On first run, Imjen will automatically create a configuration file (imjen.config.jsonc) with example settings.

Configuration

Imjen uses a imjen.config.jsonc file for configuration. Here's the structure:

{
  // Optional: Set API token in config instead of environment
  // "REPLICATE_API_TOKEN": "your_token_here",

  // Default image model (Stability AI SDXL)
  "imageModel": "stability-ai/sdxl",

  // Display target optimization
  "displayTarget": "browser",

  // Default dimensions
  "width": 512,
  "height": 512,

  // Generate multiple images
  "images": [
    {
      "description": "Compass Rose for navigation",
      "promptArg": "minimal flat compass rose icon"
    },
    {
      "description": "Wind Direction Arrow",
      "promptArg": "minimal arrow icon, wind direction, vector style",
      "width": 256,
      "height": 256
    }
  ]
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | REPLICATE_API_TOKEN | string | - | Your Replicate API token | | imageModel | string | "stability-ai/sdxl" | Replicate model to use | | displayTarget | string | "browser" | Target display environment | | width | number | 512 | Image width in pixels | | height | number | 512 | Image height in pixels | | promptArg | string | - | Custom prompt (overrides default) | | description | string | - | Description for the image | | images | array | - | Array of image configurations for batch generation |

Usage Examples

Single Image Generation

For single image generation, configure the root level options:

{
  "imageModel": "stability-ai/sdxl",
  "description": "My custom icon",
  "promptArg": "minimalist settings gear icon",
  "width": 256,
  "height": 256
}

Multiple Images (Batch Generation)

Use the images array for generating multiple images:

{
  "imageModel": "stability-ai/sdxl",
  "width": 512,
  "height": 512,
  "images": [
    {
      "description": "Home Icon",
      "promptArg": "minimal house icon, flat design"
    },
    {
      "description": "User Profile Icon", 
      "promptArg": "minimal user profile icon",
      "width": 64,
      "height": 64
    },
    {
      "description": "Search Icon",
      "promptArg": "minimal magnifying glass icon"
    }
  ]
}

Environment Variables

Set your API token as an environment variable:

# Linux/macOS
export REPLICATE_API_TOKEN=your_token_here
npx imjen

# Windows
set REPLICATE_API_TOKEN=your_token_here
npx imjen

Default Prompt

If no promptArg is specified, Imjen uses an optimized default prompt:

minimalistic flat vector icon. crisp geometry. metal frame with subtle bevel. pure white lines on a solid #202020 background. optimized for [width]×[height] UI use

This default is designed to create clean, professional icons suitable for user interfaces.

Output

  • Generated images are saved as PNG files in the current directory
  • Default filename: generated_image.png (single image mode)
  • Batch mode: Files are named based on the configuration order
  • Success/error messages are displayed in the console

Troubleshooting

Common Issues

  1. "REPLICATE_API_TOKEN is not set"

    • Set the token as an environment variable or in your config file
    • Get a token from replicate.com
  2. "Error generating image"

    • Check your internet connection
    • Verify your API token is valid
    • Ensure the specified model exists on Replicate
  3. Configuration file not found

    • Run npx imjen once to auto-generate the example configuration
    • Manually create imjen.config.jsonc in your project directory

Models

Imjen supports any image generation model available on Replicate. Popular options include:

  • stability-ai/sdxl (default) - High-quality general purpose
  • stability-ai/stable-diffusion - Classic Stable Diffusion
  • lucataco/sdxl-lightning-4step - Fast generation

Contributing

This project is built with Deno and TypeScript. The source code is available on the project repository.

License

See the project repository for license information.