Skip to content
mo-browser-appsPublic

About

Generate macOS app icons using AI.

Resources

Stars

734 stars

Watchers

3 watching

Forks

Latest commit

 

History

161 Commits

Folders and files

Repository files navigation

MōIcons — create app icons for macOS

A simple desktop app for generating macOS app icons in the *.icns format with AI. You describe what you want, optionally attach a reference image, pick from several variants, refine the chosen design, then save a proper *.icns bundle and the *.iconset folder with all standard sizes.

Choose ChatGPT or an API key in the setup wizard. You can change the connection later in generation settings beside the prompt.

For ChatGPT, check the account shown, then select Use this account. MōIcons finds your existing sign-in, or offers browser sign-in with ChatGPT. Install the current ChatGPT desktop app to connect. If the app cannot be found, browse for it or check again; if it needs updating, the wizard offers an update link and checks again when you return. Codex CLI installations are also supported.

If ChatGPT is installed but cannot be found, select Browse… in the status card and choose its .app bundle in the native file picker. You can also press ⇧⌘G in the picker to paste a path. MōIcons checks the connection before saving and shows the selected location in the same card. This location takes priority over all automatic detection and environment overrides. Use Change… to choose another app, or the × beside the saved path to restore automatic detection. Canceling the picker leaves the saved location unchanged.

Connecting does not generate images. Usage starts when you press Generate and uses your Codex allowance and available credits; account limits apply. The model button beside the prompt opens the same generation settings screen used by API providers. ChatGPT model lists the models reported by the desktop app and lets you refresh or save a choice. Account and sign-in controls remain under Change method → ChatGPT. Defaults prefer a listed Astra model for Pro plans (including ProLite), and a listed Sol model for other plans, falling back to the catalog default when the preferred family is absent. These are defaults, not access restrictions: Plus users can select a listed Astra model. Choices are stored separately for each identified account and plan and checked against the catalog before every generation. Saves reject drafts from a different account or plan. If Refresh finds a different account, confirm it with Use this account before generating; a plan change reloads that plan’s saved model choice. The model's suggested reasoning effort and standard speed replace inherited desktop settings; ChatGPT manages the image tool and image quality. The catalog may be cached and does not guarantee image-tool access or remaining quota. A rejected model is not automatically retried: refresh the list and choose another. Change method lets you choose an API key; Disconnect from MōIcons pauses generation until you choose a method again, keeping any saved API key. Neither action signs you out of ChatGPT.

The API option supports the OpenAI API, OpenRouter, and Google Gemini. Select the provider, enter its API key, and continue. MōIcons checks the key and loads compatible image models without generating an image. A failed check keeps your previous connection. The app stores one API key at a time; changing providers replaces it only after validation succeeds.

Defaults favor fast iteration: GPT Image 2.5 Flare at low quality for OpenAI, Nano Banana 2 Lite for OpenRouter, and Nano Banana 2.1 for Gemini when listed by Google. Open generation settings to refresh available image models and choose a model. Choices are saved separately for each provider. OpenAI offers Low, Medium, High, and Auto; OpenRouter controls follow the selected model's capabilities. Gemini offers Nano Banana 2.1, Nano Banana 2 Lite, Nano Banana 2, and Nano Banana Pro when returned by its model catalog, using square 1K output and Google's default thinking settings. Lite is best for quick drafts; other models are better suited to repeated refinements. OPENROUTER_MODEL sets the initial OpenRouter model until you save a selection in the app.

Direct Gemini requires an AI Studio API key and paid Gemini API billing. Checking a key confirms API access and compatible models, but does not confirm remaining image quota or billing eligibility for generation. Gemini subscriptions do not directly authorize generation in MōIcons; eligible Google Cloud credits may offset API charges after billing setup. See Gemini billing, pricing, and your active limits. Gemini variants are requested sequentially, without automatic retries; completed variants survive a later failure. Stop cancels active requests and prevents later variants, but work already processed by Google may still be billed.

Here's a short video demonstrating the app in action:

app-icon-maker-demo.mp4

