Skip to content

touchizen/AutoFlowCut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

801 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AutoFlowCut

πŸ‡ΊπŸ‡Έ English πŸ‡°πŸ‡· ν•œκ΅­μ–΄

AutoFlowCut intro video - click to play

A desktop app that mass-generates images and videos β€” via Google Flow login or your own Gemini / Veo API key β€” and exports them to CapCut / Premiere Pro / Vrew projects in one click.

Release License: AGPL v3

Overview

Still building AI videos one shot at a time?

AutoFlowCut automates the entire AI video production pipeline. Generate images and videos β€” via Google Flow login (free) or your own Gemini / Veo API key (BYOK) β€” then convert them into ready-to-edit projects for CapCut, Adobe Premiere Pro, or Vrew. Import your script, generate visuals, pick the best media per scene, and export in a single click.

Features

Generation Modes (Flow Login / API Key)

Choose how you generate β€” switch anytime from the top toggle:

  • Flow Login mode β€” Generate via Google Flow login. Beginner-friendly, free generation on a (relatively cheap) subscription. Slower (30+ min per 100 images). Just sign in with a Google account.
  • API Key mode (BYOK) β€” Generate directly with your own Gemini / other API key. For power users and bulk / fast work. Pay-as-you-go (no free tier yet). Fast (~2–5 min per 100 images).

AI Image / Video Generation

  • Batch image generation β€” Generate 100+ AI images in a single batch via the official Google GenAI APIs, with automatic retry on errors.
  • T2V (Text-to-Video) β€” Generate video clips from text prompts (Veo 3.1).
  • I2V (Image-to-Video) β€” Convert generated images into videos.
  • Per-scene media selection β€” Automatically pick the best media among Image / T2V / I2V (priority: I2V > T2V > Image).

Reference System

  • Character / background / style references β€” Tag-based auto-matching keeps 200+ scenes visually consistent.
  • 87 style presets β€” Animation, photography, film, and 8 more categories.
  • Auto-injected style prompts β€” Reference styles are automatically merged into generation prompts.

Export (CapCut / Premiere Pro / Vrew)

  • Multi-editor export β€” One-click export to CapCut, Adobe Premiere Pro (.prproj), or Vrew (.vrew).
  • Complete projects β€” Timeline, media, subtitles, and Ken Burns animation included.
  • Direct project write β€” Writes the project file straight to disk (no manual ZIP / import step).
  • Auto-launch + install guidance β€” Opens the target editor after export; if it isn't installed, you're pointed to the download (or store) page.
  • SRT subtitles β€” Multilingual subtitles included in export.

Audio / SFX Integration

  • Audio package import β€” Automatic detection of narration, voice, and SFX files.
  • SRT timecode matching β€” Audio placement aligned to subtitle timing.
  • Multi-track timeline β€” Image / subtitle / narration / voice / SFX tracks with horizontal zoom, scrub, and playhead.
  • Expandable groups β€” Voice / SFX collapse by character / category; expand sub-tracks to see individual file rows.
  • File row mini-markers β€” Each file row shows a colored bar at its clip's position so timing context is preserved when scrolling.
  • Drag-to-adjust timecode β€” Drag any voice / SFX clip to nudge its timing; persisted to .audio_overrides.json without touching original files.
  • Resizable lanes β€” Per-track height and label-column width are draggable, persisted to localStorage.
  • Preview panel β€” Current playhead position shows the matched scene image + SRT subtitle.
  • Keyboard shortcuts β€” Space play/pause, Esc stop and rewind.
  • Audio review system β€” Flag unsuitable audio with reason and bulk-clean tracks.

