nano-banana
Original:🇺🇸 English
Translated
Generates AI images using the nano-banana CLI (Gemini 3.1 Flash default, Pro available). Handles multi-resolution (512-4K), aspect ratios, reference images for style transfer, green screen workflow for transparent assets, cost tracking, and exact dimension control. Use when asked to "generate an image", "create a sprite", "make an asset", "generate artwork", or any image generation task for UI mockups, game assets, videos, or marketing materials.
2installs
Added on
NPX Install
npx skill4agent add kingbootoshi/nano-banana-2-skill nano-bananaTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →nano-banana
AI image generation CLI. Default model: Gemini 3.1 Flash Image Preview (Nano Banana 2).
/init - First-Time Setup
When the user says "init", "setup nano-banana", or "install nano-banana", run these commands to get the CLI tool on their machine. No sudo required.
Prerequisites: Bun must be installed. If not:
curl -fsSL https://bun.sh/install | bashbash
# 1. Clone the repo
git clone https://github.com/kingbootoshi/nano-banana-2-skill.git ~/tools/nano-banana-2
# 2. Install dependencies
cd ~/tools/nano-banana-2 && bun install
# 3. Link globally (creates `nano-banana` command via Bun - no sudo)
cd ~/tools/nano-banana-2 && bun link
# 4. Set up API key
mkdir -p ~/.nano-banana
echo "GEMINI_API_KEY=<ask user for their key>" > ~/.nano-banana/.envAfter init, the user can type from anywhere.
nano-banana "prompt"If fails or the command is not found after linking, fall back to:
bun linkbash
mkdir -p ~/.local/bin
ln -sf ~/tools/nano-banana-2/src/cli.ts ~/.local/bin/nano-banana
# Then ensure ~/.local/bin is on PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcGet a Gemini API key at: https://aistudio.google.com/apikey
Quick Reference
- Command:
nano-banana "prompt" [options] - Default: 1K resolution, Flash model, current directory
Core Options
| Option | Default | Description |
|---|---|---|
| | Output filename (no extension) |
| | Image size: |
| model default | Aspect ratio: |
| | Model: |
| current directory | Output directory |
| - | Reference image (can use multiple times) |
| - | Generate on green screen, remove background (FFmpeg) |
| - | Gemini API key (overrides env/file) |
| - | Show cost summary |
Models
| Alias | Model | Use When |
|---|---|---|
| Gemini 3.1 Flash | Default. Fast, cheap (~$0.067/1K image) |
| Gemini 3 Pro | Highest quality needed (~$0.134/1K image) |
Sizes
| Size | Cost (Flash) | Cost (Pro) |
|---|---|---|
| ~$0.045 | Flash only |
| ~$0.067 | ~$0.134 |
| ~$0.101 | ~$0.201 |
| ~$0.151 | ~$0.302 |
Aspect Ratios
Supported: , , , , , , , , ,
1:116:99:164:33:43:22:34:55:421:9Use flag:
-anano-banana "cinematic scene" -a 16:9Key Workflows
Basic Generation
bash
nano-banana "minimal dashboard UI with dark theme"
nano-banana "cinematic landscape" -s 2K -a 16:9
nano-banana "quick concept sketch" -s 512Model Selection
bash
# Default (Flash - fast, cheap)
nano-banana "your prompt"
# Pro (highest quality)
nano-banana "detailed portrait" --model pro -s 2KReference Images (Style Transfer / Editing)
bash
# Edit existing image
nano-banana "change the background to pure white" -r dark-ui.png -o light-ui
# Style transfer - multiple references
nano-banana "combine these two styles" -r style1.png -r style2.png -o combinedTransparent Assets
bash
nano-banana "robot mascot character" -t -o mascot
nano-banana "pixel art treasure chest" -t -o chestThe flag automatically prompts the AI to generate on a green screen, then uses FFmpeg + to key out the background and remove green spill from edge pixels. Pixel-perfect transparency with no manual prompting needed.
-tcolorkeydespillRequires:
brew install ffmpeg imagemagickExact Dimensions
To get a specific output dimension:
- First flag: your reference/style image
-r - Last flag: blank image in target dimensions
-r - Include dimensions in prompt
bash
nano-banana "pixel art character in style of first image, 256x256" -r style.png -r blank-256x256.png -o spriteReference Order Matters
- First reference: primary style/content source
- Additional references: secondary influences
- Last reference: controls output dimensions (if using blank image trick)
Cost Tracking
Every generation is logged to . View summary:
~/.nano-banana/costs.jsonbash
nano-banana --costsUse Cases
- Landing page assets - product mockups, UI previews
- Image editing - transform existing images with prompts
- Style transfer - combine multiple reference images
- Marketing materials - hero images, feature illustrations
- UI iterations - quickly generate variations of designs
- Transparent assets - icons, logos, mascots with no background
- Game assets - sprites, backgrounds, characters
- Video production - visual elements for video compositions
Prompt Examples
bash
# UI mockups
nano-banana "clean SaaS dashboard with analytics charts, white background"
# Widescreen cinematic
nano-banana "cyberpunk cityscape at sunset" -a 16:9 -s 2K
# Product shots with Pro quality
nano-banana "premium software product hero image" --model pro
# Quick low-res concept
nano-banana "rough sketch of a robot" -s 512
# Dark mode UI
nano-banana "Premium SaaS chat interface, dark mode, minimal, Linear-style aesthetic"
# Game assets with transparency (green screen auto-prompted)
nano-banana "pixel art treasure chest" -t -o chest
# Portrait aspect ratio
nano-banana "mobile app onboarding screen" -a 9:16API Key Setup
The CLI resolves the Gemini API key in this order:
- flag
--api-key - environment variable
GEMINI_API_KEY - file in current directory
.env - file next to the CLI script
.env ~/.nano-banana/.env
Get a key at: https://aistudio.google.com/apikey