fal.ai image generation CLI with interactive studio mode
npm install @howells/falcon

CLI for generating images with fal.ai
---
Supports multiple models, batch generation, upscaling, and background removal.
``bash`
brew tap howells/tap
brew install falcon
`bash`
bunx @howells/falcon "your prompt"
Requires Bun runtime.
`bash`
git clone https://github.com/howells/falcon.git
cd falcon
bun install
bun link
Set your fal.ai API key:
`bash`
export FAL_KEY="your-api-key"
Or add it to ~/.falcon/config.json:
`json`
{
"apiKey": "your-api-key"
}
Get your API key at fal.ai/dashboard/keys.
| Option | Default | Description |
|--------|---------|-------------|
| apiKey | - | Your fal.ai API key |defaultModel
| | banana | Default generation model |defaultAspect
| | 1:1 | Default aspect ratio |defaultResolution
| | 2K | Default resolution |openAfterGenerate
| | true | Auto-open images after generation |upscaler
| | clarity | Upscaler model (clarity or crystal) |backgroundRemover
| | rmbg | Background removal model (rmbg or bria) |
You can also create a .falconrc file in any directory to override settings per-project.
`bashBasic generation
falcon "a cat sitting on a windowsill at sunset"
$3
`bash
Edit an existing image with a prompt
falcon "add a rainbow in the sky" -e ./photo.png
`$3
`bash
Show last generation info
falcon --lastGenerate variations of last image
falcon --vary
falcon --vary -n 4 # 4 variationsUpscale last image
falcon --up
falcon --up --scale 4 # 4x upscaleRemove background from last image
falcon --rmbg
`$3
Run
falcon without arguments to launch the interactive terminal UI:`bash
falcon
`Models
$3
All models support image editing with the
-e flag.| Model | Name | Pricing | Features |
|-------|------|---------|----------|
|
banana | Nano Banana Pro | $0.15-$0.30/image | Aspect, resolution (default) |
| gpt | GPT Image 1.5 | $0.01-$0.20/image | Variable quality settings |
| gemini | Gemini 2.5 Flash | $0.039/image | Fast, affordable |
| gemini3 | Gemini 3 Pro | $0.15-$0.30/image | Highest quality |$3
| Model | Name | Use |
|-------|------|-----|
|
clarity | Clarity Upscaler | Default upscaler |
| crystal | Crystal Upscaler | Alternative upscaler |
| rmbg | BiRefNet | Background removal |
| bria | Bria RMBG 2.0 | Background removal |Options Reference
`
Usage: falcon [prompt] [options]Options:
-m, --model Model: gpt, banana, gemini, gemini3
-e, --edit Edit an existing image with prompt
-a, --aspect Aspect ratio (see below)
-r, --resolution Resolution: 1K, 2K, 4K
-o, --output Output filename
-n, --num Number of images (1-4)
--transparent Transparent PNG (GPT model only)
--no-open Don't auto-open image after generation
Post-processing:
--last Show last generation info
--vary Generate variations of last image
--up Upscale last image
--rmbg Remove background from last image
--scale Upscale factor: 2, 4, 6, 8 (with --up)
Presets:
Format:
--cover Kindle/eBook cover: 2:3, 2K
--square Square: 1:1
--landscape Landscape: 16:9
--portrait Portrait: 2:3
Social Media:
--story Instagram/TikTok Story: 9:16
--reel Instagram Reel: 9:16
--feed Instagram Feed: 4:5
--og Open Graph / social share: 16:9
Devices:
--wallpaper iPhone wallpaper: 9:16, 2K
Cinematic:
--wide Cinematic wide: 21:9
--ultra Ultra-wide banner: 21:9, 2K
`$3
21:9 | 16:9 | 3:2 | 4:3 | 5:4 | 1:1 | 4:5 | 3:4 | 2:3 | 9:16Cost Tracking
Falcon tracks your spending automatically:
`
Session: $0.52 | Today: $1.24
`View your history in
~/.falcon/history.json`.MIT