MCP Server (Claude Code integration)

  • Built-in MCP server β€” Edit scenes / references / prompts directly from Claude Code.
  • HTTP API bridge β€” Integrate with external tools (port 3210).
  • Skill system β€” Install and manage Claude Code skills; auto-installed on the app's first run.
  • Story Engine v2 β€” End-to-end 9-wave pipeline from script to export.
    • /story-new β†’ Initialize an episode + discuss the topic.
    • /story-execute β†’ Run W1–W9 automatically (sub-agents + review loops, two user gates at W3/W7).
    • /story-step β†’ Run the next single wave only and exit. Manual mode β€” no in-wave prompts; the user reviews each wave's deliverables and re-invokes for the next.
    • /story-next β†’ Resume after interruption (delegates to /story-execute).
    • /story-rewrite β†’ Improve an existing episode (engagement-gap diagnosis β†’ fork β†’ partial wave re-run).

Miscellaneous

  • Full-width desktop workspace β€” Focused React shell for batch generation and export.
  • Multilingual UI β€” Korean, English.
  • Project management β€” Manage multiple projects independently, backed by project.json.
  • Flexible input formats β€” Import TXT, CSV, and SRT files.

Tech Stack

Category Technology
Frontend React 18 + Vite 6
Desktop Electron 36
AI Engine Google Flow (login) + Google Gemini / Veo APIs (BYOK)
Backend Firebase (Auth, Firestore, Cloud Functions)
MCP @modelcontextprotocol/sdk
Payments Lemon Squeezy
Build electron-builder (DMG, ZIP, NSIS, APPX)
Testing Vitest

Architecture

Electron BrowserWindow
β”œβ”€β”€ [React Shell] β€” Full-width desktop app (Shell.jsx)
β”‚   β”œβ”€β”€ Header β€” project picker, Export, Settings
β”‚   β”œβ”€β”€ PromptInput β€” prompt entry
β”‚   β”œβ”€β”€ SceneList β€” scene list (image / video / subtitle)
β”‚   β”œβ”€β”€ ReferencePanel β€” reference management
β”‚   β”œβ”€β”€ AudioPanel β€” audio / SFX import
β”‚   └── StatusBar β€” generation progress
β”‚
β”œβ”€β”€ [GenAI IPC] β€” Gemini / Veo BYOK calls from the main process
β”‚   └── Local encrypted API key storage + REST client
β”‚
└── [MCP Server] β€” stdio + HTTP (port 3210)
    └── Scene / reference / style / audio management tools

IPC Namespaces

Namespace Role File
fs:* File I/O electron/ipc/filesystem.js
genai:* Google GenAI API (image / video generation) electron/ipc/genai-api.js
capcut:* CapCut path detection, project write, app launch electron/ipc/capcut.js
auth:* Google OAuth electron/ipc/auth.js

Video Generation Pipeline (3-Phase Async)

Phase 1: Submit     β†’ Submit video requests with a sliding in-flight concurrency window
Phase 2: Poll       β†’ Poll all generationIds in parallel (up to 20 min)
Phase 3: Download   β†’ Download + save completed videos sequentially

Project Structure

AutoFlowCut/
β”œβ”€β”€ electron/                    # Electron main process
β”‚   β”œβ”€β”€ main.js                 # Main process, menus, IPC registration
β”‚   β”œβ”€β”€ preload.js              # Context bridge (window.electronAPI)
β”‚   └── ipc/                    # IPC handlers
β”‚       β”œβ”€β”€ filesystem.js       # File I/O
β”‚       β”œβ”€β”€ genai-api.js        # Google GenAI API (image / video generation)
β”‚       β”œβ”€β”€ capcut.js           # CapCut path detection, project write
β”‚       β”œβ”€β”€ auth.js             # Google OAuth
β”‚       β”œβ”€β”€ layout.js           # Window/layout IPC
β”‚       β”œβ”€β”€ mcp.js              # MCP HTTP server bridge
β”‚       └── googleApiError.js   # Google API error formatting
β”‚
β”œβ”€β”€ src/                        # React frontend
β”‚   β”œβ”€β”€ App.jsx                 # Main app logic
β”‚   β”œβ”€β”€ Shell.jsx               # Full-width app shell
β”‚   β”œβ”€β”€ components/             # UI components (35+)
β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”œβ”€β”€ SceneList.jsx
β”‚   β”‚   β”œβ”€β”€ ReferencePanel.jsx
β”‚   β”‚   β”œβ”€β”€ AudioPanel.jsx
β”‚   β”‚   β”œβ”€β”€ ExportModal.jsx
β”‚   β”‚   β”œβ”€β”€ SettingsModal.jsx
β”‚   β”‚   β”œβ”€β”€ SceneDetailModal.jsx
β”‚   β”‚   β”œβ”€β”€ VideoDetailModal.jsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ hooks/                  # React hooks (15+)
β”‚   β”‚   β”œβ”€β”€ useGenAPI.js        # Google GenAI API wrapper (image, video)
β”‚   β”‚   β”œβ”€β”€ useAutomation.js    # Batch image generation pipeline
β”‚   β”‚   β”œβ”€β”€ useVideoAutomation.js # Video generation (3-phase async)
β”‚   β”‚   β”œβ”€β”€ useSceneGeneration.js # Per-scene regeneration
β”‚   β”‚   β”œβ”€β”€ useReferenceGeneration.js # Reference generation
β”‚   β”‚   β”œβ”€β”€ useGenerationQueue.js # Unified generation queue
β”‚   β”‚   β”œβ”€β”€ useExport.js        # CapCut export
β”‚   β”‚   β”œβ”€β”€ useAudioImport.js   # Audio import + SRT matching
β”‚   β”‚   β”œβ”€β”€ useScenes.js        # Scene state management
β”‚   β”‚   β”œβ”€β”€ useProjectData.js   # project.json management
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ exporters/              # CapCut JSON generation + disk write
β”‚   β”œβ”€β”€ firebase/               # Auth, Firestore, Cloud Functions
β”‚   β”œβ”€β”€ contexts/               # AuthContext
β”‚   β”œβ”€β”€ config/                 # Defaults, style presets (87)
β”‚   β”œβ”€β”€ locales/                # ko, en
β”‚   β”œβ”€β”€ utils/                  # Utilities (parsers, tag matching, ...)
β”‚   └── stripe/                 # Payments (Lemon Squeezy)
β”‚
β”œβ”€β”€ mcp-server/                 # MCP server (Claude Code integration)
β”‚   └── index.js                # Scene / reference / style / audio / skill tools
β”‚
β”œβ”€β”€ skills/                     # Claude Code skills
β”‚   β”œβ”€β”€ story-engine/           # Story Engine v2 (9-wave pipeline)
β”‚   β”œβ”€β”€ story-new/              # /story-new episode init
β”‚   β”œβ”€β”€ story-execute/          # /story-execute W1–W9 auto-runner
β”‚   β”œβ”€β”€ story-next/             # /story-next resume
β”‚   β”œβ”€β”€ story-step/             # /story-step single-wave manual runner
β”‚   └── story-rewrite/          # /story-rewrite episode improvement
β”œβ”€β”€ docs/                       # Documentation (schemas, store descriptions, ...)
β”œβ”€β”€ tests/                      # Vitest unit + integration tests (mirrors src/)
β”œβ”€β”€ scripts/                    # Build helpers (electron name patch, build-number bump, ...)
β”œβ”€β”€ assets/                     # App icons (icon.icns, icon.png)
β”œβ”€β”€ public/                     # Static assets (style thumbnails)
β”œβ”€β”€ vite.config.js
└── package.json

Getting Started

Prerequisites

  • Node.js 18+
  • npm
  • Google account + Google API key (Gemini / Veo access)
  • CapCut desktop app

Install

git clone https://github.com/touchizen/AutoFlowCut.git
cd AutoFlowCut
npm install

Develop

# Dev mode (test environment β€” uses _test GCF)
npm run dev

# Dev mode (prod environment β€” uses _prod GCF)
npm run dev:prod

Build

# macOS distribution (DMG + ZIP, code-signed + notarized)
npm run dist:mac

