How ffroliva/gflow-cli works
gflow-cli exposes Google Flow automation through a terminal CLI and an MCP server. The principal workflow accepts a user request, dispatches generation or media operations through the Flow API client, and returns or stores resulting assets. Separate product branches cover images, characters, video extension/chaining/assembly, and local media tracking; MCP also offers asynchronous task handling. README capability claims guide coverage of unsampled domains, while source-index references and excerpts support the internal call edges shown. Several implementation details are unsampled, so those relationships are omitted.
Main entry points: client.py Flow API Client · tools.py MCP Tools · daemon.py Background Worker · server.py MCP Server
Components 23
User Interfaces
- CLI Commands
src/gflow_cli/cli.py - MCP Server
src/gflow_cli/mcp/server.py - MCP Tools
src/gflow_cli/mcp/tools.py - MCP Tasks
src/gflow_cli/mcp/tasks_extension.py
Flow Automation
- Authentication
src/gflow_cli/auth - Browser Session
src/gflow_cli/browser_manager.py - Flow API Client
src/gflow_cli/api/client.py - Flow Routes
src/gflow_cli/api/routes.py - Request Models
src/gflow_cli/api/dto.py
Media Workflows
- Video Generation
src/gflow_cli/api/video.py - Image Generation
src/gflow_cli/api/image.py - Character Tools
src/gflow_cli/api/character.py - Video Extension
src/gflow_cli/api/video_extend.py - Video Chains
src/gflow_cli/chain.py - Scene Assembly
src/gflow_cli/services/video_assembly.py
State and Operations
- Configuration
src/gflow_cli/config.py - Asset Storage
src/gflow_cli/storage.py - Media Catalog
src/gflow_cli/data/store.py - Data Repository
src/gflow_cli/data/repository.py - Background Worker
src/gflow_cli/worker/daemon.py - Task Queue
src/gflow_cli/worker/queue.py
Other components
- User or Agent
- Google Flow
Connections 24
- User or Agent → CLI Commands: invokes
README.md - User or Agent → MCP Server: connects
README.md - CLI Commands → Flow API Client: requests operations
- MCP Server → MCP Tools: registers tools
src/gflow_cli/mcp/server.py - MCP Tools → Flow API Client: calls API
src/gflow_cli/mcp/tools.py - MCP Server → MCP Tasks: registers tasks
src/gflow_cli/mcp/server.py - MCP Tasks → Task Queue: reads and cancels
src/gflow_cli/mcp/tasks_extension.py - Background Worker → Task Queue: processes jobs
src/gflow_cli/worker/daemon.py - Flow API Client → Browser Session: manages session
src/gflow_cli/api/client.py - Flow API Client → Authentication: loads cookies
src/gflow_cli/api/client.py - Flow API Client → Flow Routes: uses endpoints
src/gflow_cli/api/client.py - Flow API Client → Request Models: uses DTOs
- Flow API Client → Google Flow: sends requests
- MCP Tools → Video Generation: generates video
src/gflow_cli/mcp/tools.py - MCP Tools → Image Generation: generates images
src/gflow_cli/mcp/tools.py - MCP Tools → Character Tools: creates characters
src/gflow_cli/mcp/tools.py - Video Extension → Google Flow: extends clips
- Video Chains → Video Generation: links shots
README.md - Scene Assembly → Google Flow: stitches scenes
README.md - Background Worker → Flow API Client: runs generation
src/gflow_cli/worker/daemon.py - Background Worker → Data Repository: records operations
src/gflow_cli/worker/daemon.py - Data Repository → Media Catalog: uses store
src/gflow_cli/data/repository.py - Background Worker → Asset Storage: writes outputs
src/gflow_cli/worker/daemon.py - Flow API Client → Configuration: reads settings
src/gflow_cli/api/client.py