ai-img
v0.1.2
Published
AI Image Generation CLI with bunli + AI SDK
Readme
ai-img
AI Image Generation CLI with bunli + AI SDK. Supports OpenAI, Google (Gemini), and Fal AI.
Install CLI
# Install globally with Bun (recommended)
bun add -g ai-img
# Or clone and install locally
git clone https://github.com/aryasaatvik/ai-img
cd ai-img
bun install
bun run buildUsage
# Generate an image
ai-img generate -p "a cat sitting on a chair" -o cat.png
Add to your AI agent skills:
```bash
# For Claude Code
npx skills add aryasaatvik/ai-img -a claude-code
# For OpenCode
npx skills add aryasaatvik/ai-img -a opencode
# For all agents
npx skills add aryasaatvik/ai-imgOr install locally:
npx skills add ./skills/ai-image-genSee skills/ai-image-gen for full skill documentation.
bun install
bun run buildUsage
# Generate an image
ai-img generate -p "a cat sitting on a chair" -o cat.png
# Generate with specific provider
ai-img generate -p "a sunset" -P google -o sunset.png
# Edit an image
ai-img edit -p "make it blue" -i input.png -o output.png
# Batch process from JSONL
ai-img batch -i jobs.jsonl -o output/Providers
Set your API key via environment variable:
- OpenAI:
OPENAI_API_KEY - Google:
GEMINI_API_KEYorGOOGLE_API_KEY - Fal:
FAL_API_KEY
Options
generate
-p, --prompt- Text prompt (required)-P, --provider- AI provider (openai, google, fal)-m, --model- Model ID-s, --size- Image size (e.g., 1024x1024)-c, --count- Number of images-o, --output- Output file path
edit
-p, --prompt- Edit prompt (required)-i, --input- Input image path (required)-m, --mask- Mask image for partial edits
batch
-i, --input- JSONL file with one job per line-o, --outDir- Output directory-c, --concurrency- Concurrent API calls