What it does

  • Prompt-based generation. Your text is wrapped in fixed system constraints, so outputs stay on-brand for macOS-style icons (centered subject, no text, squircle-friendly composition, etc.).
  • Up to three variants per run. Compare images and choose your favorite. The ChatGPT connection generates variants in sequence and keeps completed artwork if a later variant fails.
  • Optional reference image. Attach, paste or drop one PNG, JPEG, WebP or GIF to steer the model (for example a sketch, logo, or earlier render). A new attachment replaces the current reference.
  • Refine workflow. After you confirm one variant, new generations use its original artwork as the reference. Export masks, margins and shadows are kept out of model edits so they do not accumulate.
  • References during refinement. Drop or paste one image into the editor to guide the next change to your current icon. Preview or remove it before generating. Both images and your instruction are sent together; regenerating keeps the same inputs. Selecting a result clears the reference for the next edit and continues the existing History chain. Models that cannot use an extra reference show an inline message with Choose model; your attachment and prompt stay in place. OpenRouter support is checked per provider and effort, while direct providers use documented model support. Unknown models require choosing a supported model.
  • Keep your work. Stopping or failing regeneration preserves the previous variants and selection. Stop cancels active requests and retries; requests already processed by the service may still count toward usage.
  • Local icon history. Completed generations automatically keep every usable variant and its prompt on this Mac. Open History to revisit a design, continue editing, or export it again. Right-click an icon to copy its prompt, reveal its last export in Finder, or remove its history copy. Removing history never deletes exported files. If keeping a generation fails, the artwork stays visible with a retry action and a warning before quitting.
  • Preview. Generated artwork is prepared as a 1024×1024 PNG with a macOS 15 contour, transparent margins, smooth edges and a soft outer shadow. The UI displays this finished PNG without adding another mask or shadow.
  • Export & Save. The same finished PNG is resized into all standard .iconset sizes and packed into .icns, including its transparency and shadow. The saved file carries its own shape for Finder, Dock and DMG windows.

Quitting with an unsaved icon triggers a confirmation dialog.

Requirements

  • macOS 14 (Apple Silicon) or later.
  • Node.js 24.14.1 (LTS) or later.
  • MōBrowser 2.19.0 or later.

Setup

npm install

Run

To run the app in development mode:

npm run dev

For local UI work without APIs:

npm run dev:mock

The ChatGPT connection uses Codex App Server internally: a private codex app-server process with ChatGPT authentication. It does not copy authentication tokens or change the user's Codex configuration. It disables shell, app, plugin, MCP, and subagent tools for image sessions, uses a temporary reference directory, and closes the process after the operation. Stop interrupts the active Codex turn and prevents further variants; generation already processed by the service may still count toward usage. Failed image requests are not automatically repeated.

MōIcons discovers ChatGPT and older Codex apps by their macOS bundle identifier, checking running apps before registered installations. This supports renamed apps and custom installation folders. It also checks ChatGPT.app and Codex.app in /Applications and ~/Applications, then PATH and common CLI locations. Automatic detection tries the next candidate if a process cannot start or complete its initial handshake. Account operations and image requests are not retried against another installation. A saved App location takes highest priority, followed by MOICONS_CODEX_PATH (an absolute executable path), then automatic detection. An unusable explicit override produces an error instead of silently choosing another installation. A Codex version with the built-in image generation tool and app-server imageGeneration events is required. This integration was verified with codex-cli 0.155.0-alpha.16.4; older installations may need updating.

Run provider and connection tests without API calls:

node --test tests/api-key-settings.mjs tests/image-models.mjs tests/gemini.mjs tests/generation-errors.mjs tests/openrouter.mjs tests/codex.mjs tests/codex-discovery.mjs tests/codex-location.mjs tests/codex-startup.mjs tests/image-requests.mjs

Reference refinement checks: node --test tests/refinement-references.mjs. With ICON_PROVIDER=mock npm run dev -- --automation open, run node tests/refinement-references-ui.mjs to verify drop/paste, preview, model compatibility, cancellation, regeneration, and History parent links. It isolates provider replies, settings, and History writes and captures the real UI with fixture artwork in tasks/evidence/refinement-references/.

For attachment, cancellation and refinement regressions, start ICON_PROVIDER=mock npm run dev -- --automation, then run node tests/release-regressions.mjs in another terminal. The check resets the renderer, answers native file dialogs automatically, and isolates generation replies without calling an image provider or changing connection settings.

Build

To build the app for production:

npm run build

Production Sentry telemetry is included only when SENTRY_DSN is set during the build. Release builds read it from the SENTRY_DSN GitHub Actions secret.

