gflow-cli

io.github.ffroliva由 GitHub 帳號 ffroliva 發布v0.96.1更新於 Nov 8, 2026

Drive Google Flow from an agent: Veo video and Imagen image generation

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

讓助理透過你自己的 Google 帳號與額度,驅動 Google Flow 產生 Veo 影片與 Imagen 圖像。

可以做什麼
  • 依文字提示產生圖像,可設定長寬比、模型與數量
  • 產生並延長影片:文字生影片、圖片生影片、參考生影片,以及超過 8 秒的續接
  • 建立可重複使用的 Flow 角色,讓同一人物在多代產生中保持一致
  • 套用提示詞改寫工具,並管理持續保存的簡報卡片
  • 算繪多場景影片清單,並在伺服器端拼接場景
  • 查詢工作階段狀態與 Veo 額度餘額,不消耗額度
適用情境
適合已擁有可存取 Flow 的 Google 帳號與 Veo 額度,希望以腳本、批次或流程方式產生圖像與影片,而不是在 Flow 介面中手動點選的使用者。
執行需求
以本機 Python 套件執行,可用 uvx 或 pip 安裝,並需一次性下載約 150 MB 的 Playwright Chromium。需要具圖形介面的 Chrome 瀏覽器與互動式登入;選用環境變數 GFLOW_CLI_HOME 可指定設定、資料庫與瀏覽器設定檔的存放位置。
安裝前請注意
處於 alpha 階段且為逆向實作,與 Google 無關;自動化受 Google 服務條款約束,可能為帳號帶來風險。影片產生會消耗你自己的 Flow 額度,若要避免可改用不註冊消耗額度工具的啟動方式。它會操作真實瀏覽器工作階段,可能修改或上傳你 Flow 專案中的媒體,並在取得同意後上傳匿名的每週使用統計。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 gflow-cli,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

gflow-cli

Python CLI and MCP server for Google Flow. Drive Veo (image-to-video, text-to-video) and Imagen (text-to-image) from your terminal: scripted, batched, pipeline-ready.

[PyPI version] [CI] [Release] [Python versions] [License: MIT] [Status: alpha] [Code style: ruff] [Type checked: pyright] [Tests: TDD] [Quality Gate Status] [Coverage] [OpenSSF Scorecard] [Listed on mcpservers.org]

⚠️ Read this before you install. gflow-cli is alpha and reverse-engineered — not affiliated with Google. It drives a headed browser on your own Google Flow session, so treat it as your own account risk: automation is subject to Google's ToS, and endpoints or UI can change without notice. It works with any Google account that has Flow access, and every generation bills against your account's Flow credit allowance. Read the full DISCLAIMER.

🛡️ "Will this get my account flagged?" The honest, specific answer — what the tool does to stay unremarkable (headed real Chrome, randomised interaction timing, paced submissions), what it deliberately does not do (no proxies, no fingerprint spoofing, no pretending it isn't automation), what you can tune, and what we cannot promise — is in docs/ACCOUNT_SAFETY.md.

💳 What failure costs you. Credits are only spent on Veo video generation — images and composition ops are free, so most breakage costs nothing. When Flow's UI drifts mid-run, the CLI fails fast and loudly with distinct exit codes (e.g. selector drift = exit 23) instead of resubmitting, and batch items are recorded locally before submission so a broken run never silently burns credits on a stale state. See KNOWN_ISSUES for the current risk list.

🌐 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 have a Google account with Flow access, 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 plus gflow video t2v / i2v / r2v all ship today, and gflow video extend continues an existing clip past Flow's 8s ceiling.
  • Consistent subjects. gflow character create mints a Flow Character (face and body reference) so the same person appears from one generation to the next.
  • Prompt tools. --tool creative-director rewrites 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. A stale session renews headlessly with gflow auth renew.

Same Veo and Imagen models, same quality, same billing against your own Google account, now programmatic.

60-second quick start

bash
# 1 · Install (uv recommended; also: pip install gflow-cli)uv tool install gflow-cliuv tool run --from gflow-cli playwright install chromium     # one-time, ~150 MB# later: `gflow update` upgrades in place (every command shows a banner when a newer release is out)
# 2 · Authenticate (one-time, opens a real Chrome window)# Behind a proxy (e.g. Clash)? Set GFLOW_CLI_BROWSER_PROXY=http://127.0.0.1:7897 first (docs/CONFIGURATION.md)gflow auth login --browser chrome
# Check the session (spends nothing)gflow auth statusgflow credits user          # Veo credit balance (opens Flow in the browser; spends nothing)
# 3 · Generategflow 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? It is the only strategy that marks the profile as a real-Chrome profile, which is what later generation runs open it with. The default auto picks it whenever Chrome is installed — see docs/AUTHENTICATION.md.

Installing from a local checkout? uv tool install <path> ignores uv.lock and resolves dependencies from the pyproject.toml ranges, so it can hand you a Playwright build this project has never tested. Playwright ships the browser driver, and an untested minor can wedge a generation silently. Carry the locked version explicitly:

bash
uv tool install --force --with playwright==1.59.0 .

Installing from PyPI (uv tool install gflow-cli) is unaffected — the published range is upper-bounded. Check what you actually have with uv tool run --from gflow-cli python -c "import importlib.metadata as m; print(m.version('playwright'))".

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.

[gflow-cli examples: text-to-image generation, and a before/after frame transform]

Demo

[gflow image t2i runs a single 9:16 prompt, streams structlog output, and writes a PNG to disk]

A single gflow image t2i "..." --aspect 9:16 --model nano2 call against a logged-in Flow 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:

Usage data: gflow stores local usage counters and, after an interactive notice (and explicit consent in the EU/EEA), uploads weekly totals without an identifier. See the privacy notice and how to turn it off.

TopicRead
🎯 Getting startedUser Guide · Usage · Configuration
Storage & catalogExternal Storage · Data Layer
🎭 CharactersCharacters, reusable subjects (gflow character)
🤖 Agentic & automationInstructions (gflow instructions, persistent brief cards) · Movie (gflow movie, multi-scene manifests) · Tools (--tool, prompt rewriting) · MCP server (gflow mcp run / gflow serve)
🔐 Auth & sessionsAuthentication · Known issues
📣 Where to install fromMarketplaces (every channel and what each actually delivers) · Container (why the image introspects but cannot generate)
🏗️ InternalsArchitecture · Security · Usage data notice · Debugging
📦 ReleasesChangelog · Roadmap · Release protocol · Project status
🤝 ContributingContributing · Development · GitHub workflow

For AI agents & LLMs

gflow-cli ships four agent entry points. Pick the one your tool reads first.

FileAudienceTools
AGENTS.mdUniversal coding-agent specCursor · Codex · Aider · Antigravity · Jules · Devin · Windsurf · Zed · Warp · opencode · Copilot
CLAUDE.mdClaude Code's auto-loaded memoryClaude Code
llms.txtLLM-readable summary (llmstxt.org format)Paste into ChatGPT, Claude, or Gemini to onboard the model
skills/gflow-cli/SKILL.mdClaude Code SkillSymlink into ~/.claude/skills/

Install the plugin (Claude Code)

One step, and you get the gflow-cli and video-production skills plus the MCP server:

/plugin marketplace add ffroliva/gflow-cli/plugin install gflow@gflow-cli

The plugin ships disabled. Claude Code starts a plugin's MCP servers automatically once a plugin is enabled, with no prompt of its own — and this server drives your own Google account, where Veo video generation bills your credits. So installing it starts nothing, and enabling it is a deliberate act. Images and composition are free; only video spends. For a hard guarantee, register the server yourself with gflow mcp run --no-spend, which never registers the credit-spending tools at all. See docs/MCP.md for the details, including which revision /plugin marketplace add gives you.

Codex users: codex plugin marketplace add . then codex plugin add gflow@gflow-cli.

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

text
gflow CLI  →  Provider (interchangeable)  →  Flow (ui_automation) / Mock (tests) / [planned: Official Veo]                                              ↓                                      Playwright Chromium (headed — login AND generation, by default)                                              ↓                              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).

