Generate high-quality square app icon artwork from the terminal โ built for React Native and Expo.
SnapAI is a developer-friendly CLI that talks directly to:
- OpenAI Images (
gpt-1.5โgpt-image-1.5,gpt-1โgpt-image-1) - Google Nano Banana (Gemini image models) โ selected via
--model banana
The workflow is intentionally square-only: always 1024x1024 (1:1) to match iOS/Android icon needs and avoid resizing headaches.
- Fast: generate icons in seconds. No UI. No accounts.
- Latest image models:
- OpenAI:
gpt-1.5(usesgpt-image-1.5under the hood)gpt-1(usesgpt-image-1under the hood)
- Google Nano Banana (Gemini):
- normal:
gemini-2.5-flash-image - pro:
gemini-3-pro-image-preview
- normal:
- OpenAI:
- iOS + Android oriented: prompt enhancement tuned for app-icon style outputs.
- Quality controls:
- OpenAI:
--quality auto|high|medium|low(aliases:hdโhigh,standardโmedium) - Nano Banana Pro:
--quality 1k|2k|4k
- OpenAI:
- DX-friendly: just a CLI (great for CI/CD too).
- Privacy-first: no telemetry, no tracking. Uses your API keys and sends requests directly to the provider you choose.
Read: Introducing Code With Beto Skills
# Recommended (no install)
npx snapai --help
# Or install globally
npm install -g snapaiImportant ๐
You need at least one API key:
- OpenAI (for
gpt-1.5โgpt-image-1.5,gpt-1โgpt-image-1)- Google AI Studio (for Google Nano Banana / Gemini via
--model banana)SnapAI is CLI-only and sends requests directly to the provider you select.
npx snapai icon --prompt "minimalist weather app with sun and cloud"Output defaults to ./assets (timestamped filenames).
Note ๐
Models can still draw the subject with visual padding (an empty border). This is normal.
SnapAI avoids forcing the words"icon"/"logo"by default to reduce padding.
If you want more โicon-yโ framing, opt in with--use-icon-words.
SnapAI exposes providers via --model:
| Provider | SnapAI flag | Underlying model | Notes |
|---|---|---|---|
| OpenAI (latest) | --model gpt-1.5 |
gpt-image-1.5 |
Always 1:1 square 1024x1024, background/output controls |
| OpenAI (previous) | --model gpt-1 |
gpt-image-1 |
Same controls as above |
| Google Nano Banana (normal) | --model banana |
gemini-2.5-flash-image |
Always 1 image, square output |
| Google Nano Banana 2 | --model banana-2 |
gemini-3.1-flash-image-preview |
1 image, thinking config, 1K output |
| Google Nano Banana (pro) | --model banana --pro |
gemini-3-pro-image-preview |
Quality tiers via --quality 1k/2k/4k, multiple via -n |
Tip ๐ก
If you want multiple variations quickly, use OpenAI (-n) or Banana Pro (--pro -n ...).
You can store keys locally (developer machine), or provide them at runtime (CI/CD).
snapai config --openai-api-key "sk-your-openai-api-key"
snapai config --google-api-key "your-google-ai-studio-key"
snapai config --showUse environment variables so nothing is written to disk:
export SNAPAI_API_KEY="sk-..."
export SNAPAI_GOOGLE_API_KEY="..."
# Also supported:
# export OPENAI_API_KEY="sk-..."
# export GEMINI_API_KEY="..."GitHub Actions example:
- name: Generate app icon
run: npx snapai icon --prompt "minimalist weather app with sun and cloud" --output ./assets/icons
env:
SNAPAI_API_KEY: ${{ secrets.SNAPAI_API_KEY }}You can also pass keys per command (does not persist):
npx snapai icon --openai-api-key "sk-..." --prompt "modern app artwork"
npx snapai icon --model banana --google-api-key "..." --prompt "modern app artwork"# Default (OpenAI)
npx snapai icon --prompt "modern fitness tracker with heart rate monitor"
# Output directory
npx snapai icon --prompt "professional banking app with secure lock" --output ./assets/icons
# Style hint (appended after enhancement)
npx snapai icon --prompt "calculator app" --style minimalism
# Preview the final generated prompt (no image generation)
npx snapai icon --prompt "calculator app" --raw-prompt --prompt-only
npx snapai icon --prompt "calculator app" --prompt-only
npx snapai icon --prompt "calculator app" --style minimalism --prompt-only# Multiple variations
npx snapai icon --prompt "app icon concept" --model gpt-1.5 -n 3
# Higher quality
npx snapai icon --prompt "premium app icon" --quality high
# Transparent background + output format
npx snapai icon --prompt "logo mark" --background transparent --output-format png# Normal (1 image)
npx snapai icon --prompt "modern app artwork" --model banana
# Pro (multiple images + quality tiers)
npx snapai icon --prompt "modern app artwork" --model banana --pro --quality 2k -n 3Nano Banana notes:
- Normal mode always generates 1 image (no
-n, no--qualitytiers). - Pro mode supports multiple images (
-n) and HD tiers (--quality 1k|2k|4k). - Output is always square.
- Describe the product first, then the style:
- โa finance app, shield + checkmark, modern, clean gradientsโ
- If you see too much empty border:
- remove the words
"icon"/"logo"(default behavior), or keep them off and be explicit about โfill the frameโ
- remove the words
- Use
--stylefor rendering/material hints (examples:minimalism,material,pixel,kawaii,cute,glassy,neon)
Note ๐
If you pass--style, the style system is treated as a hard constraint and will take priority over other wording in your prompt.
Try to avoid prompts that conflict with the chosen style (e.g.--style minimalism+ โneon glowโ), or the model may produce inconsistent results.
| Flag | Short | Default | Description |
|---|---|---|---|
--prompt |
-p |
required | Description of the icon to generate |
--output |
-o |
./assets |
Output directory |
--model |
-m |
gpt-1.5 |
gpt-1.5/gpt-1 (OpenAI) or banana (Google Nano Banana) |
--quality |
-q |
auto |
GPT: auto/high/medium/low (aliases: hd, standard). Banana Pro: 1k/2k/4k |
--background |
-b |
auto |
Background (transparent, opaque, auto) (OpenAI only) |
--output-format |
-f |
png |
Output format (png, jpeg, webp) (OpenAI only) |
--n |
-n |
1 |
Number of images (max 10). For Banana normal, must be 1. |
--moderation |
auto |
Content filtering (low, auto) (OpenAI only) |
|
--prompt-only |
false |
Preview final prompt + config without generating images | |
--raw-prompt |
-r |
false |
Send prompt as-is (no SnapAI enhancement/constraints). Style still applies if set |
--style |
-s |
Rendering style hint appended after enhancement | |
--use-icon-words |
-i |
false |
Include "icon" / "logo" in enhancement (may increase padding) |
--pro |
-P |
false |
Enable Nano Banana Pro (banana only) |
--openai-api-key |
-k |
OpenAI API key override (does not persist) | |
--google-api-key |
-g |
Google API key override (does not persist) |
SnapAI is made by Beto โ I build open-source tools and teach React Native. If you're learning React Native, I have a comprehensive course with real-world projects, lifetime access, and a private Discord community. Hundreds of developers are already in.
YouTube ยท Discord ยท Newsletter
- SnapAI does not ship telemetry or analytics.
- SnapAI sends requests directly to OpenAI or Google (depending on
--model). - SnapAI does not run a backend and does not collect your prompts/images.
- API keys are stored locally only if you run
snapai config ...(or provided at runtime via env vars/flags).
Warning
โ ๏ธ
Never commit API keys to git. Use environment variables in CI.
git clone https://github.com/betomoedano/snapai.git
cd snapai && pnpm install && pnpm run build
./bin/dev.js --help- Report bugs: GitHub Issues
- Suggest features: GitHub Issues
- Improve docs / code: see
CONTRIBUTING.md
MIT