First off, thank you for considering contributing to Flow-Studio! 🎉 Projects like this thrive because of people like you who dedicate their time to building, testing, documenting, and improving developer tools for the open-source community.
Please read through these guidelines to ensure a smooth, productive, and collaborative contribution process.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Architecture & Codebase Overview
- Coding & Style Guidelines
- Security & Privacy
By participating in this project, you agree to uphold a welcoming, respectful, and harassment-free environment for everyone, regardless of experience level, background, or identity. Treat fellow contributors with kindness, empathy, and professional respect.
Encountered an issue or unexpected error? Please check existing GitHub Issues before submitting a new one.
When opening a bug report, include:
- Clear Title: Brief summary of the bug.
- Environment: OS (Windows / Linux / macOS), Python version, browser version (if Web UI).
- Reproduction Steps: Exact commands or Web UI interactions that trigger the bug.
- Expected vs. Actual Behavior: What should have happened vs. what actually occurred.
- Error Logs: Terminal traceback or browser DevTools console output (remove any personal cookies or sensitive tokens before pasting).
Google Flow frequently updates its models (Imagen, Veo, Gemini Omni) and RPC endpoints. If you notice new models or features on flow.google.com:
- Describe the feature or model (Model name, badge, token cost, aspect ratios).
- If possible, provide network inspect snippets showing the RPC ID or payload structure.
- Explain the real-world use case.
Documentation improvements are always welcome! This includes:
- Clarifying setup instructions.
- Fixing typos or grammatical errors.
- Adding code examples for CLI automation scripts.
- Translating guides into different languages.
- Fork the repository on GitHub to your personal account.
- Clone your fork locally:
git clone https://github.com/<your-username>/Flow-Studio.git cd Flow-Studio
- Add upstream remote to keep your branch updated:
git remote add upstream https://github.com/NePreby/Flow-Studio.git
Create an isolated virtual environment:
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux / macOS:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt(Optional) If working on browser automation components in flow_worker.py:
playwright install chromium-
Run Web Studio:
python -m uvicorn app:app --host 127.0.0.1 --port 7860 --reload
Open
http://localhost:7860in your browser. -
Test CLI Commands:
# Check credits python cli.py credits # List models python cli.py models
Before making edits, familiarize yourself with the primary components:
| File / Directory | Purpose |
|---|---|
flow_client.py |
Core engine reverse-engineering Google Flow's /batchexecute RPCs (nzlxg, DviW9c, ogiZ0b, etc.). |
flow_worker.py |
Playwright-based headless browser automation worker for direct canvas interactions. |
app.py |
FastAPI server exposing RESTful endpoints (/api/generate/image, /api/generate/video, etc.). |
cli.py |
Command-line interface with argparse, colored terminal outputs, and parameter validation. |
config.py |
Configuration manager handling config.json loading, path management, and cookie storage. |
web/index.html |
Single-page Web Studio dashboard built with TailwindCSS, Alpine.js, and FontAwesome. |
downloads/ |
Default directory for saving generated media. |
- Follow PEP 8 style guidelines.
- Use explicit type annotations where appropriate (
typing.Dict,typing.Optional,typing.List). - Ensure async safety: use
asyncio.to_threadfor blocking I/O calls inside FastAPI route handlers. - Handle Windows compatibility (e.g.
WindowsProactorEventLoopPolicyand UTF-8 console encoding). - Avoid silent error suppression: log exceptions meaningfully and return structured JSON responses with
{"success": False, "error": "..."}.
- Keep
web/index.htmlresponsive, clean, and styled with TailwindCSS utility classes. - Use Alpine.js reactive components (
x-data,x-init,x-model) instead of heavy external frameworks. - Preserve the modern dark-mode aesthetic (
#090d16background with blue/purple glow accents).
We follow Conventional Commits:
feat:Adds a new feature or model (e.g.,feat: add support for Veo 3.1 4K resolution)fix:Fixes a bug (e.g.,fix: resolve credit status parsing error on RPC DviW9c)docs:Documentation only changes (e.g.,docs: update setup instructions in README)refactor:Code changes that neither fix a bug nor add a feature (e.g.,refactor: modularize RPC payload builder)style:Formatting, missing semi-colons, whitespace fixesperf:Performance improvements
- Create a new branch from
main:git checkout -b feat/your-feature-name
- Make your changes cleanly with appropriate tests and documentation.
- Verify locally: Test both CLI commands and Web UI functionality.
- Commit your changes:
git add . git commit -m "feat: your concise commit summary"
- Push to your fork:
git push origin feat/your-feature-name
- Open a Pull Request (PR) against the
mainbranch ofNePreby/Flow-Studio.- Provide a clear summary of what was added or fixed.
- Attach screenshots or terminal output if visual or CLI changes were made.
- Reference any related issues (e.g.,
Fixes #12).
- Never commit active cookies, passwords, or authentication tokens to Git.
- Always verify that
config.jsonis listed in.gitignorebefore committing. - If you discover a security vulnerability or exploit, please disclose it responsibly by opening a private security advisory or contacting the repository owner directly.
Thank you for helping make Flow-Studio better for everyone! 🚀