Loading...
Loading...
Generate and edit images using Google's Gemini image generation models (Nano Banana family). Supports style presets, platform-specific sizing (YouTube/slides/blog), variants, image editing via inlineData, reference images for style transfer, and organized output with metadata. Default model is Nano Banana 2 (gemini-3.1-flash-image-preview). Key is auto-decrypted via SOPS.
npx skill4agent add glebis/claude-skills nano-bananascripts/nano_banana.py init~/.config/nano-banana/config.yaml# Simple generation
scripts/nano_banana.py "a minimalist illustration of a rocket" ./rocket.png
# With style preset
scripts/nano_banana.py --preset editorial "interconnected nodes" ./nodes.png
# YouTube thumbnail (auto-cropped to 1280x720)
scripts/nano_banana.py --preset grain --platform youtube "coffee on desk" ./thumb.png
# Generate 4 variants + contact sheet
scripts/nano_banana.py --preset wireframe "a crystal" ./crystal.png --n 4
# Edit existing image
scripts/nano_banana.py --edit ./old.png "make the background deep teal" ./new.png
# Style reference (match aesthetic of existing image)
scripts/nano_banana.py --reference ./style.png "a new mountain landscape" ./mountain.png
# Re-roll last prompt
scripts/nano_banana.py again
# View history
scripts/nano_banana.py history -n 10GEMINI_API_KEYsecrets.enc.yamlexport GEMINI_API_KEY=...sopsagemagickpython3pyyaml| Model | Alias | Nano Banana Name | Use When |
|---|---|---|---|
| | Nano Banana 2 | Best instruction following, fast |
| | Nano Banana Pro | Highest quality, text in images |
| | Nano Banana (original) | Legacy |
--model flash|pro|flash-2.5scripts/nano_banana.py list-presets
scripts/nano_banana.py --preset editorial "your subject" out.png| Preset | Style |
|---|---|
| Thin lines on black, muted palette, technical diagram feel |
| White/cyan lines on dark navy, engineering drawing |
| Japanese sumi-e ink wash, organic brushstrokes, monochrome |
| Flat colors, grain, terracotta + sage, zine aesthetic |
| 3D wireframe mesh, glowing edges on black |
| Star map dots connected by faint lines, celestial |
| Bold shapes, thick borders, hard shadows, flat colors |
| Film grain photo, high ISO, warm cinematic tones |
presets.yamlscripts/nano_banana.py list-platforms
scripts/nano_banana.py --platform youtube "your subject" out.png| Platform | Size |
|---|---|
| 1280×720 |
| 1080×1920 |
| 1920×1080 |
| 1200×630 |
| 1600×900 |
| 1080×1080 |
| 1080×1920 |
| 1000×1500 |
--n Nscripts/nano_banana.py --preset ink "mountain" ./mt.png --n 6
# Creates mt-01.png ... mt-06.png + mt-contact.pngscripts/nano_banana.py --edit ./thumb.png "remove the watermark, warmer colors" ./clean.pngscripts/nano_banana.py --reference ./episode1.png --reference ./episode2.png \
"episode 3: data drift" ./ep3.pngscripts/nano_banana.py --project lab-04/meeting-02 --preset editorial "MCP loops" ./overlay.png
# Saves to ~/nano-banana/outputs/lab-04/meeting-02/20260414-<subject>.png + .json sidecarscripts/nano_banana.py again # rerun last prompt
scripts/nano_banana.py history -n 20 # show last 20 generations
scripts/nano_banana.py history --project lab-04scripts/nano_banana.py --preset editorial --platform youtube "subject" --dry-run500/INTERNAL--model pro'with the text "Hello"'references/api_reference.mdscripts/nano_banana.pyscripts/generate_image.shpresets.yamlplatforms.yamlsecrets.enc.yaml~/.config/nano-banana/config.yamlinit~/.config/nano-banana/history.jsonl~/.config/nano-banana/last.jsonagain