CLI for Gemini image generation (Nano Banana) via OpenRouter.
uv tool install git+https://github.com/bokan/banana.gitOr with pipx:
pipx install git+https://github.com/bokan/banana.gitgit clone https://github.com/bokan/banana.git
cd banana
uv tool install .# ~/.config/banana/config.toml
[openrouter]
api_key = "sk-or-v1-..."Get key: https://openrouter.ai/keys
banana # flash model
banana -m pro # pro modelCtrl+V— paste image from clipboardCtrl+D/exit— quit
banana "a cat on a skateboard"
banana "edit this" -i photo.png
banana "edit this" -c # from clipboard
banana "landscape" --aspect 16:9 -m pro
# Multiple images (clipboard first, then -i in order)
banana "apply style from first image to second" -c -i photo.png| Flag | Description |
|---|---|
-m, --model |
flash (default) or pro |
-i, --image |
Input image path |
-c, --clipboard |
Use clipboard image as input |
-a, --aspect |
Aspect ratio (1:1, 16:9, etc) |
-s, --size |
Output size (1K, 2K) |
-o, --output |
Output filename |
flash— google/gemini-2.5-flash-image (Nano Banana)pro— google/gemini-3-pro-image-preview (Nano Banana Pro)