This repository integrates the nano-banana-2-skill - an AI image generation CLI powered by Google's Gemini models.
Generate high-quality AI images using Gemini 3.1 Flash (default) or Gemini 3 Pro. Supports multi-resolution outputs (512px to 4K), aspect ratio control, reference image editing, transparent background generation, and cost tracking.
Repository: https://github.com/kingbootoshi/nano-banana-2-skill
# Install Bun (if not already installed)
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc # or ~/.zshrcFor transparent image generation, also install FFmpeg and ImageMagick:
brew install ffmpeg imagemagick # macOS
# or on Linux:
sudo apt-get install ffmpeg imagemagickcd nano-banana-2-skill
bun install
bun linkGet your free API key from: https://aistudio.google.com/apikey
Then set it in one of these ways:
Option A: Home directory config (recommended)
mkdir -p ~/.nano-banana
echo "GEMINI_API_KEY=your_key_here" > ~/.nano-banana/.envOption B: Local .env file
echo "GEMINI_API_KEY=your_key_here" > .envOption C: Environment variable
export GEMINI_API_KEY=your_key_hereAfter setup, use nano-banana from anywhere:
# Basic image generation
nano-banana "a serene landscape at sunset"
# Specify size and aspect ratio
nano-banana "cyberpunk city" -s 2K -a 16:9
# Use Pro model for higher quality
nano-banana "detailed portrait" --model pro
# Generate with transparent background
nano-banana "mascot character" -t -o mascot
# Reference image for style transfer
nano-banana "apply this style to a new scene" -r reference.png
# Show cost summary
nano-banana --costs| Option | Values | Example |
|---|---|---|
-s, --size |
512, 1K (default), 2K, 4K | -s 2K |
-a, --aspect |
1:1, 16:9, 9:16, 4:3, 3:4, etc. | -a 16:9 |
-m, --model |
flash/nb2 (default), pro/nb-pro | --model pro |
-o, --output |
filename (no extension) | -o my-image |
-r, --ref |
image file (use multiple times) | -r style.png |
-t, --transparent |
flag for green screen removal | -t |
- Music video assets - Generate visual elements to accompany Suno AI songs
- Album artwork - Create cover art and promotional images
- Metadata visuals - Generate mood boards and inspiration images
- Tutorials - Create step-by-step visual guides
- Marketing materials - Promotional graphics for music projects
All prices are approximate and based on Gemini's current pricing:
| Size | Flash Model | Pro Model |
|---|---|---|
| 512px | ~$0.045 | Flash only |
| 1K | ~$0.067 | ~$0.134 |
| 2K | ~$0.101 | ~$0.201 |
| 4K | ~$0.151 | ~$0.302 |
All generations are logged to ~/.nano-banana/costs.json. View your cost summary:
nano-banana --costsCommand not found after bun link:
mkdir -p ~/.local/bin
ln -sf ~/tools/nano-banana-2/src/cli.ts ~/.local/bin/nano-banana
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcAPI Key not found: Check that your API key is set in one of these locations (checked in order):
--api-keyflagGEMINI_API_KEYenvironment variable.envfile in current directory.envfile in nano-banana-2-skill root~/.nano-banana/.env
Transparent generation issues:
- Ensure FFmpeg is installed:
which ffmpeg - Ensure ImageMagick is installed:
which convert - Ensure the
-tflag is used in the command
For detailed documentation and advanced features, see:
- Main CLI README:
nano-banana-2-skill/README.md - Skill definition:
nano-banana-2-skill/plugins/nano-banana/skills/nano-banana/SKILL.md - Marketplace info:
nano-banana-2-skill/.claude-plugin/marketplace.json
Your Gemini API key is sensitive. Keep it secure and never commit .env files to version control. The .env file is already in .gitignore.