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) from your terminal: scripted, batched, pipeline-ready.
⚠️ Unofficial, reverse-engineered, not affiliated with Google. Endpoints can change without notice. Read the full DISCLAIMER.
🌐 Headed browser today. gflow drives Flow through a persistent Playwright Chromium profile, because Google's auth and reCAPTCHA gates require it. The Architecture section shows where you can help.
Why gflow-cli?
You pay for Google AI Ultra or Pro, you have Veo credits, and you run real batch work. gflow-cli gives you:
- Batch generation. Loop prompts straight from the shell:
for p in $(cat prompts.txt); do gflow image t2i "$p"; done. Image batching plusgflow video t2v/i2v/r2vall ship today. - Consistent subjects.
gflow character createmints a Flow Character (face and body reference) so the same person appears from one generation to the next. - Prompt tools.
--tool creative-directorrewrites a terse prompt into a vivid one (Google's 5-component formula) before generating — on any command. Bring your own with My Tools. - Pipelines. Wire Veo into your content automation, AI-video stack, or batch experiments.
- Terminal-native. After one
gflow auth login, you stay in the shell. No clicking through dialogs.
Same Veo and Imagen models, same quality, same Ultra/Pro billing, now 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, or you can route them to S3, MinIO, or Google Cloud Storage with GFLOW_CLI_STORAGE_URI. The first call takes 30 to 90 seconds while Chromium warms up; later 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.
For the full 10-minute walkthrough with troubleshooting and multi-account setup, see USER_GUIDE: Journey 1.
Examples
One command in, real Flow output back. Left: gflow image t2i generating a photorealistic scene in your library. Right: a frame-to-frame transform.
Demo
A single gflow image t2i "..." --aspect 9:16 --model nano2 call against a logged-in Pro/Ultra profile. The terminal streams the run's structlog JSON, then lists the written PNG. Chromium drives the Flow editor silently in the background.
Reproduce the recording with scripts/record_demo.ps1 (Windows, OBS, ffmpeg, gifski). More formats, including the side-by-side split-screen: 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) |
| 🤖 Agentic & automation | Instructions (gflow instructions, persistent brief cards) · Movie (gflow movie, multi-scene manifests) · Tools (--tool, prompt rewriting) · MCP server (gflow mcp run / gflow serve) |
| 🔐 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 four 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 |
| CLAUDE.md | Claude Code's auto-loaded memory | Claude Code |
| llms.txt | LLM-readable summary (llmstxt.org format) | Paste into ChatGPT, Claude, or Gemini to onboard the model |
skills/gflow-cli/SKILL.md |
Claude Code Skill | Symlink into ~/.claude/skills/ |
Onboard 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 through a persistent Playwright Chromium profile. It is production-stable and verified end-to-end every release (see the per-release LIVE_VERIFICATION_* evidence files).
What's blocked: a pure HTTP transport for video generation. The video upload endpoint returns HTTP 401 under non-Chrome browsers plus a reCAPTCHA mint we cannot reproduce headlessly. Three earlier HTTP strategies (evaluate_fetch, bearer, sapisidhash) live under src/gflow_cli/api/transports/experimental/ for research, off the production path.
How you can help: if you have driven aisandbox-pa.googleapis.com from outside a real Chrome session, or you understand Google's anti-bot stack here, please open an issue. A working REST transport would unlock serverless deployments, true horizontal concurrency, and roughly 10x the project's reach. Details: docs/ARCHITECTURE.md § Headed-browser dependency.
Project status
Alpha. Image (t2i, i2i, upload, upscale, batch) and video (t2v, i2v, r2v, batch, chain) run end-to-end on ui_automation, with a 5-model Veo picker plus --duration and --count. Beyond single generations: gflow movie renders multi-scene manifests, gflow instructions manages persistent Agent-Mode brief cards (credits-free), gflow character handles reusable subjects, gflow scene does credit-free server-side stitching, --tool applies prompt-rewriting tools, and an MCP server (gflow mcp run stdio / gflow serve HTTP-SSE) exposes the core surface to AI agents with a CI-enforced CLI↔MCP parity contract.
Full milestone history lives in 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 grants no 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 the DISCLAIMER.
Acknowledgements
edge-tts, design inspiration for community SDKs over private cloud APIs.googleapis/python-genai, the official Veo SDK that a future provider release may alias.- Keysight, Google Labs – Flow AI with Veo3: A Network Traffic Analysis, an independent capture that helped validate the route patterns.
Stats
If gflow-cli saves you time, please ⭐ the repo. It is the cheapest way to support the project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gflow_cli-0.34.0.tar.gz.
File metadata
- Download URL: gflow_cli-0.34.0.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d56edc9c09643c1b94083f20a8182f17aa9b70789dad320a9d261f5baf308a
|
|
| MD5 |
7a730591f8dc216040e2c83dbd58ee90
|
|
| BLAKE2b-256 |
2cb34af7aa79eeedf9eaf87865c54e9261875795140c1bc31f96f57a69f649f5
|
Provenance
The following attestation bundles were made for gflow_cli-0.34.0.tar.gz:
Publisher:
release.yml on ffroliva/gflow-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gflow_cli-0.34.0.tar.gz -
Subject digest:
71d56edc9c09643c1b94083f20a8182f17aa9b70789dad320a9d261f5baf308a - Sigstore transparency entry: 2152637402
- Sigstore integration time:
-
Permalink:
ffroliva/gflow-cli@891c77229577e020265dcb928c187402f62811a0 -
Branch / Tag:
refs/tags/v0.34.0 - Owner: https://github.com/ffroliva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@891c77229577e020265dcb928c187402f62811a0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gflow_cli-0.34.0-py3-none-any.whl.
File metadata
- Download URL: gflow_cli-0.34.0-py3-none-any.whl
- Upload date:
- Size: 440.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2512a38775a9a096904418f5be59db7798f9d4d2ee01758799342e9a354ae32a
|
|
| MD5 |
a493aa9c0d9f063c9971abe964281651
|
|
| BLAKE2b-256 |
786bbccab522064db542e84b071925d6dede64a83b5a91de9053f44112a608f1
|
Provenance
The following attestation bundles were made for gflow_cli-0.34.0-py3-none-any.whl:
Publisher:
release.yml on ffroliva/gflow-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gflow_cli-0.34.0-py3-none-any.whl -
Subject digest:
2512a38775a9a096904418f5be59db7798f9d4d2ee01758799342e9a354ae32a - Sigstore transparency entry: 2152637423
- Sigstore integration time:
-
Permalink:
ffroliva/gflow-cli@891c77229577e020265dcb928c187402f62811a0 -
Branch / Tag:
refs/tags/v0.34.0 - Owner: https://github.com/ffroliva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@891c77229577e020265dcb928c187402f62811a0 -
Trigger Event:
push
-
Statement type: