{
  "markdown": "<div align=\"center\">\n\n<a id=\"top\"></a>\n\n<img src=\"./.github/assets/hero.gif\" alt=\"prompt-to-asset demo — one prompt becomes a full favicon bundle in 20 seconds. Works with Claude Code, Cursor, Windsurf, VS Code. Zero API key required.\" width=\"100%\" />\n\n<h1>prompt&#8209;to&#8209;asset</h1>\n\n<p><b>Free image generation for developers, from the CLI or your AI assistant.</b><br/>\nTurn one brief into app icons, favicons, OG images, logos, splash screens, SVG, and platform bundles using the best zero-cost routes first.<br/>\n<b>Built for Cloudflare Workers AI, NVIDIA NIM, HF Inference, Stable Horde, Pollinations, free trials, and offline SVG.</b></p>\n\n<p>\n  <a href=\"https://www.npmjs.com/package/prompt-to-asset\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/prompt-to-asset?style=flat&color=cb3837&logo=npm&logoColor=white&label=npm\"/></a>\n  <a href=\"https://www.npmjs.com/package/prompt-to-asset\"><img alt=\"downloads\" src=\"https://img.shields.io/npm/dm/prompt-to-asset.svg?style=flat&color=8b5cf6&label=downloads\"/></a>\n  <a href=\"https://github.com/MohamedAbdallah-14/prompt-to-asset/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/MohamedAbdallah-14/prompt-to-asset/actions/workflows/ci.yml/badge.svg\"/></a>\n  <a href=\"./LICENSE\"><img alt=\"license\" src=\"https://img.shields.io/badge/license-MIT-22d3ee.svg?style=flat\"/></a>\n  <a href=\"https://nodejs.org\"><img alt=\"node\" src=\"https://img.shields.io/badge/node-%E2%89%A520.11-10b981.svg?style=flat\"/></a>\n  <a href=\"https://modelcontextprotocol.io\"><img alt=\"MCP\" src=\"https://img.shields.io/badge/MCP-1.0-a78bfa.svg?style=flat\"/></a>\n  <a href=\"https://glama.ai/mcp/servers/MohamedAbdallah-14/prompt-to-asset\"><img alt=\"Glama score\" src=\"https://glama.ai/mcp/servers/MohamedAbdallah-14/prompt-to-asset/badges/score.svg\"/></a>\n  <a href=\"#30-second-start\"><img alt=\"zero-key\" src=\"https://img.shields.io/badge/zero--key-ready-16a34a.svg?style=flat\"/></a>\n  <a href=\"https://github.com/MohamedAbdallah-14/prompt-to-asset/stargazers\"><img alt=\"stars\" src=\"https://img.shields.io/github/stars/MohamedAbdallah-14/prompt-to-asset?style=flat&color=f59e0b&logo=github\"/></a>\n</p>\n\n<p>\n  <a href=\"cursor://anysphere.cursor-deeplink/mcp/install?name=prompt-to-asset&config=eyJjb21tYW5kIjogIm5weCIsICJhcmdzIjogWyIteSIsICJwcm9tcHQtdG8tYXNzZXQiXX0=\"><img alt=\"Install in Cursor\" src=\"https://img.shields.io/badge/Install_in_Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white\"/></a>\n  <a href=\"vscode:mcp/install?%7B%22name%22%3A%20%22prompt-to-asset%22%2C%20%22type%22%3A%20%22stdio%22%2C%20%22command%22%3A%20%22npx%22%2C%20%22args%22%3A%20%5B%22-y%22%2C%20%22prompt-to-asset%22%5D%7D\"><img alt=\"Install in VS Code\" src=\"https://img.shields.io/badge/Install_in_VS_Code-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white\"/></a>\n  <a href=\"https://github.com/MohamedAbdallah-14/prompt-to-asset/releases/latest\"><img alt=\"Claude Desktop\" src=\"https://img.shields.io/badge/Claude_Desktop_(.mcpb)-D97706?style=for-the-badge&logo=anthropic&logoColor=white\"/></a>\n  <a href=\"https://smithery.ai/server/prompt-to-asset\"><img alt=\"Smithery\" src=\"https://img.shields.io/badge/Smithery-6366F1?style=for-the-badge&logo=bookstack&logoColor=white\"/></a>\n</p>\n\n<sub>\n  <a href=\"#30-second-start\">Quickstart</a> ·\n  <a href=\"#free-paths-at-a-glance\">Free paths</a> ·\n  <a href=\"#usage\">Usage</a> ·\n  <a href=\"#the-three-modes\">Modes</a> ·\n  <a href=\"#free-paths-beyond-pollinations\">Free APIs</a> ·\n  <a href=\"#mcp-tools\">MCP tools</a> ·\n  <a href=\"./GETTING_STARTED.md\">Full guide</a> ·\n  <a href=\"./CHANGELOG.md\">Changelog</a>\n</sub>\n\n</div>\n\n---\n\n## 30-second start\n\n**Pick one. Run it. You're done.** The recommended path is first.\n\nRuntime: **Node ≥ 20.11** (24 recommended). macOS, Linux, Windows (WSL2 for `--fix` native deps).\n\n<table>\n<tr>\n<td width=\"34%\" valign=\"top\">\n\n### 🔵 AI assistant · recommended\n\nClick an install button above. Then paste one of these into chat:\n\n```text\n• Make a transparent logo for Forge, a dev-tools brand. Flat vector, warm orange.\n• Make a favicon for my app, dark-mode aware.\n• Fan this master.png out to iOS + Android + PWA.\n• Ingest this screenshot as a mark, vectorize, export everything.\n```\n\nWorks in Cursor, Claude Code, VS Code, Windsurf, Codex, Gemini CLI. Zero terminal typing.\n\n</td>\n<td width=\"33%\" valign=\"top\">\n\n### 🟢 Zero key, zero install\n\nOne `curl`, one `npx`. Offline fan-out to every platform.\n\n```bash\ncurl -o logo.png \\\n  \"https://image.pollinations.ai/prompt/\\\nminimal+flat+vector+logo\\\n?model=flux&width=1024&nologo=true\"\n\nnpx prompt-to-asset export logo.png \\\n  --platforms ios,android,pwa,favicon\n```\n\nOutputs: iOS AppIconSet, Android adaptive, PWA, favicon bundle, visionOS scaffold.\n\n</td>\n<td width=\"33%\" valign=\"top\">\n\n### 🟣 CLI · free API keys\n\nBest CLI experience: free tokens first, paid keys optional.\n\n```bash\nnpm i -g prompt-to-asset\np2a doctor          # check env\np2a doctor --fix    # auto-install deps\np2a pick            # interactive\n```\n\nStart with Cloudflare Workers AI, NVIDIA NIM, HF Inference, Stable Horde, and free trials. Paid providers remain optional fallbacks.\n\n</td>\n</tr>\n</table>\n\n<a id=\"free-paths-at-a-glance\"></a>\n\n### Free paths at a glance\n\nYou don't need a paid API key. Ranked best-first:\n\n| Route                                | Gets you                               | Signup                  |\n| ------------------------------------ | -------------------------------------- | ----------------------- |\n| **`inline_svg`** via AI assistant    | Logos, favicons, icon packs — instant  | None                    |\n| **Cloudflare Workers AI**            | Flux-1-Schnell + SDXL, 10k neurons/day | Free token + account ID |\n| **NVIDIA NIM**                       | Flux.1-dev, Flux.2-klein, SDXL, SANA   | Free token, no card     |\n| **HF Inference**                     | SDXL, SD3, Flux dev/schnell            | Free read token         |\n| **Stable Horde**                     | SDXL, Flux on community GPUs           | Anonymous queue         |\n| **Pollinations** (HTTP GET)          | Last-resort raster, RGB                | None                    |\n| **Google AI Studio** (paste-only UI) | Nano Banana / Nano Banana Pro          | Google account          |\n\nDetails + quotas: [Free paths beyond Pollinations](#free-paths-beyond-pollinations). Run `p2a doctor` or ask your assistant for `asset_doctor()` to see what's live right now.\n\n> [!TIP]\n> Stuck? Click **Install in Cursor** or **Install in VS Code** above, restart the editor, and say: _\"make a favicon for my app, dark-mode aware.\"_\n\n---\n\n## Highlights\n\n- **Free CLI-first generation** — `p2a doctor`, `p2a pick`, and the MCP tools rank free API routes before paid models, so developers can generate inside the CLI without enabling billing.\n- **[Three execution modes](#the-three-modes)** — `inline_svg` (host LLM authors SVG), `external_prompt_only` (paste into any web UI), `api` (server calls a free or paid provider). Pick what fits. All three can finish on $0.\n- **[60+ models, free-first routing](#the-router)** — Cloudflare Workers AI, NVIDIA NIM, HF, Horde, Pollinations, free trials, plus optional paid OpenAI / Ideogram / Recraft / BFL / Gemini. Each rule cites a research source.\n- **[Refuses to do the wrong thing](#the-router)** — the `Never` column. No wordmarks past 3 words through a diffusion sampler. No transparent PNG through Imagen. No `negative_prompt` on Flux.\n- **[Offline platform fan-out](#platform-support)** — one 1024² master → iOS AppIconSet, Android adaptive + monochrome, PWA 192/512/512-maskable, favicon bundle, visionOS parallax, Flutter launcher. Zero network.\n- **[Validates before shipping](#security)** — tier-0 checks on every output: dims, alpha presence, checkerboard FFT, safe-zone bbox, ΔE2000 palette drift, WCAG contrast, OCR Levenshtein on wordmarks.\n- **[Sprite sheets + 9-slice](#mcp-tools)** — pack PNG frames into TexturePacker-compatible atlases (Phaser, PixiJS, Godot, Unity); emit 9-slice numbers + CSS `border-image` + Android `.9.png`.\n\n---\n\n## Table of contents\n\n<details>\n<summary>Click to expand</summary>\n\n- [30-second start](#30-second-start)\n- [Usage](#usage) — what to say to your assistant\n- [The three modes](#the-three-modes) — inline_svg · external_prompt_only · api\n- [The router](#the-router) — which model for which job, and what never\n- [Free paths beyond Pollinations](#free-paths-beyond-pollinations)\n- [Install](#install)\n- [Models covered](#models-covered) — 60+\n- [MCP tools](#mcp-tools) — 25 tools\n- [CLI surface](#cli-surface)\n- [Brand bundle (`brand.json`)](#brand-bundle)\n- [Platform support](#platform-support)\n- [Architecture](#architecture)\n- [Comparison](#comparison)\n- [Security](#security)\n- [Research-backed decisions](#research-backed-decisions)\n- [Development](#development)\n- [Community](#community) · [License](#license)\n\n</details>\n\n---\n\n## Usage\n\nYou just talk to your assistant. Example from a new chat:\n\n> **Make me a transparent logo for a developer-tools company called Forge. Flat vector, two-tone warm orange on neutral.**\n\nBehind the scenes:\n\n1. **`asset_doctor()`** — check what modes and providers are live.\n2. **`asset_init_brand({ app_name: \"Forge\", palette: [\"#EA580C\", \"#F5F5F4\"] })`** if no `brand.json` exists.\n3. **`asset_enhance_prompt({ brief })`** returns an `AssetSpec`: classification, rewritten prompt, `modes_available[]`, optional `svg_brief`, optional `paste_targets`, and a `routing_trace` pointing at the research file that backed the decision (plus `never_models` — why Imagen or DALL·E got rejected).\n4. Assistant offers you **`inline_svg`** / **`external_prompt_only`** / **`api`**.\n5. If **`inline_svg`**: it writes `<svg>` inline and calls `asset_save_inline_svg` → writes `master.svg`, `favicon.ico`, apple-touch, AppIconSet, PWA bundle to disk.\n6. If **`external_prompt_only`**: assistant shows the refined prompt and the best paste target (free first). You generate, save, then say _\"ingest this file\"_ → `asset_ingest_external`.\n7. If **`api`**: assistant calls the routed provider. Server mattes, vectorizes, exports, validates.\n8. Follow-up: _\"also fan this out for iOS and Android\"_ → `asset_export_bundle` with the saved master.\n\nZero CLI typing. The CLI is still first-class for CI, shell scripts, and non-MCP environments — both surfaces hit the same core.\n\n---\n\n## Why this exists\n\nTwo facts shape everything here.\n\n> **Producing production-grade software assets is a routing and post-processing problem, not a prompt-engineering problem.**\n\nImagen 3/4 and Gemini Flash Image can't produce real RGBA PNGs — their VAE is RGB-only, so asking for a transparent background renders the grey-and-white checkerboard _as pixels_. SDXL can't spell past ~8 characters. Only Recraft emits native SVG. Flux errors on `negative_prompt`. None of that is visible in the model UI. All of it silently breaks one-shot \"prompt → asset\" tools.\n\n> **You may not have an image-model API key. The plugin works anyway.**\n\nEvery one of the three modes can finish on $0.\n\n---\n\n## The three modes\n\n```mermaid\nflowchart LR\n    A[\"one-line brief\"] --> B[\"asset_enhance_prompt\"]\n    B --> C{\"mode\"}\n    C -->|inline_svg| D[\"Host LLM emits SVG inline<br/>→ asset_save_inline_svg\"]\n    C -->|external_prompt_only| E[\"Paste into web UI<br/>→ asset_ingest_external\"]\n    C -->|api| F[\"Server calls routed provider\"]\n    D --> G[\"matte · vectorize · validate\"]\n    E --> G\n    F --> G\n    G --> H[\"AssetBundle<br/>ios · android · pwa · favicon · visionos · flutter\"]\n```\n\n| Mode                       | Key?     | What happens                                                                                                                                                                                                                                                                                     | Best for                                                       |\n| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |\n| **`inline_svg`**           | No       | Server returns an SVG-authoring brief (viewBox, palette, path budget ≤ 40). Host LLM emits `<svg>…</svg>` inline, then `asset_save_inline_svg` writes master + favicon.ico + apple-touch + AppIconSet + PWA bundle. Instant. Deterministic.                                                      | Logos, favicons, icon packs, stickers, simple app-icon masters |\n| **`external_prompt_only`** | No       | Server returns the dialect-correct prompt plus a ranked list of paste targets, free paths first: Pollinations, HF Inference, Stable Horde, Google AI Studio, Ideogram, Recraft, Midjourney, fal.ai, BFL, ChatGPT, Firefly, Krea. Generate elsewhere, save locally, call `asset_ingest_external`. | Anything — best for illustrations, heroes, text-heavy logos    |\n| **`api`**                  | Optional | Server calls the provider directly. Works **zero-key via Pollinations / Horde / HF**, or with paid keys. Route → generate → matte → vectorize → export → validate → content-addressed bundle.                                                                                                    | Automation, CI, no rate-limit tolerance                        |\n\nThe host LLM picks the mode, or you do. The server surfaces `modes_available` so the assistant offers them to you. **Free paths first — always.**\n\n---\n\n## The router\n\nRouter decisions live in [`data/routing-table.json`](./data/routing-table.json). Capability matrix in [`data/model-registry.json`](./data/model-registry.json). **Every rule cites its research source.**\n\n| Need                     | Primary                                                         | Fallback                                                | Never                              |\n| ------------------------ | --------------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------- |\n| Transparent PNG mark     | `gpt-image-1.5` with `background:\"transparent\"`                 | Ideogram 3 Turbo (`/generate-transparent`) → Recraft V4 | Imagen, Gemini Flash Image, SD 1.5 |\n| Logo with 1–3 word text  | Ideogram 3 Turbo → `gpt-image-1.5` → Recraft V4                 | Composite SVG type over mark                            | Imagen, SD 1.5, `flux-schnell`     |\n| Logo with >3 word text   | **Never a diffusion sampler.** Mark + SVG typography composite. | —                                                       | —                                  |\n| Native SVG               | Recraft V4 (V3 for brand-style pipelines)                       | `inline_svg` (host LLM authors SVG)                     | Everyone else                      |\n| Photoreal hero           | Free CLI route first: Cloudflare / NVIDIA NIM / HF              | Flux Pro / `gpt-image-1.5` / Gemini with paid keys      | DALL·E 3, Imagen 4 for new work    |\n| Iterate an existing mark | `flux-kontext-pro` (edit-only)                                  | Pollinations Kontext (free)                             | —                                  |\n| Zero-cost everything     | `inline_svg` → Cloudflare / NVIDIA NIM / HF / Horde             | Pollinations → paste-only                               | —                                  |\n\nThe **Never** column matters. It's why `prompt-to-asset` refuses to render wordmarks past 3 words in any diffusion sampler, and why asking for a transparent PNG never goes to Imagen.\n\n---\n\n## Free paths beyond Pollinations\n\n| Option                     | How                                            | Best at                              | Catch                                                                |\n| -------------------------- | ---------------------------------------------- | ------------------------------------ | -------------------------------------------------------------------- |\n| **Cloudflare Workers AI**  | Free API token + account ID                    | Flux-1-Schnell, SDXL, DreamShaper    | 10k neurons/day cap (~900 Flux-Schnell or 5k SDXL-Lightning)         |\n| **NVIDIA NIM**             | Free API token, no card                        | Flux.1-dev, Flux.2-klein, SDXL, SANA | 1k requests/month; strong free CLI route                             |\n| **HF Inference**           | Free read token                                | SDXL, SD3, Flux dev + schnell        | Rate-limited, cold-start latency                                     |\n| **Stable Horde**           | Anonymous kudos queue                          | SDXL, Flux community GPUs            | Minutes of queue on the free lane                                    |\n| **Pollinations.ai**        | `curl` → HTTP GET. No signup.                  | Throwaway raster                     | Last resort: silent model swaps, downsizing, RGB only                |\n| **Google AI Studio (UI)**  | Free interactive web UI at aistudio.google.com | Nano Banana / Nano Banana Pro        | No free API — paste-only; download PNG, call `asset_ingest_external` |\n| **Local ComfyUI**          | Community `comfyui-mcp` adapter                | Full fidelity, no caps               | You bring the GPU                                                    |\n| **`inline_svg`**           | Host LLM emits `<svg>` in chat                 | Logos, favicons, simple icons        | ≤40 paths; simple geometry                                           |\n| **`external_prompt_only`** | Paste into any web UI                          | Whatever that UI gives you           | Manual save, then `asset_ingest_external`                            |\n\n<details>\n<summary><b>Google Gemini / Imagen — verified pricing (Apr 2026)</b></summary>\n\nVerified 2026-04-26 against public Gemini API pricing:\n\n- **Imagen 4 image output is paid API.** The pricing table lists Free Tier as \"Not available\" and prices Fast / Standard / Ultra at $0.02 / $0.04 / $0.06 per image.\n- **Nano Banana family is paid API.** `gemini-3.1-flash-image-preview` (Nano Banana 2), `gemini-3-pro-image-preview` (Nano Banana Pro), and `gemini-2.5-flash-image` (original Nano Banana) list image output only in the paid tier. Billing must be enabled on the GCP project to use these via API.\n- **Free for text, multimodal understanding, and embeddings.** The Gemini text-out models still have `Free of charge` input + output on the free tier.\n- **Free interactive image generation is also via the AI Studio web UI** at [aistudio.google.com](https://aistudio.google.com). Community-observed limit 500–1,000 images/day, dynamic. Use `external_prompt_only` + `asset_ingest_external` if you want Nano Banana quality without billing.\n- **Free image generation via the Gemini consumer app** at [gemini.google.com](https://gemini.google.com): Basic 20/day, AI Plus 50/day, AI Pro 100/day, Ultra 1,000/day.\n- **Paid API pricing (per image, standard):** Nano Banana (`gemini-2.5-flash-image`) $0.039; Nano Banana 2 Flash (`gemini-3.1-flash-image-preview`) $0.045/0.5K, $0.067/1K, $0.101/2K, $0.151/4K; Nano Banana Pro (`gemini-3-pro-image-preview`) $0.134/1K-2K, $0.24/4K (+ $0.0011 per input image); Imagen 4 Fast $0.02, Standard $0.04, Ultra $0.06. Batch API is 50% off.\n\n</details>\n\n> Run `p2a doctor` (or ask your assistant for `asset_doctor()`) to see what's live in your environment right now.\n\n---\n\n## Install\n\nEvery command works via `npx` — no install required.\n\n```bash\n# Zero install\nnpx prompt-to-asset doctor           # what's live in this shell right now\nnpx prompt-to-asset doctor --fix     # auto-install native deps (brew / cargo / scoop; never sudo)\nnpx prompt-to-asset pick             # interactive route picker\nnpx prompt-to-asset init --register  # scaffold brand.json + register in .cursor / .vscode / .windsurf\n\n# Or global for daily use\nnpm i -g prompt-to-asset\np2a doctor\n\n# Or per-project for CI\nnpm i -D prompt-to-asset\n```\n\n### Register with your AI assistant\n\n<table>\n<tr>\n<td width=\"50%\">\n\n**Claude Code**\n\n```bash\nclaude mcp add prompt-to-asset -- p2a\n```\n\n**Smithery (universal)**\n\n```bash\nnpx -y @smithery/cli install prompt-to-asset --client claude\n```\n\n</td>\n<td width=\"50%\">\n\n**Cursor · VS Code · Windsurf · Codex · Gemini CLI**\n\nUse the **install buttons at the top** of this README, or see [`docs/install.md`](./docs/install.md) for the exact stanza per IDE.\n\n**Claude Desktop**\n\nDownload the [`.mcpb` bundle](https://github.com/MohamedAbdallah-14/prompt-to-asset/releases/latest) → double-click → restart.\n\n</td>\n</tr>\n</table>\n\nOnce registered, your assistant has the full **24 `asset_*` tool** surface.\n\n---\n\n## Models covered\n\n**Paid direct APIs:** `gpt-image-1`, `gpt-image-1.5`, `dall-e-3` (deprecated 2026-05-12), `imagen-3`, `imagen-4`, `gemini-3-flash-image` (Nano Banana), `gemini-3-pro-image`, `sd-1.5`, `sdxl`, `sd3-large`, `playground-v3`, `flux-schnell`, `flux-dev`, `flux-pro`, `flux-2`, `flux-kontext-pro`, `ideogram-3`, `ideogram-3-turbo`, `recraft-v3`, `leonardo-phoenix`, `leonardo-diffusion-xl`, `fal-flux-pro`, `fal-flux-2`, `fal-sdxl`.\n\n**Free-tier / zero-key:** `pollinations-flux`, `pollinations-turbo`, `pollinations-kontext`, `pollinations-sd`, `horde-sdxl`, `horde-flux`, `hf-sdxl`, `hf-sd3`, `hf-flux-schnell`, `hf-flux-dev`.\n\n**Paste-only surfaces:** `midjourney-v6`, `midjourney-v7`, `firefly-3`, `krea-image-1`. Calling `asset_generate_*` with `mode: \"api\"` against a paste-only primary soft-falls-back to the first API-reachable model in the chain and surfaces a warning. If the whole chain is paste-only, you get an `ExternalPromptPlan` rather than an error.\n\n---\n\n<a id=\"mcp-tools\"></a>\n\n<details>\n<summary><b>🛠  MCP tool surface (25 tools)</b></summary>\n\n| Tool                           | Purpose                                                                                                                                                                                                         |\n| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `asset_capabilities`           | Inventory of modes + providers. Buckets paid / free-tier / paste-only; surfaces zero-key routes first. Read-only.                                                                                               |\n| `asset_enhance_prompt`         | Classify, route, rewrite. Returns modes + `svg_brief` + `paste_targets` + `routing_trace { research_sources, never_models, fallback_chain }` + `clarifying_questions[]` when the brief is ambiguous. Read-only. |\n| `asset_generate_logo`          | `inline_svg` / `external_prompt_only` / `api`. Returns `InlineSvgPlan` / `ExternalPromptPlan` / `AssetBundle`.                                                                                                  |\n| `asset_generate_app_icon`      | Same three modes. `api` produces full iOS / Android / PWA / visionOS / Flutter fan-out. Set `ios_18_appearances: true` for dark + tinted variants.                                                              |\n| `asset_generate_favicon`       | `favicon-{16,32,48}.png`, `icon.svg`, `icon-dark.svg`, `apple-touch`, PWA 192/512/512-maskable, `<link>` snippet, `manifest.webmanifest`.                                                                       |\n| `asset_generate_og_image`      | 1200×630 via Satori + `@resvg/resvg-js`. Deterministic typography, no diffusion-rendered text garbage.                                                                                                          |\n| `asset_generate_illustration`  | `external_prompt_only` / `api`. Brand-locked via bundle refs, LoRA, or `style_id`. Routed primary: Flux.2 (up to 8 refs).                                                                                       |\n| `asset_generate_splash_screen` | iOS `LaunchScreen-2732.png`, Android `mipmap-*/splash.png` + theme XML, PWA splash + README. Pass `existing_mark_svg` to reuse an approved mark.                                                                |\n| `asset_generate_hero`          | Marketing hero art (16:9 / 21:9 / 3:2 / 2:1). `external_prompt_only` / `api`.                                                                                                                                   |\n| `asset_save_inline_svg`        | Round-trip for `inline_svg`. Validates the SVG against the brief, writes the bundle.                                                                                                                            |\n| `asset_ingest_external`        | Round-trip for `external_prompt_only`. Matte → vectorize → validate → bundle.                                                                                                                                   |\n| `asset_remove_background`      | BiRefNet / BRIA RMBG-2.0 / LayerDiffuse / difference matte / U²-Net.                                                                                                                                            |\n| `asset_vectorize`              | `vtracer` / `potrace` / Recraft / posterize fallback, then SVGO.                                                                                                                                                |\n| `asset_upscale_refine`         | DAT2 / Real-ESRGAN / SUPIR / img2img / Lanczos; asset-type-aware.                                                                                                                                               |\n| `asset_validate`               | Tier-0 (dims, alpha, checkerboard FFT, safe-zone bbox, ΔE2000 palette, WCAG contrast, OCR Levenshtein). Tier-2 VLM-as-judge via `PROMPT_TO_BUNDLE_VLM_URL`.                                                     |\n| `asset_brand_bundle_parse`     | Parse `brand.json` / DTCG tokens / AdCP / Markdown into a canonical `BrandBundle`.                                                                                                                              |\n| `asset_doctor`                 | Structured env inventory: native deps, free-tier routes ranked best-first, paid keys, paste-only surfaces, pipeline URLs, mode flags, \"what to try next.\" Read-only.                                            |\n| `asset_models_list`            | Browse the 60+ model registry with filters: `free` / `paid` / `paste_only` / `rgba` / `svg`. Read-only.                                                                                                         |\n| `asset_models_inspect`         | Full capability dump for one model id (or aka alias). Strengths, weaknesses, paste targets, routing rules, env status. Read-only.                                                                               |\n| `asset_export_bundle`          | Fan a 1024² master PNG into iOS AppIconSet + Android adaptive + PWA maskable + visionOS parallax + Flutter launcher + favicon. Offline.                                                                         |\n| `asset_sprite_sheet`           | Pack PNG/WEBP/JPG frames into a sprite sheet + TexturePacker-compatible JSON atlas (Phaser / PixiJS / Godot / Unity). Offline.                                                                                  |\n| `asset_nine_slice`             | Emit a 9-slice config + CSS `border-image` + engine-ready numbers (Unity / Godot / Phaser / PixiJS) from an image plus four pixel guides. Optional Android `.9.png`.                                            |\n| `asset_init_brand`             | Scaffold `brand.json` and ensure the assets dir exists. Auto-detects Next.js, Expo, Flutter, Xcode, Astro, Vite, Remix, Nuxt, React Native, Electron, Node.                                                     |\n| `asset_train_brand_lora`       | Wrap a user-owned LoRA training endpoint (`PROMPT_TO_BUNDLE_MODAL_LORA_TRAIN_URL`). Path-guarded; validates inputs.                                                                                             |\n\nTools are annotated `readOnlyHint` / `idempotentHint` so Cursor auto-approves without prompting.\n\n</details>\n\n<a id=\"cli-surface\"></a>\n\n<details>\n<summary><b>⌨️  CLI surface</b></summary>\n\nUsed by the LLM over `Bash` when MCP isn't registered yet, and by CI. Every read-only command accepts `--json`.\n\n```\np2a                          # default — MCP stdio server\np2a mcp                      # same, explicit\np2a export <master.png>      # offline platform fan-out\np2a export <master.png> --json\np2a init                     # interactive brand.json + IDE registration hints\np2a init --register          # + auto-write .cursor/mcp.json / .vscode/mcp.json / .windsurf/mcp.json\np2a pick                     # interactive model picker\np2a doctor                   # environment inventory\np2a doctor --json            # structured output\np2a doctor --data            # check data/model-registry.json ↔ data/routing-table.json consistency\np2a doctor --fix             # auto-install missing native deps (brew / cargo / scoop; never sudo)\np2a models list              # --free | --paid | --paste-only | --rgba | --svg\np2a models inspect <id>      # full capability dump\np2a sprite-sheet <dir>       # pack frames → PNG + atlas\np2a nine-slice <image>       # 9-slice JSON + CSS + engine numbers + .9.png\np2a --help\n```\n\n</details>\n\n<a id=\"brand-bundle\"></a>\n\n<details>\n<summary><b>🎨  Brand bundle — <code>brand.json</code></b></summary>\n\n```json\n{\n  \"name\": \"Halcyon\",\n  \"palette\": [\"#2563eb\", \"#ffffff\"],\n  \"fonts\": { \"display\": { \"family\": \"Inter\", \"weights\": [700, 800] } },\n  \"style_refs\": [\"https://…/sample1.png\", \"./refs/style2.png\"],\n  \"do_not\": [\"drop shadows\", \"heavy gradients\"],\n  \"lora\": \"halcyon-flux-v2\",\n  \"sref_code\": \"--sref 1234567890\",\n  \"style_id\": \"rc_halcyon_01\"\n}\n```\n\n`p2a init` writes this for you, detecting the framework and suggesting an assets directory. Once present, every generator reads from it automatically.\n\n</details>\n\n<a id=\"platform-support\"></a>\n\n<details>\n<summary><b>📱  Platform support</b></summary>\n\n| Platform                                                                   | What you get                                                                                                                                                                                                      |\n| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **iOS (Xcode)**                                                            | `AppIcon.appiconset` with 1024 opaque, squircle-ready. iOS 18 dark + tinted variants via `ios_18_appearances: true`.                                                                                              |\n| **Android**                                                                | Adaptive foreground + background, Android 13 monochrome, all mipmap densities, optional `.9.png`.                                                                                                                 |\n| **PWA / web**                                                              | `favicon.ico` (16/32/48 multi-res), `icon.svg` with `prefers-color-scheme` dark support, `apple-touch-icon.png` 180×180 opaque, 192/512/512-maskable, `manifest.webmanifest`, `<link>` snippet for your `<head>`. |\n| **Flutter**                                                                | Pre-populated `flutter_launcher_icons.yaml` wiring iOS, Android adaptive, web, macOS, Windows.                                                                                                                    |\n| **visionOS**                                                               | Three-layer parallax scaffold with a README. Layer split stays a human decision.                                                                                                                                  |\n| **Next.js / Astro / Vite / Remix / Nuxt / Expo / React Native / Electron** | Framework detection via `p2a init` / `asset_init_brand` and a sensible output dir.                                                                                                                                |\n| **Games**                                                                  | `sprite-sheet` produces TexturePacker-compatible atlases (Phaser, PixiJS, Godot, Unity). `nine-slice` emits engine-ready numbers.                                                                                 |\n\n</details>\n\n<a id=\"architecture\"></a>\n\n<details>\n<summary><b>🏗  Architecture</b></summary>\n\n```\n  brief (text)\n    ↓  asset_capabilities         → modes available + free/paid/paste-only bucketing\n    ↓  asset_enhance_prompt       → AssetSpec {\n    ↓                                  routing_trace: { rule_id, reason, research_sources, never_models, fallback_chain },\n    ↓                                  modes_available,\n    ↓                                  svg_brief?,         (inline_svg)\n    ↓                                  paste_targets?,     (external_prompt_only)\n    ↓                                  rewritten_prompt, …\n    ↓                                }\n    ↓\n    ├─ mode: inline_svg                → host LLM emits <svg>; asset_save_inline_svg writes bundle\n    ├─ mode: external_prompt_only      → user pastes into web UI; asset_ingest_external runs matte → vectorize → validate\n    └─ mode: api                       → provider(model, prompt, params) → matte → vectorize → upscale → export → validate\n```\n\nContent-addressed storage: `assets/<hash[0:2]>/<hash>/<variant>.<ext>`. The MCP server is synchronous and stateless. `prompt_hash` and `params_hash` in every `AssetBundle` are designed to drop straight into a BullMQ / SQS / Cloudflare Queues `jobId` for a hosted pipeline. Reference design: [`docs/research/18-asset-pipeline-tools/18e-production-pipeline-architecture.md`](./docs/research/18-asset-pipeline-tools/18e-production-pipeline-architecture.md).\n\n### Design thesis\n\nYou own the API keys. The LLM owns everything else.\n\nThe only thing that happens in a terminal is installing the package and putting keys in `.env`. Secrets shouldn't pass through chat. Every other verb — doctor checks, model inspection, platform fan-out, brand scaffolding, sprite sheets, 9-slice configs — is an MCP tool the assistant calls when you ask in natural language.\n\n</details>\n\n---\n\n## Comparison\n\n| Tool                                     | Prompt enhancement | Multi-model routing |              Zero-key               | Dev-asset bundle |                Offline platform fan-out                |\n| ---------------------------------------- | :----------------: | :-----------------: | :---------------------------------: | :--------------: | :----------------------------------------------------: |\n| Promptati / PromptHero                   |   cinematic only   |          ✗          |                  ✗                  |        ✗         |                           ✗                            |\n| Looka / Brandmark / Designs.ai           |         ✗          |          ✗          |                  ✗                  |     partial      |                           ✗                            |\n| ChatGPT / Midjourney / Ideogram (direct) |         ✗          |          ✗          |                  ✗                  |        ✗         |                           ✗                            |\n| appicon.co                               |         ✗          |          ✗          |                  ✓                  |     partial      |                        iOS only                        |\n| flutter_launcher_icons                   |         ✗          |          ✗          |                  ✓                  |     partial      |                     iOS + Android                      |\n| **`prompt-to-asset`**                    |         ✓          |   ✓ (60+ models)    | ✓ (Pollinations / HF / Horde / SVG) |        ✓         | ✓ (iOS + Android + PWA + visionOS + favicon + Flutter) |\n\n---\n\n## Security\n\nThis tool handles API keys for up to 15 providers. Non-negotiables:\n\n- **Keys live in env vars only.** Never written to disk, never logged, never echoed in MCP responses. Provider error bodies go through `redact()` (`packages/mcp-server/src/security/redact.ts`) before reaching the host LLM.\n- **Path access is allow-listed.** `image_path` / `output_dir` / `existing_mark_svg` resolve through symlinks and reject anything escaping project cwd + configured output dir + cache dir + OS tempdir. Widen with `P2A_ALLOWED_PATHS=/path1:/path2`.\n- **SVG is XSS-sanitized before any write.** `<script>`, `<foreignObject>`, `on*=` handlers, `javascript:` URIs, external `<image href>` / `<use href>`, CSS `@import` over the network — all rejected. The check runs unconditionally; SVGO is not required.\n- **Cost guardrail.** Set `P2A_MAX_SPEND_USD_PER_RUN=5.00` to cap any single tool call. Pre-flight estimate refuses to call if over. Free-tier routes are always $0.\n- **Data integrity at boot.** `assertDataIntegrityAtBoot()` runs on start. If a routing rule points at a model id not in the registry, the server refuses to boot with a clear error. Check in CI with `p2a doctor --data`.\n- **No telemetry. No remote calls unless the routed provider explicitly requires one.**\n\nFull policy: [SECURITY.md](./SECURITY.md).\n\n---\n\n## Research-backed decisions\n\nEvery routing rule, dialect switch, safe-zone size, and text ceiling that's implemented is backed by a file under [`docs/research/`](./docs/research/). `asset_enhance_prompt` returns a `routing_trace.research_sources` array on every call. The angle → code pointer map, plus an honest ledger of what's wired and what's deferred, lives in [`docs/RESEARCH_MAP.md`](./docs/RESEARCH_MAP.md).\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/MohamedAbdallah-14/prompt-to-asset.git\ncd prompt-to-asset\nnpm install\nnpm run build\nnpm run typecheck\nnpm run lint\nnpm test               # vitest watch\nnpm run test:run       # vitest run (CI)\nnpm run smoke          # list tools via MCP stdio + correctness assertions\nnpm run sync           # regenerate IDE mirrors from SSOTs\nnpm run verify         # byte-verify mirrors match SSOTs\n```\n\nSSOTs live in `skills/*/SKILL.md`, `rules/*.md`, `.claude-plugin/`, and `data/*.json`. Don't edit `.cursor/`, `.claude/`, `.windsurf/` directly — they're regenerated by `scripts/sync-mirrors.sh` and CI byte-verifies them.\n\n- **Contribution flow:** [CONTRIBUTING.md](./CONTRIBUTING.md)\n- **User on-ramp:** [GETTING_STARTED.md](./GETTING_STARTED.md)\n- **Common snags:** [TROUBLESHOOTING.md](./TROUBLESHOOTING.md)\n- **Release notes:** [CHANGELOG.md](./CHANGELOG.md)\n\n---\n\n## Community\n\n- **Issues + feature requests:** [GitHub Issues](https://github.com/MohamedAbdallah-14/prompt-to-asset/issues)\n- **Security disclosures:** [SECURITY.md](./SECURITY.md)\n- **Code of Conduct:** [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)\n- **Star history:**\n\n<a href=\"https://star-history.com/#MohamedAbdallah-14/prompt-to-asset&Date\">\n  <img src=\"https://api.star-history.com/svg?repos=MohamedAbdallah-14/prompt-to-asset&type=Date\" alt=\"Star History\" width=\"600\"/>\n</a>\n\nIf this repo saved you from hand-crafting another AppIconSet, a star helps it reach other developers fighting the same fight.\n\n---\n\n## Read more\n\nThe thinking behind the design, in long-form:\n\n- **[Why I stopped picking image models and built a router instead](https://blog.mohamedabdallah.com/image-model-router)** — the case for routing across 30+ image models.\n- **[MCP server architecture: what's inside prompt-to-asset](https://blog.mohamedabdallah.com/mcp-server-architecture)** — architecture deep-dive.\n\nCross-posted on [Medium](https://medium.com/@mohamedmabdallah14) and [dev.to](https://dev.to/mohamedabdallah14).\n\n---\n\n## License\n\n[MIT](./LICENSE) © prompt-to-asset contributors.\n\n<div align=\"center\">\n<sub>Built on a 34-category research compendium. See <a href=\"./docs/research/SYNTHESIS.md\">SYNTHESIS.md</a> and <a href=\"./docs/RESEARCH_MAP.md\">RESEARCH_MAP.md</a>.</sub>\n<br/><br/>\n<sub><a href=\"#top\">⬆ back to top</a></sub>\n</div>\n",
  "bytes": 40600,
  "sha": "71e82cd9606056d3eb9a2fe5b4e5f9c11aecf582c11d4e34fd773c12629322af",
  "repo_slug": "mohamedabdallah-14/prompt-to-asset",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mohamedabdallah_14_prompt_to_a_df14c190/readme"
}