gen

command module
v0.0.0-...-190e3b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 17 Imported by: 0

README

gen

A minimal CLI for generating and editing images using FAL AI.

Install

go install github.com/cozy-creator/gen@latest

If gen is not found after install, add Go's bin directory to your PATH:

echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bashrc
source ~/.bashrc

Setup

Get your API key from fal.ai and configure it:

mkdir -p ~/.gen-cli
echo "FAL_KEY=your_api_key_here" > ~/.gen-cli/.env

Or set it as an environment variable:

export FAL_KEY=your_api_key_here

Usage

# Generate an image
gen "a cat in space"

# Use a specific model
gen "cyberpunk city" -m flux2-pro

# Edit an image (auto-detected via -i flag)
gen "add sunglasses" -i photo.png

# Combine multiple images (FLUX models)
gen "@image1 in the style of @image2" -i content.png -i style.png -m flux2

# Specify output path
gen "a mountain landscape" -o landscape.png

# List available models
gen models

File Locations

~/.gen-cli/
├── .env          # FAL_KEY=your_api_key
└── output/       # Generated images (default output)

Models

Model Edit Support
z-turbo (default) no
qwen yes
flux2-pro (alias: flux2) yes
flux2-flex yes
nano-banana yes
nano-banana-pro yes

Flags

  • -m, --model - Model to use (default: z-turbo)
  • -i, --image - Input image(s) for editing (can specify multiple)
  • -s, --size - Aspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16 (default: 4:3 for gen, auto for edit)
  • -f, --format - Output format: png, jpeg (default: png)
  • -o, --output - Output file path
  • --seed - Seed for reproducibility

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL