ffroliva/gflow-cli

Drive Google Flow from the command line: Veo video and Imagen images, scripted, batched and pipeline-ready. Ships an MCP server so coding agents can drive it too, giving you and your agents full programmatic control over generation. Unofficial, alpha, not affiliated with Google.

gflow‑cli – Command‑line driver for Google Flow (Veo & Imagen)

What it is

  • A Python‑based CLI (and optional MCP server) that lets you control Google’s Flow service – the UI that powers Veo video‑generation and Imagen text‑to‑image – from the terminal.
  • It works by launching a real Chrome/Chromium instance with Playwright, logging into your Google account, and automating the Flow UI. All generation happens on Google’s servers and is billed to your own Flow credit balance.

Key capabilities

Feature How you use it
Batch generation gflow image t2i "prompt" or gflow video t2v "prompt" inside a shell loop; the CLI records each item locally before sending, so a crash never burns credits.
Reusable characters gflow character create … stores a face‑+‑body reference so the same “person” appears across generations.
Prompt tools --tool creative‑director rewrites a short prompt into Google’s recommended 5‑component format; you can add custom tools via docs/TOOLS.md.
Pipelines & storage Output goes to $GFLOW_CLI_OUTPUT_DIR by default; you can point it at S3, MinIO or GCS with GFLOW_CLI_STORAGE_URI.
Agent integration Four entry‑points (gflow mcp run, gflow serve, etc.) expose the same commands to AI agents such as Claude Code, Codex, or other LLM‑driven tools.
Auth & session handling gflow auth login --browser chrome opens a real Chrome window for the first login; gflow auth renew refreshes the persisted Playwright profile without user interaction.

Why it matters

  • Gives developers and content pipelines programmatic access to the same high‑quality Veo/Imagen models that the web UI provides, without needing a private Google SDK (the official SDK is still pending).
  • Keeps the cost transparent: only video generation spends credits; image‑related ops are free.
  • Designed for reproducibility – each batch item is saved locally before submission, and distinct exit codes signal UI drift or other failures.

Installation quick‑start

uv tool install gflow-cli                     # recommended installer
uv tool run --from gflow-cli playwright install chromium   # one‑time browser download
gflow auth login --browser chrome            # opens Chrome, logs you in
gflow image t2i "a hot air balloon over Tokyo" # first generation

(You can also use pip install gflow-cli.)

Limitations

  • Relies on a headed Chrome session; a pure HTTP API for video generation is not yet available because Google’s anti‑bot checks block headless calls.
  • The project is in alpha – UI changes on Google’s side can break the automation, though the author provides fast patches.
  • No proxy or fingerprint‑spoofing – the tool aims to stay “unremarkable” to avoid account flagging, but there is no guarantee.

Documentation & community

  • Full user guide, configuration, and troubleshooting docs live under docs/ (e.g., docs/USER_GUIDE.md).
  • The repo includes a roadmap, changelog, and a sponsor page for supporting the solo maintainer.
  • Issues are encouraged, especially contributions that could replace the Chrome‑automation layer with a direct REST transport.

Bottom line gflow-cli is a genuine, production‑oriented tool for automating Google Flow’s image‑to‑video and text‑to‑image capabilities from the command line, aimed at developers who need batch processing, reproducible pipelines, or integration with AI agents.

Related

  • Project
  • Project
  • Project
  • Project