Skip to content
Back to search

flowgen

⚡ FlowGen: Unlimited high-throughput batch image generation studio & AI agent bridge for Google Flow. Multi-worker parallel tabs, 14 aesthetic styles, native MCP server for Claude & Cursor, 1-click Windows launcher & Google Colab cloud runner.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alirash3ed--flowgen/badge.svg)](/listings/alirash3ed--flowgen)

HTML

<a href="/listings/alirash3ed--flowgen"><img src="/api/listings/alirash3ed--flowgen/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 310 lines
  1. <p align="center">
  2. <picture>
  3. <source media="(prefers-color-scheme: dark)" srcset="assets/logo.svg">
  4. <img alt="FlowGen Image Studio" src="assets/logo-light.svg" width="340">
  5. </picture>
  6. </p>
  7. <p align="center">
  8. <img src="assets/logo.png" width="112" height="112" alt="FlowGen Emblem">
  9. </p>
  10. <h1 align="center">FlowGen Image Studio</h1>
  11. <p align="center">
  12. <b>English</b> · <a href="#-how-it-works">Architecture</a> · <a href="#-two-ways-to-use-it">Studio GUI</a> · <a href="#-built-for-agents">Agent MCP</a> · <a href="#-get-started">Quickstart</a> · <a href="#-license-and-credits">Credits</a>
  13. </p>
  14. <p align="center">
  15. <b>Turn your Google Flow account into an unlimited, high-speed batch image generation pipeline.</b><br>
  16. Parallel Chromium worker tabs, zero-overwrite sequential naming, 14 aesthetic styles, a modern zero-scroll cockpit,<br>
  17. and a native Model Context Protocol (MCP) server for AI coding agents.
  18. </p>
  19. <p align="center">
  20. <img alt="Version" src="https://img.shields.io/badge/FlowGen-v1.0-8b5cf6?style=flat-square">
  21. <img alt="License" src="https://img.shields.io/badge/License-MIT-10b981?style=flat-square">
  22. <img alt="Python" src="https://img.shields.io/badge/Python-3.11+-38bdf8?style=flat-square&logo=python&logoColor=white">
  23. <img alt="Engine" src="https://img.shields.io/badge/Engine-Playwright%20CDP-2EAD33?style=flat-square&logo=playwright&logoColor=white">
  24. <img alt="MCP Protocol" src="https://img.shields.io/badge/Protocol-MCP%202024-06b6d4?style=flat-square">
  25. <a href="https://colab.research.google.com"><img alt="Google Colab" src="https://img.shields.io/badge/Google%20Colab-1--Click%20Launch-f59e0b?style=flat-square&logo=googlecolab&logoColor=white"></a>
  26. <a href="https://github.com/AliRash3ed"><img alt="Author" src="https://img.shields.io/badge/Author-Ali%20Bhatti-ec4899?style=flat-square&logo=github&logoColor=white"></a>
  27. </p>
  28. ---
  29. <p align="center">
  30. <img src="assets/studio_cockpit.png" alt="FlowGen Studio Interface Cockpit" width="100%">
  31. </p>
  32. ---
  33. ## 💡 Why FlowGen?
  34. Commercial image generation APIs charge steep monthly subscriptions and per-image metering (\$0.04 to \$0.12 per generation), while consumer browser interfaces force you to manually type, wait, copy, and paste one image at a time.
  35. **FlowGen bridges this gap completely for free:**
  36. 1. Connects your existing browser account via Chrome DevTools Protocol (CDP).
  37. 2. Spawns parallel Chromium worker tabs to run multiple prompts concurrently (2x to 4x speedup).
  38. 3. Automates sequential downloading with zero image overwrites.
  39. 4. Serves as a native **Model Context Protocol (MCP)** endpoint so agents like **Cursor**, **Claude Desktop**, and **Antigravity** can generate assets autonomously.
  40. 5. Runs anywhere: on your local PC, on a cloud VPS via Docker, or 100% free on **Google Colab** with Cloudflare tunnels.
  41. ---
  42. ## ⚡ How it works
  43. Paste your prompt list, select an aesthetic style, and press **Start Generating**. FlowGen processes the queue across four discrete phases:
  44. 1. **Matrix Ingestion:** Parses raw prompt lines, removes duplicates, and injects selected visual style tokens (e.g. 35mm film, cyberpunk neon, anime studio) with custom prefixes/suffixes.
  45. 2. **Parallel Tab Dispatch:** Distributes generation tasks evenly across 1 to 4 isolated Chromium worker tabs via Chrome DevTools Protocol.
  46. 3. **Sequential Slugging:** Captures rendered outputs, generates clean sequential file names (e.g. `1. Prompt_Title.png`), and isolates them into dedicated project workspaces.
  47. 4. **Library & Telemetry:** Updates the live canvas, logs speed and ETA in real time, and exposes generated images immediately in the Generated Library and to connected AI agents.
  48. <table>
  49. <tr>
  50. <td width="50%" valign="top">
  51. <img src="assets/studio_cockpit.png" alt="FlowGen Studio Generation Cockpit" width="100%"><br>
  52. <sub><b>Generate Cockpit:</b> Dual collapsible sidebars, 14 aesthetic styles, and live telemetry.</sub>
  53. </td>
  54. <td width="50%" valign="top">
  55. <img src="assets/gallery.png" alt="Generated Library by Project" width="100%"><br>
  56. <sub><b>Generated Library:</b> Filter by project folder, inspect metadata, and open in Explorer.</sub>
  57. </td>
  58. </tr>
  59. </table>
  60. ---
  61. ## 🎛️ Two ways to use it
  62. ### 1. Studio Cockpit (Desktop GUI)
  63. - **Zero-Scroll SaaS Cockpit**: Engineered with modern dark and light foundations, high-contrast typography, and zero vertical window scrolling.
  64. - **Dual Collapsible Docks**: Collapse both the left Engine dock and right Execution dock with one click (`«` / `»`) to maximize screen space for prompt editing.
  65. - **1-Click Windows Launcher**: Double-click [`START_FLOWGEN.bat`](START_FLOWGEN.bat) to launch the studio and automatically open your default browser.
  66. - **Live Telemetry Stream**: Real-time measurement of finished images, images per minute speed, ETA countdown, and active worker tab health.
  67. - **Project Folder Management**: Organize outputs by project name, sync custom directories, and open the active project folder directly in Windows Explorer.
  68. <table>
  69. <tr>
  70. <td width="50%" valign="top">
  71. <img src="assets/studio_collapsed.png" alt="Sidebars Collapsed - Max Canvas View" width="100%"><br>
  72. <sub><b>Max Canvas View:</b> Sidebars collapsed with drawer pull tabs for large-scale prompt matrices.</sub>
  73. </td>
  74. <td width="50%" valign="top">
  75. <img src="assets/studio_light.png" alt="High Contrast Light Mode" width="100%"><br>
  76. <sub><b>Light Theme:</b> Crisp high-contrast zinc/slate design system for bright environments.</sub>
  77. </td>
  78. </tr>
  79. </table>
  80. ### 2. Headless Agent Engine (MCP & REST API)
  81. - **Model Context Protocol (MCP)**: Native stdio and HTTP/SSE MCP server for autonomous LLMs.
  82. - **REST API**: Standard endpoints for programmatic integration into any backend, Python script, or mobile app.
  83. - **Cloud Run**: Ready to host on Google Colab or remote VPS without a local GPU.
  84. ---
  85. ## 🤖 Built for agents
  86. FlowGen is built from the ground up for AI coding assistants. By exposing its tools over the **Model Context Protocol (MCP)**, agents in **Cursor**, **Claude Desktop**, and **Antigravity** can write prompts, trigger batch runs, monitor generation progress, and inspect finished image files autonomously.
  87. ### Claude Desktop Configuration
  88. Add this to your `claude_desktop_config.json`:
  89. ```json
  90. {
  91. "mcpServers": {
  92. "flowgen": {
  93. "command": "python",
  94. "args": ["E:/Organized/flowgen/browser2api/run_mcp.py"],
  95. "env": {
  96. "FLOWGEN_API_KEY": "your_api_key_here"
  97. }
  98. }
  99. }
  100. }
  101. ```
  102. ### Cursor IDE Configuration
  103. In **Cursor Settings** → **Features** → **MCP Servers** → **Add New MCP Server**:
  104. - **Name:** `flowgen`
  105. - **Type:** `command`
  106. - **Command:** `python E:/Organized/flowgen/browser2api/run_mcp.py`
  107. ### Exposed MCP Tools
  108. | Tool Name | Parameters | Description |
  109. | :--- | :--- | :--- |
  110. | `flow_generate` | `prompts`, `model`, `orientation`, `workers`, `style_suffix` | Submits batch generation and returns local file paths |
  111. | `flow_get_status` | _none_ | Returns engine health, worker count, and active queue state |
  112. | `flow_get_history` | _none_ | Returns historical analytics, image count, and daily trends |
  113. | `flow_list_projects` | _none_ | Lists all project folders and generated image counts |
  114. | `flow_list_styles` | _none_ | Returns available visual style presets |
  115. | `flow_auth_status` | _none_ | Verifies active Google Flow session status |
  116. ---
  117. ## 🔧 Under the hood
  118. FlowGen replaces cumbersome manual web automation with an asynchronous multi-tab orchestration engine:
  119. - **Chrome DevTools Protocol (CDP)**: Interacts with Chromium directly at the protocol level for low-latency element querying, rapid form submission, and deterministic network event tracking.
  120. - **Worker Tab Pool**: Maintains up to 4 concurrent tab contexts inside a shared persistent browser profile, cycling prompts concurrently while avoiding rate limiting.
  121. - **Session Persistence**: Google authentication tokens and cookies are saved in an isolated local directory (`.browser2api/`), meaning you only log in once.
  122. - **Zero-Overwrite Naming Engine**: File slugs are sequentially indexed and sanitized from prompt text to ensure that large batch runs never overwrite previous renders.
  123. - **Cloudflare HTTPS Bridge**: When running on Google Colab or headless Linux, an automated Cloudflare Tunnel exposes port `8787` securely with TLS and an API key.
  124. ```
  125. ┌─────────────────────────────────────────────────────────────┐
  126. │ FLOWGEN IMAGE STUDIO │
  127. ├──────────────────────────────┬──────────────────────────────┤
  128. │ Desktop Web Cockpit │ AI Agent MCP Server │
  129. │ (FastAPI + Tailwind + JS) │ (Claude, Cursor, Agents) │
  130. └──────────────┬───────────────┴──────────────┬───────────────┘
  131. │ │
  132. ▼ ▼
  133. ┌─────────────────────────────────────────────────────────────┐
  134. │ Orchestrator & Multi-Worker Pool │
  135. ├─────────────────────────────────────────────────────────────┤
  136. │ Worker Tab #1 │ Worker Tab #2 │ Worker Tab #3 │ ... │
  137. │ (CDP Session) │ (CDP Session) │ (CDP Session) │ │
  138. └──────────────┬──────────────────────────────┴───────────────┘
  139. │
  140. ▼
  141. ┌─────────────────────────────────────────────────────────────┐
  142. │ Google Flow Image Generation Engine │
  143. └─────────────────────────────────────────────────────────────┘
  144. ```
  145. ---
  146. ## 🚀 Get started
  147. ### Option 1: Windows 1-Click Launch (Recommended)
  148. Simply double-click [`START_FLOWGEN.bat`](START_FLOWGEN.bat) (or run `start.bat`) from the root folder.
  149. The script automatically detects the virtual environment, starts the server on port `8787`, and opens your default browser.
  150. ---
  151. ### Option 2: Google Colab Cloud Run (Free Cloud GPU)
  152. Run FlowGen completely free without using your local PC:
  153. 1. Open [`FlowGen_Colab.ipynb`](FlowGen_Colab.ipynb) in Google Colab.
  154. 2. Run the cells to install dependencies and initialize the Cloudflare tunnel.
  155. 3. Click your live public HTTPS link and copy the generated `FLOWGEN_API_KEY`.
  156. ---
  157. ### Option 3: Manual Setup (Windows, macOS, Linux)
  158. Requires **Python 3.11 or newer**.
  159. ```bash
  160. # 1. Clone repository
  161. git clone https://github.com/AliRash3ed/flowgen.git
  162. cd flowgen
  163. # 2. Create and activate a virtual environment
  164. python -m venv .venv
  165. # On Windows:
  166. .venv\Scripts\activate
  167. # On macOS / Linux:
  168. source .venv/bin/activate
  169. # 3. Install dependencies & Playwright Chromium
  170. pip install -r requirements.txt
  171. playwright install chromium
  172. # 4. Launch Studio
  173. python browser2api/run_hud.py
  174. ```
  175. Open **[http://127.0.0.1:8787](http://127.0.0.1:8787)** in your browser.
  176. ---
  177. ### Option 4: Docker VPS Deployment
  178. ```bash
  179. docker compose up -d
  180. ```
  181. The studio will be available at `http://YOUR_SERVER_IP:8787`.
  182. ---
  183. ## 🎨 Supported Models & Aspect Ratios
  184. ### Generation Models
  185. - **Nano Banana 2.1** (`nano_banana_2_1`): Default high-quality photorealistic model with rich textures and balanced composition.
  186. - **Nano Banana Pro** (`nano_banana_pro`): Maximum architectural coherence and complex fine details.
  187. - **Nano Banana 2 Lite** (`nano_banana_2_lite`): Optimized lightweight engine for ultra-fast generation batches.
  188. ### Canvas Aspect Ratios
  189. - **9:16 Tall** (1024 × 1792): Fullscreen mobile, vertical reels, and social stories.
  190. - **16:9 Wide** (1792 × 1024): Cinematic desktop wallpapers and landscape key visuals.
  191. - **1:1 Square** (1024 × 1024): Standard profile avatars and square portfolio grids.
  192. - **4:3 Frame** (1408 × 1056): Classic editorial photography and vintage magazine aspect ratio.
  193. ---
  194. ## 🎭 Aesthetic Style Matrix
  195. FlowGen includes 14 built-in aesthetic presets that can be injected at the beginning or end of your prompts:
  196. | Preset Name | Preview Accent | Signature Visual Injections |
  197. | :--- | :--- | :--- |
  198. | **Cinematic Raw** | `#8b5cf6` Violet | 35mm lens, natural dramatic rim lighting, shallow depth of field, 8k |
  199. | **Cyberpunk Neon** | `#06b6d4` Cyan | Vibrant volumetric neon glow, wet night street reflections, octane render |
  200. | **Anime Studio** | `#f59e0b` Amber | Studio Ghibli & Makoto Shinkai aesthetic, luminous clouds, painterly textures |
  201. | **Dark Fantasy** | `#a855f7` Purple | Eldritch gothic atmosphere, ominous fog, moody chiaroscuro lighting |
  202. | **Octane 3D** | `#10b981` Emerald | Subsurface scattering, translucent materials, chromatic aberration, caustics |
  203. | **Impressionist Oil** | `#ec4899` Pink | Heavy impasto palette knife strokes, rich pigment layers, canvas texture |
  204. | **Vector Graphic** | `#3b82f6` Blue | Clean isometric geometric outlines, vibrant flat colors, minimalist |
  205. | **Vintage 1970s** | `#f97316` Orange | Authentic Kodachrome film grain, warm nostalgic color grade, retro vignette |
  206. | **Photoreal Macro** | `#14b8a6` Teal | Extreme close-up lens, microscopic surface details, water droplet caustics |
  207. | **Editorial Fashion** | `#6366f1` Indigo | High-fashion editorial photography, studio strobe lighting, Vogue aesthetics |
  208. | **Minimalist Architecture** | `#64748b` Slate | Monolithic concrete structures, sharp geometric shadows, clean Brutalism |
  209. | **Watercolor Wash** | `#0ea5e9` Sky | Expressive translucent pigment bleeding, wet-on-wet textured paper |
  210. | **3D Claymation** | `#eab308` Yellow | Handcrafted clay textures, stop-motion plasticine finish, studio lighting |
  211. | **Retrowave Synth** | `#d946ef` Fuchsia | 1980s neon wireframe grid, purple chrome sunset, synthwave aesthetic |
  212. ---
  213. ## 📁 Repository Structure
  214. ```text
  215. flowgen/
  216. ├── assets/ # Studio brand logos, icons, and interface screenshots
  217. │ ├── logo.svg # Vector dark logo
  218. │ ├── logo-light.svg # Vector light logo
  219. │ ├── logo.png # Transparent FG emblem
  220. │ ├── studio_cockpit.png # Main studio cockpit screenshot
  221. │ ├── studio_collapsed.png # Collapsed sidebars screenshot
  222. │ ├── studio_light.png # Light theme screenshot
  223. │ └── gallery.png # Generated library screenshot
  224. ├── browser2api/ # Core Python package & GUI engine
  225. │ ├── run_hud.py # GUI application launcher
  226. │ ├── run_mcp.py # Model Context Protocol server
  227. │ └── src/browser2api/ # FastAPI server, multiworker pool & scrapers
  228. ├── colab_run.py # Cloudflare tunnel & Colab runner
  229. ├── docker-compose.yml # Container orchestration configuration
  230. ├── Dockerfile # Production container image
  231. ├── FlowGen_Colab.ipynb # 1-Click Google Colab Notebook
  232. ├── requirements.txt # Core Python dependencies
  233. ├── START_FLOWGEN.bat # 1-Click Windows desktop launcher
  234. ├── start.bat # Shortcut launcher
  235. ├── CONTRIBUTING.md # Open-source contribution guidelines
  236. ├── SECURITY.md # Security & local session policy
  237. ├── LICENSE # MIT License
  238. └── README.md # Project documentation
  239. ```
  240. ---
  241. ## 👨‍💻 License and credits
  242. Architected & engineered by **Ali Bhatti** ([@alirash3ed](https://github.com/AliRash3ed)).
  243. - **GitHub**: [@AliRash3ed](https://github.com/AliRash3ed)
  244. - **LinkedIn**: [Ali Rasheed](https://www.linkedin.com/in/alirasheedbhatti/)
  245. - **Instagram**: [@this_is_ali_r](https://www.instagram.com/this_is_ali_r/)
  246. Released under the **[MIT License](LICENSE)**. Free for personal, commercial, and research use.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.