# Windows distribution (NSIS + ZIP + APPX, Certum OV code-signed)
npm run dist:win

# Windows individual targets
npm run dist:win:nsis    # For website download (.exe, code-signed)
npm run dist:win:appx    # For MS Store (.appx)

# Linux distribution (AppImage + deb)
npm run dist:linux

# Test-environment distribution
npm run dist:test:mac
npm run dist:test:win

# Packaging test (no installers)
npm run pack

Windows code signing: If SimplySign Desktop is connected during build, the binary is signed automatically (Certum OV certificate).

Build artifacts are written to the release/ directory.

Test

npm test              # Watch mode
npm run test:run      # One-shot run
npm run test:coverage # Coverage report

Tests live in tests/ and mirror the src/ directory layout (Vitest + jsdom + @testing-library/react).

Environment Separation (test / prod)

Cloud Functions are deployed with _test / _prod suffixes.

Script Environment GCF suffix
npm run dev test _test
npm run dev:prod prod _prod
npm run dist:mac / dist:win prod _prod
npm run dist:test:mac / dist:test:win test _test

How to Use

  1. Sign in to AutoFlowCut, then add your Google API key in Settings.
  2. Enter prompts (type directly, or import from TXT / CSV / SRT).
  3. Configure reference images (character, background, style tags).
  4. Click Generate Images to start batch generation with your Google API key.
  5. (Optional) Generate videos via T2V or I2V.
  6. Click Export β€” export requires an active AutoFlowCut trial or subscription, then writes the CapCut project to disk and launches CapCut automatically.

MCP Server

Edit AutoFlowCut scenes / references / prompts directly from Claude Code.

Key Tools

Tool Description
load_csv Load a CSV file + images
list_scenes / get_scene Query scenes
update_prompt / batch_update_prompts Edit prompts
list_references / update_reference_prompt Manage references
list_problem_scenes Filter problem scenes
list_styles Browse style presets
export_capcut Export to CapCut
install_skill / list_skills Manage skills
get_progress Read W_progress.json (sub-agents write it directly via file I/O)
app_generate_scene / app_start_scene_batch App-integrated generation

HTTP API

When the HTTP server is enabled in settings (default port 3210):

GET  /api/current-project  β€” Current project state
GET  /api/scenes           β€” Query scenes
GET  /api/references       β€” Query references
POST /api/update           β€” Update scenes or references
POST /api/generate-scene   β€” Trigger one scene image generation
POST /api/generate-reference β€” Trigger one reference image generation
POST /api/start-scene-batch β€” Start scene batch generation
POST /api/start-ref-batch  β€” Start reference batch generation
GET  /api/batch-status     β€” Query batch progress

Download

Links

Contributing & Rewards

We actively reward community contributions to AutoFlowCut.

🐞 Bug fixes β†’ usage credits

Find a bug in the app, fix it, and open a PR. Once it's reviewed and merged, you receive usage credits sized to the impact of your contribution β€” from a minimum of 10 generations up to 1 year of unlimited use.

πŸ”Œ Revenue-model plugins β†’ merged

Built a plugin that adds a revenue model? Open a PR. We review and merge well-built, secure plugins that fit the project, and work out the details with you.

Open a PR or start a discussion on Discord. All contributions are accepted under AGPL v3 β€” see CONTRIBUTING.md. Reward amounts are granted at the maintainer's discretion based on the quality and impact of each contribution.

License

Copyright (C) 2026 Touchizen

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3 as published by the Free Software Foundation. See LICENSE for the full text.

What this means: you are free to use, modify, and self-host AutoFlowCut. If you distribute a modified version β€” including running it as a hosted network service β€” your changes must also be released under AGPL v3.

Contributions are accepted under the same AGPL v3 license β€” see CONTRIBUTING.md.


Disclaimer: This app is an independent product developed by Touchizen and is not affiliated with, endorsed by, or sponsored by Google or ByteDance (CapCut).

About

Automate Flow to CapCut

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors