AI-Powered App Icon Generator for Developers – SnapAI CLI

An open-source CLI icon generator that generates square 1024x1024 app icons using OpenAI or Google Nanabanana.

SnapAI is a CLI-based app icon generator that creates square 1024×1024 icon artwork using AI image models from OpenAI and Google Gemini.

It’s designed for web developers who need app icons for React Native, Expo, iOS, and Android projects with no graphic design skills.

Features

  • Runs from your terminal, integrates into build scripts, or uses in CI/CD pipelines.
  • Supports OpenAI image models through gpt-1.5 and gpt-1, which map to gpt-image-1.5 and gpt-image-1.
  • Supports Gemini image models, including normal Banana, Banana 2, and Banana Pro.
  • Uses prompt enhancement tuned for app icon output.
  • OpenAI quality controls- auto, high, medium, and low.
  • Banana Pro quality tiers- 1k, 2k, and 4k.
  • Supports transparent backgrounds and output format controls for OpenAI runs.
  • Stores API keys locally only if you choose the config command.
  • Sends requests directly to the selected provider and does not include telemetry or analytics.

How to Use SnapAI

1. Install or run with npx

npx snapai --help

For repeated use, install it globally:

npm install -g snapai

2. Set up your API key. SnapAI requires at least one API key from OpenAI or Google AI Studio. Store it locally for development:

snapai config --openai-api-key "sk-your-openai-api-key"
snapai config --google-api-key "your-google-ai-studio-key"
snapai config --show

Keys write to ~/.snapai/config.json. For CI/CD, use environment variables instead.

export SNAPAI_API_KEY="sk-..."
export SNAPAI_GOOGLE_API_KEY="..."

SnapAI also accepts the standard variable names OPENAI_API_KEY and GEMINI_API_KEY. You can also pass a key directly per command:

npx snapai icon --openai-api-key "sk-..." --prompt "modern app artwork"
npx snapai icon --model banana --google-api-key "..." --prompt "modern app artwork"

3. Generate your first icon

npx snapai icon --prompt "minimalist weather app with sun and cloud"

Output lands in ./assets with a timestamped filename. Point it elsewhere with --output:

npx snapai icon --prompt "professional banking app with secure lock" --output ./assets/icons

4. The default model is gpt-1.5 (OpenAI’s gpt-image-1.5). Switch to Gemini with --model banana:

npx snapai icon --prompt "modern app artwork" --model banana

For Gemini Pro with quality tiers and multiple outputs:

npx snapai icon --prompt "modern app artwork" --model banana --pro --quality 2k -n 3

Note: Banana normal mode always generates exactly one image and ignores -n and --quality. Only --pro unlocks those controls.

5. Preview the enhanced prompt before spending credits

npx snapai icon --prompt "calculator app" --prompt-only
npx snapai icon --prompt "calculator app" --style minimalism --prompt-only
npx snapai icon --prompt "calculator app" --raw-prompt --prompt-only

This prints exactly what SnapAI will send to the model. Useful for diagnosing unexpected results, especially when the model generates padding or misses the intended style.

6. Use GitHub Actions

- 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 }}

Never commit API keys to your repository. Always store them as Actions secrets.

Prompt Tips

Describe the product first, then the style. For example: "a finance app, shield + checkmark, modern, clean gradients".

If you see excessive empty border space, avoid including the words “icon” or “logo” in your prompt (SnapAI already omits them by default).

Add "fill the frame" explicitly if padding persists. The --use-icon-words flag does the opposite and will increase border space.


snapai icon Flag Reference

FlagShortDefaultDescription
--prompt-prequiredText description of the icon to generate
--output-o./assetsOutput directory for generated files
--model-mgpt-1.5gpt-1.5 or gpt-1 for OpenAI; banana for Google Gemini
--quality-qautoOpenAI: auto, high, medium, low (aliases: hd, standard). Banana Pro: 1k, 2k, 4k
--background-bautotransparent, opaque, or auto — OpenAI only
--output-format-fpngpng, jpeg, or webp — OpenAI only
-n-n1Number of images to generate, max 10. Banana normal mode must be 1.
--moderationautoContent filtering: low or auto — OpenAI only
--prompt-onlyfalsePreview the final prompt and config without generating images
--raw-prompt-rfalseSend prompt as-is, bypassing SnapAI’s prompt enhancement
--style-sRendering style hint: minimalism, material, pixel, kawaii, cute, glassy, neon
--use-icon-words-ifalseInclude “icon” and “logo” in the enhanced prompt (may increase visual padding)
--pro-PfalseEnable Banana Pro mode (Gemini Pro model, quality tiers, multiple outputs)
--openai-api-key-kOpenAI API key per command, does not persist
--google-api-key-gGoogle API key per command, does not persist

Pros

  • Works entirely from the terminal.
  • Supports both OpenAI and Google Gemini models.
  • Built‑in prompt enhancement tuned specifically for app icons.
  • Prompt preview saves wasted runs.

Cons

  • Only generates square 1024×1024 images.
  • Still depends on paid provider APIs.

Related Resources

  • OpenAI Images API: Full reference for the image generation models that SnapAI wraps.
  • Google AI Studio: The console where you can generate a Gemini API key.
  • Expo App Icon Guide: Expo’s official documentation on icon sizing, format, and placement requirements.
  • LLM API Pricing: The latest API pricing for popular AI models like GPT, Gemini, Claude, and more.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!