Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A Node.js CLI for generating AI images with Replicate and saving them to disk.
prompt
input. Default is Flux Schnell.npm i -g aimg
Then grab a Replicate API token and set it in your environment:
export REPLICATE_API_TOKEN="r8_..."
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.
If your prompt is long, you can put it in a file:
aimg "$(cat prompt.md)"
The default model is Flux Schnell, but you can specify any model with the --model
option.
aimg "cute cat" --model bytedance/sdxl-lightning-4step
This will work for any model on Replicate that takes a prompt
as input and outputs a list of URLs.
Examples:
black-forest-labs/flux-dev
bytedance/sdxl-lightning-4step
stability-ai/stable-diffusion-3
zeke/ziki-flux
← works for Flux fine-tunes too!The latest version of the model is used unless you specify a version in the format {owner}/{name}:{version}
:
aimg "cute cat" --model zeke/ziki-flux:dadc276a9062240e68f110ca06521752f334777a94f031feb0ae78ae3edca58e
If you want more images, use the --count
option:
aimg "cute cat" --count 20
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.
If you want to save the images to a specific directory, use the --outputdir
option:
aimg "pink cat" --outputdir "pink-cat"
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"
--count
: Number of images to generate. Defaults to 3--model
: Model to use. Defaults to stability-ai/stable-diffusion-3--subject
: Subject to pass into promptmaker to generate random promptsFAQs
A Node.js CLI for generating AI images with Replicate and saving them to disk.
The npm package aimg receives a total of 3 weekly downloads. As such, aimg popularity was classified as not popular.
We found that aimg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.