---
name: picture-it
description: CLI tool for AI image generation and editing using FAL AI. Chainable image operations from simple commands. Supports Thai text rendering after font patch. Use for: generate, edit, remove-bg, replace-bg, crop, grade, text, compose, template, pipeline, batch. Cost-aware: flux-schnell $0.003, banana-pro $0.15.
category: creative
tags: [image-generation, image-editing, fal-ai, cli, design, banner, social-media, thai]
created: 2026-04-08
updated: 2026-04-08
version: 1.0.0
skill_path: ~/.hermes/skills/website-creator/creative/picture-it
platforms: [cli, telegram, discord]
credentials: ~/.config/opencode/.env
maintenance: Thai font patch must be re-applied after every picture-it update
---

# Picture-it Skill

CLI tool for AI image generation and editing using FAL AI. Chainable image operations with free local processing (crop, grade, grain, vignette) and paid AI operations.

## Quick Start

```bash
# Load credentials first
set -a && source ~/.config/opencode/.env && set +a

# Ensure bun is in PATH
export PATH="/home/kunthawat/snap/bun-js/87/.bun/bin:$PATH"

# Basic generation
picture-it generate --prompt "dark cosmic background" --size 1200x630 -o bg.png

# AI edit
picture-it edit -i photo.jpg --prompt "replace background" --model kontext -o edited.jpg

# Thai text (requires patch)
picture-it text -i bg.png --title "ทดสอบภาษาไทย" --font "Kanit" --font-size 64 -o out.png
```

## Commands

| Command | Description | FAL? | Cost |
|---|---|---|---|
| `generate` | Text-to-image | Yes | $0.003–$0.25 |
| `edit` | AI image editing | Yes | $0.02–$0.15 |
| `remove-bg` | Background removal | Yes | free |
| `replace-bg` | Remove + generate new bg | Yes | varies |
| `crop` | Resize/crop | No | free |
| `grade` | Color grading | No | free |
| `grain` | Film grain | No | free |
| `vignette` | Edge darkening | No | free |
| `text` | Render text (Satori) | No | free |
| `compose` | JSON overlay | No | free |
| `template` | Built-in templates | No | free |
| `pipeline` | Multi-step chain | — | varies |
| `batch` | Multiple pipelines | — | varies |
| `upscale` | AI upscale | Yes | varies |
| `info` | Image analysis | No | free |

## Model Selection

| Task | Model | Cost |
|---|---|---|
| Fast draft | `flux-schnell` | $0.003 |
| Quality hero | `flux-dev` | $0.03 |
| Text in image | `recraft-v3` | $0.04 |
| Quick edit | `reve-fast` | $0.02 |
| Targeted edit | `kontext` | $0.04 |
| Multi-image (≤10) | `seedream` | $0.04 |
| Best preservation | `banana2` | $0.08 |
| Premium realism | `banana-pro` | $0.15 |

**Always plan before generating.** A 4-pass workflow is $0.10+.

## Thai Font System

picture-it uses Satori for text rendering. Thai fonts are NOT in the default `FONT_FILES` array.

**Symptom:** Thai text shows as ▢ boxes.
**Fix:**
```bash
bun ~/.hermes/skills/website-creator/creative/picture-it/scripts/thai-font-patch.ts --force
```

**This breaks after every `picture-it` update.** Re-run after updates.

Thai fonts: `Kanit` (modern, bold), `Noto Sans Thai` (clean, official).

## Setup

1. **Install:** `bun install -g picture-it`
2. **PATH:** Add `~/snap/bun-js/87/.bun/bin` to `$PATH`
3. **FAL_KEY:** Store in `~/.config/opencode/.env` as `FAL_KEY=your_key`
4. **Fonts:** `picture-it download-fonts`
5. **Thai patch:** `bun ~/.hermes/skills/website-creator/creative/picture-it/scripts/thai-font-patch.ts`

## Workflow Templates

### Blog Hero (~$0.04)
```
1. generate flux-schnell ($0.003) → dark background
2. edit seedream ($0.04) → place logo
3. grade cinematic (free)
4. vignette (free)
```

### Thai Text Hero (~$0.003)
```
1. Ensure patch applied
2. generate flux-schnell ($0.003) → dark background
3. text --font "Kanit" (free) → Thai title
4. grade cinematic (free)
```

### Social Post (~$0.003)
```
1. generate flux-schnell ($0.003) → abstract background
2. grade vibrant (free)
```

## Important Rules

1. **Always load credentials before FAL commands:** `set -a && source ~/.config/opencode/.env && set +a`
2. **Plan before generating** — ask about cost if workflow is complex
3. **Re-patch after updates** — Thai fonts break after `bun install -g picture-it`
4. **Use --model to override** — default models may not be cheapest for the task
5. **Use free operations first** — crop, grade, vignette are free

## Troubleshooting

| Problem | Solution |
|---|---|
| "command not found" | Add bun to PATH: `export PATH="~/snap/bun-js/87/.bun/bin:$PATH"` |
| Thai shows ▢ | Run: `bun ~/.hermes/skills/website-creator/creative/picture-it/scripts/thai-font-patch.ts --force` |
| "No FAL API key" | Load credentials: `set -a && source ~/.config/opencode/.env && set +a` |
| Fonts not found | Run: `picture-it download-fonts` |

## Related Skills

- [[banner-design]] — Use picture-it to generate banner images
- [[website-creator]] — Integrate picture-it outputs into websites