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

@ai-generator/cli

v0.1.2

Published

CLI for connecting AI Generator content creation to personal Agents

Readme

ai-generator

Node.js CLI for AI Generator image and video generation from a terminal, script, or personal Agent.

Requirements

  • Node.js 18 or newer
  • The production server URL: https://aiaigenerator.ai (override with AI_GENERATOR_BASE_URL only for development or self-hosted deployments)
  • A CLI access key created from the server's /cli page

Install

npm install --global @ai-generator/cli

For local development from this repository:

node cli/bin/ai-generator.mjs --help

Authentication

Prefer an environment variable for Agents, CI, and automation:

export AI_GENERATOR_API_KEY="ai_live_..."
export AI_GENERATOR_BASE_URL="https://aiaigenerator.ai"

For local Agent setup, save the key on the device in a plain-text file first. Do not send the key in the Agent chat:

mkdir -p ~/.ai-generator
${EDITOR:-nano} ~/.ai-generator/cli-key.txt

Then let the CLI read that local file and write its protected configuration at ~/.ai-generator/config.json:

ai-generator auth set --key-file ~/.ai-generator/cli-key.txt --base-url "https://aiaigenerator.ai"
ai-generator auth show --json

On Windows, use %USERPROFILE%\.ai-generator\cli-key.txt as the local file path. The --key-file option reads the key without putting it in command arguments or CLI output. Keep the file out of Git and shared folders; delete it after setup if the local config is sufficient.

For CI or other non-interactive automation, use AI_GENERATOR_API_KEY through the secret manager instead of a text file.

Commands

ai-generator generate-image --prompt "A product photo" --wait --json
ai-generator generate-image --prompt "Edit this image" --image ./reference.png --wait --json
ai-generator generate-image --prompt "A 4K product photo" --model google/nano-banana-pro --size 16:9 --resolution 4K --wait --json
ai-generator generate-video --prompt "A slow product reveal" --aspect-ratio landscape --frames 10 --wait --json
ai-generator task-status --task-id <id> --type video --json
ai-generator task-download --task-id <id> --type video --output-dir ./outputs --json
ai-generator credits --json

generate-image and generate-video call the image and video generation APIs directly. The CLI does not use the website's internal Agent drawing workflow. Image requests support --model, --size, --resolution, and --number-of-images; the server calculates the final credit cost from the selected model and parameters instead of trusting a client-supplied cost. Video supports text-to-video or image-to-video based on whether --image is provided.

Use --model to select a configured image or video model. The supported model and parameter combinations are validated by the CLI and server. Use --help and --version to inspect the local command surface.

JSON output

Use --json when another Agent or script consumes the result. Creation returns a task ID. With --wait, the response also includes the normalized terminal task status. Result files can be downloaded after a successful task.

Development

pnpm cli:test
npm pack --dry-run