Two Flow frontends: Google is moving accounts from labs.google onto flow.google.com (#639) — same product, different widget toolkit and wire protocol (batchexecute instead of aisandbox-pa). The migrated driver covers text-to-video, image-to-video from a local start frame, reference-to-video from local files, text-to-image, image-to-image from local files, and a single-segment video extend. Image generation supports Nano Banana 2.1 (nano2, #958) / 2 Lite / Pro, the five aspect ratios measured on that host (16:9, 4:3, 1:1, 3:4, 9:16), and counts 1–4; an existing project is required at the transport boundary. Images can tag a character by @Name, and reference-to-video takes a named character with --reference-entity + --reference-entity-name (#723). An account served the agent-only composer (#799) gets text-to-image and text-to-video only. An image --ref <uuid> is referenced in place when the catalog records it in the same --project (#995). Other UUID media references, an entity id without a name, instructions, Imagen 4, and the rest of the matrix keep the labs driver until ported (GFLOW_CLI_FLOW_HOST, see CONFIGURATION).

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, chain, extend, upscale) 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 Streamable HTTP) 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.

Support gflow-cli

gflow-cli is built and maintained by one person. Every release is verified against real Google Flow, which spends real AI credits, and breakages get fixed fast because people run it in their pipelines. Sponsorship pays for both.

[Sponsor $5 one-time] [Sponsor $5 a month]

Relying on gflow-cli at work? The monthly company tiers put your logo here, and Silver and above also get priority issues. All tiers and what each one gets: docs/SPONSORS.md.

Patched gflow-cli in your fork? Please open an issue or a pull request — a fix that lands upstream helps everyone.

Hall of fame

No sponsors yet. Be the first — every public sponsor is listed here.

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 and any plan-specific subscription terms) govern your generations. See the DISCLAIMER.

Acknowledgements


Stats

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

Star history

[Star history chart for ffroliva/gflow-cli]

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

來源:README.md,提交 f12193f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

25
  1. v0.95.0Nov 7, 2026
  2. v0.93.0Nov 6, 2026
  3. v0.92.1Oct 30, 2026
  4. v0.92.0Oct 29, 2026
  5. v0.90.0Oct 25, 2026
  6. v0.89.1Oct 24, 2026
  7. v0.89.0Oct 23, 2026
  8. v0.88.0Oct 22, 2026
  9. v0.87.0Oct 22, 2026
  10. v0.86.0Oct 18, 2026
  11. v0.85.0Oct 14, 2026
  12. v0.84.0Oct 12, 2026
  13. v0.83.2Oct 11, 2026
  14. v0.83.1Oct 8, 2026
  15. v0.83.0Oct 7, 2026
  16. v0.82.1Oct 2, 2026
  17. v0.82.0Oct 1, 2026
  18. v0.81.0Oct 1, 2026
  19. v0.80.0Sep 30, 2026
  20. v0.79.1Sep 22, 2026
  21. v0.79.0Sep 18, 2026
  22. v0.78.0Sep 18, 2026
  23. v0.77.1Sep 17, 2026
  24. v0.77.0Sep 16, 2026
  25. v0.76.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分