| name | nano-banana-go-cli |
| description | Use when you need the repo's Go Nano Banana CLI for Gemini image generation or editing, including model selection across Gemini 3.1 and Pro, multi-image references, Google Search grounding, thought output, and scripted multi-turn history files. |
Nano Banana Go CLI
Use this skill when the task is to drive the repo's Go CLI instead of calling the Gemini image API directly.
The CLI lives in the current repo and builds to ./nanobanana.
An API key is required for any Gemini-backed command.
Recommended setup:
./nanobanana config set-api-key
The CLI also accepts GEMINI_API_KEY, NANOBANANA_API_KEY, and GOOGLE_API_KEY, but persistent config is better when project-local .env files may be missing or sandboxed away.
Default model guidance:
- Use
banana2 unless the task specifically needs pro.
banana2 / nano-banana-2 / flash / 3.1 -> gemini-3.1-flash-image-preview
pro -> gemini-3-pro-image-preview
- Gemini 2.5 image models and aliases are deprecated for this project and blocked.
What It Enables
- Text-to-image generation
- Image editing with one or more reference images
- Google Search grounding via
--ground-web
- Google Image Search grounding on Gemini 3.1 via
--ground-image
- Thought output via
--include-thoughts and --thoughts-dir
- Scripted multi-turn image workflows via
--history-in and --history-out
- A single discovery command:
./nanobanana docs
Recommended Workflow
- Build or rebuild the CLI:
make build
- Configure the API key if needed:
./nanobanana config set-api-key
- Use the manual when you need the whole interface in one place:
./nanobanana docs
- Use command-specific help when needed:
./nanobanana generate --help
./nanobanana icon --help
Common Commands
Basic generation:
./nanobanana generate "a robot playing guitar" -o robot.png
Explicit Pro usage:
./nanobanana generate "designer perfume bottle" -m pro --image-size 4K -o bottle.png
Reference-image editing:
./nanobanana generate "add sunglasses and keep the face unchanged" -i face.png -o face-edit.png
Multiple references:
./nanobanana generate "office group photo of these people" -i p1.png -i p2.png -i p3.png -o group.png
Grounding:
./nanobanana generate "a stylish weather poster for New York today" --ground-web -o weather.png
Google Image Search grounding on 3.1:
./nanobanana generate "a detailed painting of a Timareta butterfly resting on a flower" -m banana2 --ground-image -o butterfly.png
Scripted multi-turn flow:
./nanobanana generate "Create a colorful infographic about photosynthesis" -o photo.png --history-out photo-history.json
./nanobanana generate "Translate the infographic to Spanish and change nothing else" -o photo-es.png --history-in photo-history.json --history-out photo-history.json
Important Constraints
banana2 is the default and recommended model.
- If
nanobanana is installed via go install and not on PATH, the user may need to run "$(go env GOPATH)/bin/nanobanana" directly.
--ground-image is only for Gemini 3.1.
- Gemini 3.1 supports
512 plus aspect ratios 1:4, 4:1, 1:8, 8:1.
- Pro supports
1K, 2K, and 4K, but not 512.
- Do not use
banana, 2.5, flash-2.5, gemini-2.5-flash-image, or gemini-2.5-flash-image-preview.
- History files are for scripted automation, not an interactive chat UI.
- When grounded image search is used, preserve containing-page source URLs from JSON output for attribution.