Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aimg

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aimg

A Node.js CLI for generating AI images with Replicate and saving them to disk.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

aimg

A Node.js CLI for generating AI images with Replicate and saving them to disk.

Features

  • Easy to install and use.
  • Powered by SD3, the hot new open-source image model.
  • Saves all the files to disk for you.
  • Includes prediction id and a slug of the prompt in the filename.
  • Lets you specify an exact prompt, or specify a subject and roll the dice with random promptmaker prompts.

Installation

npm i -g aimg

The grab a Replicate API token and set it in your environment:

export REPLICATE_API_TOKEN="r8_..."

Usage

All that is required is a prompt:

aimg "cute cat"

This will generate three images of a cute cat and save them to the current directory.

Long prompt

If your prompt is long, you can put it in a file:

aimg "$(cat prompt.md)"

More images

If you want more images, use the --count option:

aimg "cute cat" --count 20

Random prompts

If you want generate a different semi-random prompt for each image, specify a subject and it will use promptmaker to generate random prompts:

aimg --subject "a white cat"

If you specify a subject, then prompt is ignored.

Output directory

If you want to save the images to a specific directory, use the --outputdir option:

aimg "pink cat" --outputdir "pink-cat"

Kitchen sink

Hee's an example that loads a prompt from a file, generates 100 images with random "pink cat" prompts, and stuffs them in a specific directory:

aimg --subject "pink cat" --count 100 --outputdir "pink-cat"

Options

FAQs

Package last updated on 14 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc