Skip to main content

Unofficial CLI for Google Flow — drive Veo image-to-video generations from the terminal.

Project description

gflow-cli

Unofficial Python CLI for Google Flow. Drive Veo (image-to-video, text-to-video) and Imagen (text-to-image) generations from your terminal — scripted, batched, pipeline-friendly.

PyPI version CI Release Python versions License: MIT Status: alpha Code style: ruff Type checked: pyright Tests: TDD Quality Gate Status

⚠️ Unofficial. Reverse-engineered. Not affiliated with Google. Endpoints can change at any time. Full DISCLAIMER.

🌐 Headed-browser today. gflow drives Flow via a persistent Playwright Chromium profile — Google's auth + reCAPTCHA gates currently require it. See Architecture & current limitations for the contributor opportunity.

Why gflow-cli?

For Google AI Ultra / Pro subscribers with Veo credits and batch workloads:

  • Burn credits efficientlyfor p in $(cat prompts.txt); do gflow image t2i "$p"; done (image batching, plus gflow video t2v/i2v/r2v, all ship today)
  • Reuse a subject across shotsgflow character create mints a Flow Character (face + body reference) so the same person appears consistently from generation to generation
  • Build pipelines — wire Veo into your content automation, AI video stack, or batch experiments
  • Stay in the terminal — no Chromium UI, no clicking through dialogs (after a one-time gflow auth login)

Same Veo + Imagen models, same quality, same Ultra/Pro billing — programmatic.

60-second quick start

# 1 · Install (uv recommended — also: pip install gflow-cli)
uv tool install gflow-cli
uv tool run --from gflow-cli playwright install chromium     # one-time, ~150 MB

# 2 · Authenticate (one-time, opens a real Chrome window)
gflow auth login --browser chrome

# 3 · Generate
gflow image t2i "a hot air balloon over Tokyo at sunrise"
# or:
gflow video t2v "Slow cinematic push-in on a sunlit forest clearing" --aspect 16:9
# or mint a reusable Character (face + body reference):
gflow character create --project <id> --name "Aria" --face-prompt "..." --body-prompt "..."

Outputs land under $GFLOW_CLI_OUTPUT_DIR unless GFLOW_CLI_STORAGE_URI sends generated assets to S3, MinIO, or Google Cloud Storage. First call is ~30–90 s while Chromium warms; subsequent calls reuse the warm session.

Why --browser chrome? Google rejects Playwright's bundled Chromium. The CLI fails fast with a friendly error (AuthBrowserRejectedError, exit code 14) if you pick anything else.

In-depth quick start

See USER_GUIDE — Journey 1: First-time setup for the 10-minute walkthrough with troubleshooting, multi-account setup, and the structured-log primer.

Demo

gflow image t2i — single 9:16 prompt, streaming structlog output, PNG on disk

A single gflow image t2i "..." --aspect 9:16 --model nano2 call against a logged-in Pro/Ultra profile. Terminal shows the streaming structlog JSON for the run, the final ls of the written PNG, and nothing else — Chromium drives the Flow editor silently in the background.

Reproduce the recording: scripts/record_demo.ps1 (Windows + OBS + ffmpeg + gifski).

▶ More demos — split-screen (terminal command + Flow generating, side-by-side) and other formats: docs/DEMOS.md.

Documentation

docs/INDEX.md is the master routing layer. Quick links:

Topic Read
🎯 Getting started User Guide · Usage · Configuration
Storage & catalog External Storage · Data Layer
🎭 Characters Characters — reusable subjects (gflow character)
🔐 Auth & sessions Authentication · Known issues
🏗️ Internals Architecture · Security · Debugging
📦 Releases Changelog · Roadmap · Release protocol · Project status
🤝 Contributing Contributing · Development · GitHub workflow

For AI agents & LLMs

gflow-cli ships three agent entry points — pick the one your tool reads first.

File Audience Tools
AGENTS.md Universal coding-agent spec Cursor · Codex · Aider · Gemini CLI · Jules · Devin · Windsurf · Zed · Warp · opencode · Copilot · 60k+ repos
CLAUDE.md Claude Code's auto-loaded memory Claude Code
llms.txt LLM-readable summary (llmstxt.org format) Paste into ChatGPT / Claude / Gemini to onboard the model
skills/gflow-cli/SKILL.md Claude Code Skill Symlink into ~/.claude/skills/

Onboarding any agent in one line: paste this into your agent of choice —

"Read AGENTS.md and docs/INDEX.md, then help me with my Flow batch."

Architecture & current limitations

gflow CLI  →  Provider (interchangeable)  →  Flow (ui_automation) / Mock (tests) / [planned: Official Veo]
                                              ↓
                                      Playwright Chromium (headed login, headless after)
                                              ↓
                              aisandbox-pa.googleapis.com  (Google's private Flow API)

Current transport: ui_automation — drives Flow via a persistent Playwright Chromium profile. Production-stable, end-to-end verified per release (see LIVE_VERIFICATION_* per-release evidence files).

What's blocked: A pure HTTP transport for video generation. The video upload endpoint returns HTTP 401 under non-Chrome browsers + a reCAPTCHA mint we cannot reproduce headlessly. Three earlier HTTP strategies (evaluate_fetch / bearer / sapisidhash) live under src/gflow_cli/api/transports/experimental/ — they are importable for research but not on the production critical path.

How you can help: If you have successfully driven aisandbox-pa.googleapis.com from outside a real Chrome session — or have insight into Google's anti-bot stack here — please open an issue. A working REST transport would unlock serverless deployments, true horizontal concurrency, and roughly 10× the project's reach. Details: docs/ARCHITECTURE.md § Headed-browser dependency.

Project status

v0.12.0 — alpha. Three new capabilities. gflow character mints reusable, project-scoped Flow Character entities — a named subject with reference images, an optional voice, and an optional personality — so the same subject stays consistent across generations (create / list / show / voices, #145). gflow scene composes ordered clips into a scene and renders a credit-free, server-side extended video (no local ffmpeg). gflow video chain links last-frame image-to-video clips from a JSONL manifest into one continuous sequence. This release also fixes create-project generation when Flow surfaces Agent mode as a docked chat panel. Baseline: Image (T2I / I2I / upload) + Video T2V / I2V / R2V live end-to-end on ui_automation, with a video --model picker (5 Veo models) + --duration / --count (v0.11.0 repaired gflow video i2v, issue #125, and hardened image-model selection for non-English Flow UIs, #94; v0.10.0 added --json across every generation command, a gflow models catalog, per-model reference caps, persisted profile identity, external S3 / MinIO / GCS storage, and gflow data prune). Only video batch (manifest runner) is still queued for Phase B — use a shell for-loop until then (USAGE). Full milestone history → docs/PROJECT_STATUS.md. Changelog → CHANGELOG.md. Where the project is heading → ROADMAP.md.

License & legal

MIT License © 2026 Flavio Oliva (ffroliva). The MIT license covers gflow-cli's code only — it does not grant rights to Flow, Veo model output, or any Google service. Google's own terms (Labs Additional Terms, Ultra/Pro subscription terms) govern your generations. See DISCLAIMER.

Acknowledgements


Stats

GitHub stars GitHub forks GitHub watchers GitHub issues GitHub pull requests GitHub last commit GitHub repo size PyPI downloads

If gflow-cli saves you time, please ⭐ the repo — it is the cheapest way to support the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gflow_cli-0.18.0.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gflow_cli-0.18.0-py3-none-any.whl (301.8 kB view details)

Uploaded Python 3

File details

Details for the file gflow_cli-0.18.0.tar.gz.

File metadata

  • Download URL: gflow_cli-0.18.0.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gflow_cli-0.18.0.tar.gz
Algorithm Hash digest
SHA256 3ccb65f3985ed4f14efe4f756c4595d8da6496887c621871c9c2b799218c3f32
MD5 01e03bd4f3cc8e74092efee5d8a433d3
BLAKE2b-256 2011c6dec0e1745a5964a553b5cfd94da1086fb18434a0ef56599ac27c62ddb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gflow_cli-0.18.0.tar.gz:

Publisher: release.yml on ffroliva/gflow-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gflow_cli-0.18.0-py3-none-any.whl.

File metadata

  • Download URL: gflow_cli-0.18.0-py3-none-any.whl
  • Upload date:
  • Size: 301.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gflow_cli-0.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 429911ef8b7ed88b56b37665761580e14535749ed76c0cf47100b4ca8208f532
MD5 f872871a2dc5b4fc7267636cd68df697
BLAKE2b-256 2a7e5e89ead8ad57d8780b55951dd7f4e5feaad3b7509b02c5a42389075f87c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gflow_cli-0.18.0-py3-none-any.whl:

Publisher: release.yml on ffroliva/gflow-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page