How to use the app

  1. Describe the icon in the prompt field (short phrases work well: e.g. “blue clipboard with folded corner”).
  2. Optional: attach a reference image to influence layout or style.
  3. Press Generate (or Enter). Wait for three previews.
  4. Pick a variant to move into refine mode, or generate again from scratch.
  5. In refine mode, adjust the prompt and generate again; the confirmed icon's original artwork is used as reference for the next batch.
  6. When satisfied, click Save. Choose a .icns path; the app writes YourName.icns and YourName.iconset in that folder (replacing existing files only if you confirm).
  7. Use Reveal in Finder from the success UI if you want to open the save location.

Inspect an icon

Each generated variant has a Preview button beneath it. Clicking the artwork still selects the variant; Preview opens a separate, resizable viewer without changing that selection. In refinement, click the single icon. History offers the same viewer from an icon's details.

The viewer starts at Fit. Use − / +, 100%, or Fit, pinch on a trackpad, or hold Command/Ctrl while scrolling to zoom around the pointer. Ordinary scrolling, arrow keys, and dragging pan an enlarged image. Transparency shows a checkerboard behind the image. Escape or Close returns focus to the opener, preserving the prompt, selected variant, and refinement state.

Keyboard shortcuts are Command/Ctrl +/−, Command/Ctrl 0 for 100%, and Command/Ctrl 9 for Fit. Tab moves between the controls and the image. Zoom ranges from 25% to 400%; 100% uses the browser's normal scale (one image pixel per CSS pixel), so Retina screen pixels are handled by the browser. Preview uses the full prepared PNG, including transparency, margins, and shadow; it never changes the export or enlarges a History thumbnail.

The viewer uses MōBrowser's BaseWindow, BrowserView, and browser.zoom APIs. Artwork has a separate app-owned origin because Chromium shares zoom by host; the toolbar stays at its normal size. No Quick Look or platform-specific viewer is used. The image view uses private custom-protocol resource requests; the bundled runtime currently supports these through XMLHttpRequest, but not Fetch or request bodies. Other application actions remain on the generated IPC API.

With npm run dev -- --automation running, verify the complete preview workflow with node tests/icon-preview-ui.mjs. It uses fixture generation without paid API calls or History writes, and saves screenshots in .mobrowser/zoom-review/. The wheel/trackpad input check uses this app's existing debugging endpoint at port 9222 (MOICONS_CDP_URL overrides it). With an icon preview open, node tests/icon-preview-zoom.mjs checks pointer anchoring from Fit, below Fit, and during rapid pinches after panning. It uses the same debugging endpoint without changing the editor or History. With no preview open, node tests/icon-preview-history-ui.mjs verifies switching History variants in the same viewer, reopening an icon, and restoring focus. It uses in-memory History fixtures without provider calls or History writes.

Project layout

  • src/main/ — window, IPC, prompt building, provider selection, icns assembly.
  • src/renderer/ — React UI, icon preparation, generation pipeline state.

Icon preparation

The model supplies square artwork with an opaque background extending to the edges. The app places that artwork inside an 824×824 body at (100, 100) on a transparent 1024×1024 canvas. The contour and dimensions were checked against Apple's macOS Sequoia production template (Template - Icon - App.sketch, 512x512@2x artwork mask). The soft shadow is an app-defined treatment (24px blur, 12px downward offset, 24% black), rendered with the outline at 2× resolution before downsampling. Unexpected rectangular output is center-cropped to a square without stretching.

Preview and export share one prepared PNG; refinement retains the untouched source. Small icon representations are downsampled from this master rather than redrawn individually. macOS 26 can apply additional system styling to legacy icons, so appearance there must be checked separately from macOS 15.

The app's own macOS icon uses this same treatment: assets/app-artwork.png is the untouched source, assets/app-macos.png is the prepared master, and assets/app.icns is the bundled icon (also used for the DMG volume icon).

The 16px and 32px non-Retina ICNS entries are encoded with premultiplied color channels to preserve translucent edges (the Sequoia iconutil conversion can otherwise introduce bright fringes). Larger and Retina entries retain PNG data.

For a repeatable export check, start ICON_PROVIDER=mock npm run dev -- --automation and run node tests/icon-export.mjs in another terminal. This checks the rendered alpha mask and shadow, rectangular input, all ten exported sizes, and an ICNS decode roundtrip without calling an image provider. tests/fixtures/flower.svg is deterministic sample artwork for visual comparisons, not a model-quality test.

Download

You can download the app from the releases page. All releases are signed and notarized by Apple.

About

Generate macOS app icons using AI.

Resources

Stars

734 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages