@leejungkiin/awkit 1.4.0 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/bin/awk.js +458 -7
  2. package/bin/claude-generators.js +122 -0
  3. package/core/AGENTS.md +16 -0
  4. package/core/CLAUDE.md +155 -0
  5. package/core/GEMINI.md +44 -9
  6. package/package.json +1 -1
  7. package/skills/ai-sprite-maker/SKILL.md +81 -0
  8. package/skills/ai-sprite-maker/scripts/animate_sprite.py +102 -0
  9. package/skills/ai-sprite-maker/scripts/process_sprites.py +140 -0
  10. package/skills/code-review/SKILL.md +21 -33
  11. package/skills/lucylab-tts/SKILL.md +64 -0
  12. package/skills/lucylab-tts/resources/voices_library.json +908 -0
  13. package/skills/lucylab-tts/scripts/.env +1 -0
  14. package/skills/lucylab-tts/scripts/lucylab_tts.py +506 -0
  15. package/skills/orchestrator/SKILL.md +5 -0
  16. package/skills/short-maker/SKILL.md +150 -0
  17. package/skills/short-maker/_backup/storyboard.html +106 -0
  18. package/skills/short-maker/_backup/video_mixer.py +296 -0
  19. package/skills/short-maker/outputs/fitbite-promo/background.jpg +0 -0
  20. package/skills/short-maker/outputs/fitbite-promo/final/promo-final.mp4 +0 -0
  21. package/skills/short-maker/outputs/fitbite-promo/script.md +19 -0
  22. package/skills/short-maker/outputs/fitbite-promo/segments/scene-01.mp4 +0 -0
  23. package/skills/short-maker/outputs/fitbite-promo/segments/scene-02.mp4 +0 -0
  24. package/skills/short-maker/outputs/fitbite-promo/segments/scene-03.mp4 +0 -0
  25. package/skills/short-maker/outputs/fitbite-promo/segments/scene-04.mp4 +0 -0
  26. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-01.png +0 -0
  27. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-02.png +0 -0
  28. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-03.png +0 -0
  29. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-04.png +0 -0
  30. package/skills/short-maker/outputs/fitbite-promo/storyboard.html +133 -0
  31. package/skills/short-maker/outputs/fitbite-promo/storyboard.json +38 -0
  32. package/skills/short-maker/outputs/fitbite-promo/temp/merged_chroma.mp4 +0 -0
  33. package/skills/short-maker/outputs/fitbite-promo/temp/merged_crossfaded.mp4 +0 -0
  34. package/skills/short-maker/outputs/fitbite-promo/temp/ready_00.mp4 +0 -0
  35. package/skills/short-maker/outputs/fitbite-promo/temp/ready_01.mp4 +0 -0
  36. package/skills/short-maker/outputs/fitbite-promo/temp/ready_02.mp4 +0 -0
  37. package/skills/short-maker/outputs/fitbite-promo/temp/ready_03.mp4 +0 -0
  38. package/skills/short-maker/outputs/fitbite-promo/tts/manifest.json +31 -0
  39. package/skills/short-maker/outputs/fitbite-promo/tts/scene-01.wav +0 -0
  40. package/skills/short-maker/outputs/fitbite-promo/tts/scene-02.wav +0 -0
  41. package/skills/short-maker/outputs/fitbite-promo/tts/scene-03.wav +0 -0
  42. package/skills/short-maker/outputs/fitbite-promo/tts/scene-04.wav +0 -0
  43. package/skills/short-maker/outputs/fitbite-promo/tts_script.txt +11 -0
  44. package/skills/short-maker/scripts/google-flow-cli/.project-identity +41 -0
  45. package/skills/short-maker/scripts/google-flow-cli/.trae/rules/project_rules.md +52 -0
  46. package/skills/short-maker/scripts/google-flow-cli/CODEBASE.md +67 -0
  47. package/skills/short-maker/scripts/google-flow-cli/GoogleFlowCli.code-workspace +29 -0
  48. package/skills/short-maker/scripts/google-flow-cli/README.md +168 -0
  49. package/skills/short-maker/scripts/google-flow-cli/docs/specs/PROJECT.md +12 -0
  50. package/skills/short-maker/scripts/google-flow-cli/docs/specs/REQUIREMENTS.md +22 -0
  51. package/skills/short-maker/scripts/google-flow-cli/docs/specs/ROADMAP.md +16 -0
  52. package/skills/short-maker/scripts/google-flow-cli/docs/specs/TECH-SPEC.md +13 -0
  53. package/skills/short-maker/scripts/google-flow-cli/gflow/__init__.py +3 -0
  54. package/skills/short-maker/scripts/google-flow-cli/gflow/api/__init__.py +19 -0
  55. package/skills/short-maker/scripts/google-flow-cli/gflow/api/client.py +1921 -0
  56. package/skills/short-maker/scripts/google-flow-cli/gflow/api/models.py +64 -0
  57. package/skills/short-maker/scripts/google-flow-cli/gflow/api/rpc_ids.py +98 -0
  58. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/__init__.py +15 -0
  59. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/browser_auth.py +692 -0
  60. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/humanizer.py +417 -0
  61. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/proxy_ext.py +120 -0
  62. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/recaptcha.py +482 -0
  63. package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/__init__.py +5 -0
  64. package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/client.py +414 -0
  65. package/skills/short-maker/scripts/google-flow-cli/gflow/cli/__init__.py +1 -0
  66. package/skills/short-maker/scripts/google-flow-cli/gflow/cli/main.py +1075 -0
  67. package/skills/short-maker/scripts/google-flow-cli/pyproject.toml +36 -0
  68. package/skills/short-maker/scripts/google-flow-cli/script.txt +22 -0
  69. package/skills/short-maker/scripts/google-flow-cli/tests/__init__.py +0 -0
  70. package/skills/short-maker/scripts/google-flow-cli/tests/test_batchexecute.py +113 -0
  71. package/skills/short-maker/scripts/google-flow-cli/tests/test_client.py +190 -0
  72. package/skills/short-maker/templates/aida_script.md +40 -0
  73. package/skills/short-maker/templates/mimic_analyzer.md +29 -0
  74. package/skills/single-flow-task-execution/SKILL.md +9 -6
  75. package/skills/skill-creator/SKILL.md +44 -0
  76. package/skills/spm-build-analysis/SKILL.md +92 -0
  77. package/skills/spm-build-analysis/references/build-optimization-sources.md +155 -0
  78. package/skills/spm-build-analysis/references/recommendation-format.md +85 -0
  79. package/skills/spm-build-analysis/references/spm-analysis-checks.md +105 -0
  80. package/skills/spm-build-analysis/scripts/check_spm_pins.py +118 -0
  81. package/skills/symphony-enforcer/SKILL.md +51 -83
  82. package/skills/symphony-orchestrator/SKILL.md +1 -1
  83. package/skills/trello-sync/SKILL.md +27 -28
  84. package/skills/verification-gate/SKILL.md +13 -2
  85. package/skills/xcode-build-benchmark/SKILL.md +88 -0
  86. package/skills/xcode-build-benchmark/references/benchmark-artifacts.md +94 -0
  87. package/skills/xcode-build-benchmark/references/benchmarking-workflow.md +67 -0
  88. package/skills/xcode-build-benchmark/schemas/build-benchmark.schema.json +230 -0
  89. package/skills/xcode-build-benchmark/scripts/benchmark_builds.py +308 -0
  90. package/skills/xcode-build-fixer/SKILL.md +218 -0
  91. package/skills/xcode-build-fixer/references/build-settings-best-practices.md +216 -0
  92. package/skills/xcode-build-fixer/references/fix-patterns.md +290 -0
  93. package/skills/xcode-build-fixer/references/recommendation-format.md +85 -0
  94. package/skills/xcode-build-fixer/scripts/benchmark_builds.py +308 -0
  95. package/skills/xcode-build-orchestrator/SKILL.md +156 -0
  96. package/skills/xcode-build-orchestrator/references/benchmark-artifacts.md +94 -0
  97. package/skills/xcode-build-orchestrator/references/build-settings-best-practices.md +216 -0
  98. package/skills/xcode-build-orchestrator/references/orchestration-report-template.md +143 -0
  99. package/skills/xcode-build-orchestrator/references/recommendation-format.md +85 -0
  100. package/skills/xcode-build-orchestrator/scripts/benchmark_builds.py +308 -0
  101. package/skills/xcode-build-orchestrator/scripts/diagnose_compilation.py +273 -0
  102. package/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py +533 -0
  103. package/skills/xcode-compilation-analyzer/SKILL.md +89 -0
  104. package/skills/xcode-compilation-analyzer/references/build-optimization-sources.md +155 -0
  105. package/skills/xcode-compilation-analyzer/references/code-compilation-checks.md +106 -0
  106. package/skills/xcode-compilation-analyzer/references/recommendation-format.md +85 -0
  107. package/skills/xcode-compilation-analyzer/scripts/diagnose_compilation.py +273 -0
  108. package/skills/xcode-project-analyzer/SKILL.md +76 -0
  109. package/skills/xcode-project-analyzer/references/build-optimization-sources.md +155 -0
  110. package/skills/xcode-project-analyzer/references/build-settings-best-practices.md +216 -0
  111. package/skills/xcode-project-analyzer/references/project-audit-checks.md +101 -0
  112. package/skills/xcode-project-analyzer/references/recommendation-format.md +85 -0
  113. package/templates/project-identity/android.json +0 -10
  114. package/templates/project-identity/backend-nestjs.json +0 -10
  115. package/templates/project-identity/expo.json +0 -10
  116. package/templates/project-identity/ios.json +0 -10
  117. package/templates/project-identity/web-nextjs.json +0 -10
  118. package/workflows/_uncategorized/ship-to-code.md +85 -0
  119. package/workflows/context/codebase-sync.md +10 -87
@@ -0,0 +1,11 @@
1
+ SCENE 1:
2
+ Tông giọng: 'Gặp khó khăn khi theo dõi dinh dưỡng hàng ngày?'
3
+
4
+ SCENE 2:
5
+ Tông giọng: 'FitBite Pro với AI thông minh sẽ tự động lên thực đơn chuẩn y khoa cho bạn.'
6
+
7
+ SCENE 3:
8
+ Tông giọng: 'Báo cáo chi tiết, giao diện tối ưu hoàn hảo cho cả iPad.'
9
+
10
+ SCENE 4:
11
+ Tông giọng: 'Tải ngay FitBite Pro trên App Store để thay đổi vóc dáng!'
@@ -0,0 +1,41 @@
1
+ {
2
+ "_comments": {
3
+ "projectId": "Auto-generated. DO NOT change — used by Symphony for task scoping.",
4
+ "trello": "Fill in your Trello board/list/card names. Run \"awkit trello info\" to verify."
5
+ },
6
+ "projectName": "GoogleFlowCli",
7
+ "projectId": "googleflowcli",
8
+ "projectType": "mobile-firebase",
9
+ "bundleIdentifier": "com.company.googleflowcli",
10
+ "primaryLanguage": "en",
11
+ "techStack": {
12
+ "platform": "Mobile",
13
+ "backend": "Firebase"
14
+ },
15
+ "services": {
16
+ "firebase": {
17
+ "enabled": true,
18
+ "features": [
19
+ "analytics",
20
+ "crashlytics",
21
+ "remote-config",
22
+ "auth"
23
+ ]
24
+ }
25
+ },
26
+ "trello": {
27
+ "board": "Your Board Name",
28
+ "list": "Your List Name",
29
+ "card": "Your Card Name"
30
+ },
31
+ "projectStage": "development",
32
+ "codingStandards": {
33
+ "language": "en",
34
+ "namingConvention": "camelCase",
35
+ "indentation": "spaces-4",
36
+ "lineLength": 120
37
+ },
38
+ "projectGoals": [],
39
+ "createdDate": "2026-03-29",
40
+ "lastUpdated": "2026-03-29"
41
+ }
@@ -0,0 +1,52 @@
1
+ # Project Rules (gflow)
2
+
3
+ ## Cost Model
4
+
5
+ - Image generation is free (0 credits).
6
+ - Video generation costs 20 credits per video.
7
+
8
+ ## Workflow Optimization (Credits)
9
+
10
+ - Default to images first: use image generation to validate prompts, style, character consistency, and scene composition.
11
+ - Only generate videos after explicit approval that the image storyboard is acceptable.
12
+ - When videos are required, minimize iterations:
13
+ - Keep prompts stable and only adjust one variable at a time.
14
+ - Prefer shorter runs (e.g., single segment) before multi-segment/extended workflows.
15
+ - Avoid unnecessary retries or batch runs unless requested.
16
+
17
+ ## Output Planning
18
+
19
+ - For scripts/storyboards: generate one image per scene first, then move to video generation.
20
+ - Always save outputs under `outputs/` with a predictable naming scheme (scene/seg numbering).
21
+
22
+ ## Voiceover (TTS)
23
+
24
+ - Videos generated by Flow may come without voice. Treat voice as a separate pipeline step.
25
+ - TTS is mandatory via LucyLab JSON-RPC only (use runtime config, avoid keeping local capture/log files in repo).
26
+ - Do not use local TTS (e.g., macOS `say`) in this project.
27
+
28
+ ## TTS Tooling
29
+
30
+ - **LucyLab batch TTS script**: `python lucylab_tts.py`
31
+ - Token handling:
32
+ - Use environment variable `LUCYLAB_BEARER` (do not store bearer tokens in repo files).
33
+ - Voice selection:
34
+ - Prefer explicit `--voice <id>[:name]` to avoid storing voice catalogs in repo.
35
+ - If a voice catalog is needed for AI selection, keep a compact library file with only `items[].{id,name,description,tag}`.
36
+ - Common usage:
37
+ - Plain text:
38
+ - `LUCYLAB_BEARER=... python lucylab_tts.py --out-dir outputs/tts-lucylab --voice <id>:<name> --text "..." `
39
+ - Script mode (extracts thoại from `SCENE ... '...')`:
40
+ - `LUCYLAB_BEARER=... python lucylab_tts.py --out-dir outputs/tts-lucylab --voice <id>:<name> --text-file script.txt`
41
+ - Build compact voice library from a captured log file:
42
+ - `python lucylab_tts.py --voice-json voice.json --export-voice-library voices_library.json`
43
+ - Build split voice library folder (load only one chunk/category into AI context):
44
+ - `python lucylab_tts.py --voice-json voice.json --export-voice-library outputs/voice_library`
45
+ - **Audio to video merge** (ffmpeg): add the generated voiceover track to the final merged video after transitions.
46
+ - Output naming convention:
47
+ - Video without VO: `outputs/.../script-full.mp4`
48
+ - Video with VO: `outputs/.../script-full-vo.mp4`
49
+
50
+ ## Safety
51
+
52
+ - Never commit or share bearer tokens (e.g., from `tts_curl.txt`). Use `LUCYLAB_BEARER` and keep local-only artifacts under `outputs/`.
@@ -0,0 +1,67 @@
1
+ # GoogleFlowCli — Codebase Map
2
+
3
+ > **Project Type:** mobile-firebase | **Tech Stack:** Mobile + Firebase
4
+ > **Last Synced:** 2026-03-29
5
+
6
+ > [!NOTE]
7
+ > AI PHẢI đọc file này TRƯỚC KHI dùng `grep_search` / `codebase_search` / `list_dir`.
8
+ > Đọc → xác định target → search cụ thể. KHÔNG search "mù".
9
+
10
+ ---
11
+
12
+ ## 🗺️ Directory Structure
13
+
14
+ ```
15
+ src/
16
+ ├── features/
17
+ ├── services/
18
+ └── models/
19
+ ```
20
+
21
+ ---
22
+
23
+ ## 📁 File Index
24
+
25
+ > Compact format: `path` → purpose (1 line mỗi file)
26
+
27
+ ### Core / Infrastructure
28
+
29
+ | Path | Purpose |
30
+ |------|---------|
31
+ | `{{CORE_FILE_1}}` | {{PURPOSE_1}} |
32
+ | `{{CORE_FILE_2}}` | {{PURPOSE_2}} |
33
+
34
+ ### Features
35
+
36
+ | Path | Purpose |
37
+ |------|---------|
38
+ | `{{FEATURE_FILE_1}}` | {{PURPOSE_1}} |
39
+ | `{{FEATURE_FILE_2}}` | {{PURPOSE_2}} |
40
+
41
+ ### UI / Views
42
+
43
+ | Path | Purpose |
44
+ |------|---------|
45
+ | `{{VIEW_FILE_1}}` | {{PURPOSE_1}} |
46
+ | `{{VIEW_FILE_2}}` | {{PURPOSE_2}} |
47
+
48
+ > ⚠️ Thêm file mới vào section phù hợp. Dùng `/codebase-sync` để auto-update.
49
+
50
+ ---
51
+
52
+ ## 🔑 Key Files
53
+
54
+ | File | Purpose |
55
+ |------|---------|
56
+ | `.project-identity` | AI project context |
57
+ | `CODEBASE.md` | This file — codebase map for AI |
58
+
59
+ ---
60
+
61
+ ## 📝 Notes
62
+
63
+ _Architecture decisions, gotchas, và context quan trọng._
64
+
65
+ ---
66
+
67
+ *Auto-generated by `awkit init` — keep updated with `/codebase-sync`*
@@ -0,0 +1,29 @@
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {
8
+ "editor.formatOnSave": true,
9
+ "editor.tabSize": 4,
10
+ "files.exclude": {
11
+ "**/.DS_Store": true,
12
+ "**/node_modules": true,
13
+ "**/.git": true,
14
+ "**/build": false,
15
+ "**/.gradle": false,
16
+ "**/DerivedData": false
17
+ },
18
+ "files.watcherExclude": {
19
+ "**/node_modules/**": true,
20
+ "**/build/**": true,
21
+ "**/DerivedData/**": true
22
+ }
23
+ },
24
+ "extensions": {
25
+ "recommendations": [
26
+ "github.copilot"
27
+ ]
28
+ }
29
+ }
@@ -0,0 +1,168 @@
1
+ # gflow — CLI for Google Flow
2
+
3
+ A command-line interface to [Google Flow](https://flow.google) (AI image & video generation), built using the same reverse-engineering approach as [tmc/nlm](https://github.com/tmc/nlm) for NotebookLM.
4
+
5
+ Lets AI agents and scripts generate images/videos via Google Flow without the GUI.
6
+
7
+ ## Architecture
8
+
9
+ ```
10
+ ┌────────────────────────────────────┐
11
+ │ CLI Layer (click) │ gflow/cli/main.py
12
+ │ generate-image, generate-video, │
13
+ │ list, download, collections, raw │
14
+ ├────────────────────────────────────┤
15
+ │ API Client (FlowClient) │ gflow/api/client.py
16
+ │ High-level ops, polling, parsing │
17
+ ├────────────────────────────────────┤
18
+ │ BatchExecute Protocol │ gflow/batchexecute/client.py
19
+ │ RPC encoding, SAPISIDHASH, │
20
+ │ chunked response decoding │
21
+ ├────────────────────────────────────┤
22
+ │ Browser Auth │ gflow/auth/browser_auth.py
23
+ │ Cookie extraction from Chrome, │
24
+ │ Selenium interactive login │
25
+ └────────────────────────────────────┘
26
+ ```
27
+
28
+ This is the same layered architecture as `tmc/nlm`:
29
+ - **Auth** extracts Google cookies from your browser (browser_cookie3 or Selenium)
30
+ - **BatchExecute** encodes RPCs into Google's wire format and decodes responses
31
+ - **API Client** wraps BatchExecute with typed methods for each Flow feature
32
+ - **CLI** exposes everything as clean subcommands
33
+
34
+ ## Install
35
+
36
+ ```bash
37
+ pip install -e .
38
+ ```
39
+
40
+ Or with optional Selenium support for interactive login:
41
+ ```bash
42
+ pip install -e ".[dev]"
43
+ pip install selenium
44
+ ```
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ # 1. Authenticate (extracts cookies from your Chrome browser)
50
+ gflow auth
51
+
52
+ # 2. Generate an image
53
+ gflow generate-image "a cat astronaut floating in space"
54
+
55
+ # 3. Generate a video
56
+ gflow generate-video "a timelapse of a flower blooming"
57
+
58
+ # 4. List your assets
59
+ gflow list
60
+
61
+ # 5. Download an asset
62
+ gflow download <asset-id> -o output.png
63
+ ```
64
+
65
+ ## Setup: Discovering RPC IDs
66
+
67
+ Google Flow uses the same BatchExecute protocol as NotebookLM, but with different RPC endpoint IDs. You need to discover these by inspecting network traffic:
68
+
69
+ 1. Open [flow.google](https://flow.google) in Chrome
70
+ 2. Open DevTools → Network tab
71
+ 3. Filter requests by `batchexecute`
72
+ 4. Perform an action (e.g., generate an image)
73
+ 5. In the request payload, find the `rpcids` parameter — that's the RPC ID
74
+ 6. Update `gflow/api/rpc_ids.py` with the real ID
75
+
76
+ Check which IDs are configured:
77
+ ```bash
78
+ gflow rpc-ids
79
+ ```
80
+
81
+ Use raw mode to test discovered IDs:
82
+ ```bash
83
+ gflow raw "xYz123" --args '["my prompt", "16:9"]'
84
+ ```
85
+
86
+ ## Commands
87
+
88
+ | Command | Description |
89
+ |---------|-------------|
90
+ | `gflow auth` | Authenticate with Google Flow |
91
+ | `gflow auth --status` | Check auth status |
92
+ | `gflow auth --clear` | Clear saved credentials |
93
+ | `gflow generate-image PROMPT` | Generate images (Imagen 4) |
94
+ | `gflow generate-video PROMPT` | Generate videos (Veo 3.1) |
95
+ | `gflow list` | List assets in your library |
96
+ | `gflow get ASSET_ID` | Get asset details |
97
+ | `gflow download ASSET_ID` | Download an asset |
98
+ | `gflow delete ASSET_ID` | Delete an asset |
99
+ | `gflow collections list` | List collections |
100
+ | `gflow collections create NAME` | Create a collection |
101
+ | `gflow collections add COL_ID ASSET_ID` | Add asset to collection |
102
+ | `gflow raw RPC_ID` | Execute raw RPC (discovery mode) |
103
+ | `gflow rpc-ids` | Show configured RPC IDs |
104
+
105
+ All commands support `--json` for machine-readable output (ideal for scripts/agents).
106
+
107
+ ## Environment Variables
108
+
109
+ | Variable | Description |
110
+ |----------|-------------|
111
+ | `GFLOW_AUTH_TOKEN` | Auth token (overrides saved credentials) |
112
+ | `GFLOW_COOKIES` | Cookie string (overrides saved credentials) |
113
+ | `GFLOW_CHROME_PATH` | Path to Chrome executable |
114
+ | `GFLOW_DEBUG` | Set to `true` for debug output |
115
+
116
+ ## For AI Agents / Scripts
117
+
118
+ Every command supports `--json` output:
119
+
120
+ ```bash
121
+ # Generate and get JSON response
122
+ gflow generate-image "a logo" --json | jq '.[0].url'
123
+
124
+ # List assets as JSON for processing
125
+ gflow list --type image --json | jq '.[].id'
126
+
127
+ # Pipeline: generate, wait, download
128
+ ASSET_ID=$(gflow generate-video "ocean waves" --json | jq -r '.[0].id')
129
+ gflow download "$ASSET_ID" -o waves.mp4
130
+ ```
131
+
132
+ ## How It Works (Same as tmc/nlm)
133
+
134
+ 1. **Browser Auth**: Extracts Google cookies from Chrome/Brave/Edge profiles using `browser_cookie3`, then fetches the XSRF token from the Flow page HTML
135
+ 2. **BatchExecute Protocol**: Encodes RPC calls into Google's `batchexecute` wire format — form-encoded POST with nested JSON arrays, SAPISIDHASH authorization header
136
+ 3. **Response Decoding**: Parses Google's chunked response format (byte-count prefixed JSON chunks with `wrb.fr` markers and multi-layer JSON encoding)
137
+ 4. **Retry Logic**: Exponential backoff for transient errors (429, 500, 502, 503, 504)
138
+
139
+ ## Project Structure
140
+
141
+ ```
142
+ gflow-py/
143
+ ├── pyproject.toml # Package config & dependencies
144
+ ├── README.md
145
+ ├── gflow/
146
+ │ ├── __init__.py
147
+ │ ├── auth/
148
+ │ │ ├── __init__.py
149
+ │ │ └── browser_auth.py # Cookie extraction & Selenium login
150
+ │ ├── batchexecute/
151
+ │ │ ├── __init__.py
152
+ │ │ └── client.py # Google BatchExecute protocol
153
+ │ ├── api/
154
+ │ │ ├── __init__.py
155
+ │ │ ├── client.py # FlowClient (high-level API)
156
+ │ │ ├── models.py # Pydantic models (Asset, Collection, etc.)
157
+ │ │ └── rpc_ids.py # RPC endpoint IDs (fill these in!)
158
+ │ └── cli/
159
+ │ ├── __init__.py
160
+ │ └── main.py # Click CLI commands
161
+ └── tests/
162
+ ├── __init__.py
163
+ └── test_batchexecute.py # Unit tests
164
+ ```
165
+
166
+ ## License
167
+
168
+ MIT
@@ -0,0 +1,12 @@
1
+ # Project Vision: GoogleFlowCli
2
+
3
+ GoogleFlowCli (gflow) is a streamlined CLI-based workflow and pipeline for generating AI videos systematically, optimizing for cost (credits) and consistency.
4
+
5
+ ## Target Audience
6
+ Video creators, AI filmmakers, and developers needing a structured bulk generation framework with separate audio pipelines.
7
+
8
+ ## Success Metrics
9
+ - Stable, consistent video outputs based on predictable image storyboards.
10
+ - High cost efficiency by validating free image scenes before running 20-credit video generations.
11
+ - Automated, seamless merging of generated high-quality voiceovers using the LucyLab pipeline.
12
+ - Secure token handling and artifact management.
@@ -0,0 +1,22 @@
1
+ # Requirements
2
+
3
+ ## 1. Image-First Storyboarding
4
+ - Generates zero-cost images for each scene/segment before generating videos.
5
+ - Used to validate prompts, style, character consistency, and scene composition.
6
+
7
+ ## 2. Video Generation Workflow
8
+ - Creates videos strictly upon explicit approval of the image storyboard.
9
+ - Short iteration loops (single segments) favored to avoid batch errors.
10
+
11
+ ## 3. Voiceover (TTS) Pipeline
12
+ - Mandatory use of `lucylab_tts.py` for TTS generation (JSON-RPC).
13
+ - Local macOS TTS (`say`) is strictly forbidden.
14
+ - Requires `LUCYLAB_BEARER` environment variable for token safety.
15
+
16
+ ## 4. A/V Composition
17
+ - Post-process merging of generated video and audio using `ffmpeg`.
18
+ - Standardized output naming convention: `outputs/.../script-full-vo.mp4`.
19
+
20
+ ## 5. Artifact Management
21
+ - Outputs generated sequentially under `outputs/` folder.
22
+ - Voice library caching strictly regulated to `voices_library.json`.
@@ -0,0 +1,16 @@
1
+ # Roadmap
2
+
3
+ ## Phase 1: Environment & Tooling Verification
4
+ - [ ] Initialize project specifications and Antigravity tracking (Symphony, Brain).
5
+ - [ ] Verify local Python dependencies and `lucylab_tts.py` tool access.
6
+ - [ ] Verify FFmpeg installation and access.
7
+
8
+ ## Phase 2: TTS & Pipeline Groundwork
9
+ - [ ] Establish environment variables integration (`LUCYLAB_BEARER`).
10
+ - [ ] Test compact JSON voice library retrieval.
11
+ - [ ] Test standalone script rendering (`script.txt` -> `outputs/tts-lucylab`).
12
+
13
+ ## Phase 3: Visual & Final Compositing Generation
14
+ - [ ] Image storyboard extraction and generation workflow.
15
+ - [ ] Video segment generation loop.
16
+ - [ ] Master A/V compositing via FFmpeg.
@@ -0,0 +1,13 @@
1
+ # Technical Specifications
2
+
3
+ ## Architecture Decisions
4
+ - **AD-1: Cost Model Gatekeeping**
5
+ - Image validation step must pre-empt any video API call. Video generation takes place only upon explicit approval.
6
+ - **AD-2: Strict Output Segregation**
7
+ - Scripts and generated artifacts reside purely within `outputs/`.
8
+ - **AD-3: Modular Voice Library**
9
+ - Use compact `voices_library.json` catalog containing only `{id,name,description,tag}` for context efficiency.
10
+
11
+ ## Constraints & Security
12
+ - **Config & Tokens**: Bearer tokens are strictly ENV-based (`LUCYLAB_BEARER`). No static token commits or log files exposing tokens in the repo.
13
+ - **Tooling Platform**: Python for automation scripts (`lucylab_tts.py`); `ffmpeg` required as system dependency for A/V composition.
@@ -0,0 +1,3 @@
1
+ """gflow - A command-line interface to Google Flow (AI image & video generation)."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,19 @@
1
+ """Google Flow API client."""
2
+
3
+ from .client import FlowClient, FlowAPIError, FlowRecaptchaError
4
+ from .models import (
5
+ Asset,
6
+ AssetType,
7
+ GenerateImageRequest,
8
+ GenerateVideoRequest,
9
+ )
10
+
11
+ __all__ = [
12
+ "FlowClient",
13
+ "FlowAPIError",
14
+ "FlowRecaptchaError",
15
+ "Asset",
16
+ "AssetType",
17
+ "GenerateImageRequest",
18
+ "GenerateVideoRequest",
19
+ ]