fluttership 1.0.0__tar.gz

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 (32) hide show
  1. fluttership-1.0.0/LICENSE +21 -0
  2. fluttership-1.0.0/PKG-INFO +395 -0
  3. fluttership-1.0.0/README.md +356 -0
  4. fluttership-1.0.0/fluttership/__init__.py +7 -0
  5. fluttership-1.0.0/fluttership/agent/__init__.py +0 -0
  6. fluttership-1.0.0/fluttership/agent/agent.py +1809 -0
  7. fluttership-1.0.0/fluttership/agent/commands.py +113 -0
  8. fluttership-1.0.0/fluttership/agent/config.py +314 -0
  9. fluttership-1.0.0/fluttership/agent/graph.py +334 -0
  10. fluttership-1.0.0/fluttership/agent/interrupt.py +130 -0
  11. fluttership-1.0.0/fluttership/agent/llm_provider.py +455 -0
  12. fluttership-1.0.0/fluttership/agent/tools/__init__.py +0 -0
  13. fluttership-1.0.0/fluttership/agent/tools/builder.py +1160 -0
  14. fluttership-1.0.0/fluttership/agent/tools/doctor.py +153 -0
  15. fluttership-1.0.0/fluttership/agent/tools/ios_checker.py +255 -0
  16. fluttership-1.0.0/fluttership/agent/tools/reader.py +320 -0
  17. fluttership-1.0.0/fluttership/agent/tools/runner.py +185 -0
  18. fluttership-1.0.0/fluttership/agent/tools/submitter.py +562 -0
  19. fluttership-1.0.0/fluttership/agent/tools/validator.py +320 -0
  20. fluttership-1.0.0/fluttership/agent/tools/vault.py +667 -0
  21. fluttership-1.0.0/fluttership/agent/tools/worktree.py +125 -0
  22. fluttership-1.0.0/fluttership/agent/ui.py +347 -0
  23. fluttership-1.0.0/fluttership/cli/__init__.py +0 -0
  24. fluttership-1.0.0/fluttership/cli/main.py +365 -0
  25. fluttership-1.0.0/fluttership.egg-info/PKG-INFO +395 -0
  26. fluttership-1.0.0/fluttership.egg-info/SOURCES.txt +30 -0
  27. fluttership-1.0.0/fluttership.egg-info/dependency_links.txt +1 -0
  28. fluttership-1.0.0/fluttership.egg-info/entry_points.txt +2 -0
  29. fluttership-1.0.0/fluttership.egg-info/requires.txt +13 -0
  30. fluttership-1.0.0/fluttership.egg-info/top_level.txt +1 -0
  31. fluttership-1.0.0/pyproject.toml +62 -0
  32. fluttership-1.0.0/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Abu Sayed Chowdhury
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,395 @@
1
+ Metadata-Version: 2.4
2
+ Name: fluttership
3
+ Version: 1.0.0
4
+ Summary: AI agent that builds, signs, and ships Flutter apps — APK/AAB/IPA — from the terminal
5
+ Author: Abu Sayed Chowdhury
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/AscEmon/fluttership
8
+ Project-URL: Repository, https://github.com/AscEmon/fluttership
9
+ Project-URL: Issues, https://github.com/AscEmon/fluttership/issues
10
+ Keywords: flutter,release,ci,cd,appstore,playstore,testflight,ai-agent,automation
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: anthropic
26
+ Requires-Dist: google-genai
27
+ Requires-Dist: langchain-google-genai
28
+ Requires-Dist: langgraph
29
+ Requires-Dist: pyyaml
30
+ Requires-Dist: python-dotenv
31
+ Requires-Dist: cryptography
32
+ Requires-Dist: httpx
33
+ Requires-Dist: pydantic
34
+ Requires-Dist: questionary>=2.0.1
35
+ Requires-Dist: rich>=13.7.0
36
+ Requires-Dist: google-api-python-client>=2.149.0
37
+ Requires-Dist: google-auth>=2.35.0
38
+ Dynamic: license-file
39
+
40
+ # 🚀 FlutterShip
41
+
42
+ > An AI agent that builds, signs, and ships your Flutter app — APK, App Bundle, and IPA — from one terminal. Talk to it in plain English.
43
+
44
+ ```
45
+ fluttership "build apk aab ipa for DEV and LIVE"
46
+ ```
47
+
48
+ One command. Parallel builds. No forgotten version bumps, no wrong keystore passwords, no babysitting.
49
+
50
+ ---
51
+
52
+ ## Table of contents
53
+
54
+ - [What is FlutterShip?](#what-is-fluttership)
55
+ - [Quick start (free — uses a Gemini API key)](#quick-start)
56
+ - [How you actually use it](#how-you-actually-use-it)
57
+ - [Command reference](#command-reference)
58
+ - [⚡ Parallel builds](#-parallel-builds)
59
+ - [🔐 The secure vault](#-the-secure-vault)
60
+ - [📦 Publishing to the stores (what you need to download)](#-publishing-to-the-stores)
61
+ - [👤 Solo vs 👥 Team mode](#solo-vs-team-mode)
62
+ - [Requirements](#requirements)
63
+ - [Security model](#security-model)
64
+ - [License](#license)
65
+
66
+ ---
67
+
68
+ ## What is FlutterShip?
69
+
70
+ FlutterShip is a Python CLI with an AI agent at its core. You point it at your Flutter
71
+ project and tell it what you want — *"build a LIVE apk"*, *"release 2.0.0 to TestFlight"* —
72
+ and it does the rest:
73
+
74
+ - **Reads your project automatically** — version, flavors, `dart-define` keys, bundle id, signing config. No config file to write.
75
+ - **Detects your build pattern** — flavors, `--dart-define`, `--dart-define-from-file`, or plain. It figures out the right `flutter build` command for you.
76
+ - **Builds in parallel** — APK + AAB + IPA across multiple flavors at once, each in an isolated sandbox.
77
+ - **Signs and submits** — uploads AAB to Google Play and IPA to TestFlight/App Store, with credentials kept in an encrypted vault the AI never sees.
78
+ - **Explains failures in plain English** — when a build breaks, it reads the log and tells you exactly what to fix.
79
+ - **Keeps a release history** — every build and upload is logged outside your repo.
80
+
81
+ You can drive it conversationally (the agent decides which tools to run) or with plain
82
+ subcommands (`fluttership doctor`, `fluttership status`, …).
83
+
84
+ ---
85
+
86
+ ## Quick start
87
+
88
+ FlutterShip needs an **LLM API key** to power the agent. The easiest free option is
89
+ **Google Gemini** — the free tier is plenty for normal use.
90
+
91
+ ### 1. Get a free Gemini API key
92
+
93
+ 1. Go to **[aistudio.google.com](https://aistudio.google.com)** and sign in.
94
+ 2. Click **Get API key** → **Create API key**.
95
+ 3. Copy the key (looks like `[YOUR_GEMINI_API_KEY]`).
96
+
97
+ > Prefer Claude or GPT? FlutterShip also supports `anthropic` (console.anthropic.com)
98
+ > and `openai` (platform.openai.com). Pick your provider during setup.
99
+
100
+ ### 2. Install FlutterShip
101
+
102
+ ```bash
103
+ pip install fluttership
104
+ ```
105
+
106
+ That's it — the `fluttership` command is now on your `PATH`.
107
+
108
+ <details>
109
+ <summary>Install from source (for development)</summary>
110
+
111
+ ```bash
112
+ git clone https://github.com/AscEmon/fluttership.git
113
+ cd fluttership
114
+
115
+ python3 -m venv .venv
116
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
117
+
118
+ pip install -e .
119
+ ```
120
+ </details>
121
+
122
+ ### 3. First run — the setup wizard
123
+
124
+ From inside **any Flutter project**, run:
125
+
126
+ ```bash
127
+ cd /path/to/your/flutter/app
128
+ fluttership
129
+ ```
130
+
131
+ On first run a ~30-second wizard walks you through:
132
+
133
+ - **Mode** — solo (just you) or team (a lead shares credentials).
134
+ - **AI provider + model** — pick `gemini` and the default model.
135
+ - **Your API key** — paste it and FlutterShip saves it to `~/.fluttership/.env` (permissions `600`), or set it yourself (see below).
136
+
137
+ After that, you're talking to the agent. That's it.
138
+
139
+ ### Setting the API key manually (optional)
140
+
141
+ Instead of pasting it into the wizard, you can put it in a `.env` file in your project
142
+ root, or in `~/.fluttership/.env`:
143
+
144
+ ```env
145
+ # Pick one, matching your chosen provider
146
+ GEMINI_API_KEY=[YOUR_GEMINI_API_KEY]
147
+ # ANTHROPIC_API_KEY=[YOUR_ANTHROPIC_API_KEY]
148
+ # OPENAI_API_KEY=[YOUR_OPENAI_API_KEY]
149
+
150
+ # Optional — override provider/model without re-running the wizard
151
+ # LLM_PROVIDER=gemini
152
+ # GEMINI_MODEL=gemini-2.5-flash
153
+ ```
154
+
155
+ > Project `.env` wins; `~/.fluttership/.env` fills the gaps. Both are git-ignored.
156
+
157
+ Verify everything is wired up:
158
+
159
+ ```bash
160
+ fluttership doctor
161
+ ```
162
+
163
+ ---
164
+
165
+ ## How you actually use it
166
+
167
+ There are two ways to drive FlutterShip — mix them however you like.
168
+
169
+ ### A) Talk to the agent (natural language)
170
+
171
+ Just run `fluttership` and type what you want. Or pass it inline:
172
+
173
+ ```bash
174
+ fluttership "build LIVE apk"
175
+ fluttership "build apk aab ipa for DEV and LIVE" # parallel matrix
176
+ fluttership "release version 2.0.0 to production"
177
+ fluttership "what was the last release?"
178
+ ```
179
+
180
+ The agent reads your project, shows a short build plan, asks for confirmation, builds,
181
+ and offers the right next step (e.g. *"Submit to TestFlight?"* only after an IPA is built).
182
+
183
+ Inside an interactive session, type **`/`** to open the command palette
184
+ (`/status`, `/doctor`, `/vault`, `/mode`, `/new`, `/exit`, …). Press **Esc** to
185
+ interrupt the agent mid-thought and redirect it.
186
+
187
+ ### B) Plain subcommands (no LLM involved)
188
+
189
+ ```bash
190
+ fluttership status # version, bundle id, detected build pattern
191
+ fluttership doctor # health checks — tools, signing, vault, API key
192
+ fluttership history # build & release history for this project
193
+ fluttership clean # delete build artifacts (fluttership-dist/)
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Command reference
199
+
200
+ | Command | What it does |
201
+ |---|---|
202
+ | `fluttership` | Start the interactive AI agent |
203
+ | `fluttership "<request>"` | Run a one-off request, e.g. `"build LIVE apk"` |
204
+ | `fluttership setup` | Re-run the setup wizard (mode / provider / model) |
205
+ | `fluttership mode` | Show or switch solo/team mode |
206
+ | `fluttership mode solo` | Switch to solo mode |
207
+ | `fluttership mode team lead\|member` | Switch to team mode with a role |
208
+ | `fluttership config` | Show current configuration |
209
+ | `fluttership doctor` | Environment + project health checks |
210
+ | `fluttership status` | Project info — version, bundle id, build pattern |
211
+ | `fluttership history` | Build & release history |
212
+ | `fluttership clean` | Delete build artifacts (`fluttership-dist/`) |
213
+ | `fluttership vault setup` | Create the encrypted credentials vault (team: lead only) |
214
+ | `fluttership vault verify` | Test the vault password + show what's configured |
215
+ | `fluttership vault status` | Vault info (no password needed) |
216
+ | `fluttership vault log` | Credential-access audit log |
217
+ | `fluttership vault export [dest]` | Share the encrypted vault with your team (lead only) |
218
+ | `fluttership vault import <file>` | Install a vault shared by your team lead |
219
+ | `fluttership help` | Full usage |
220
+
221
+ **Slash commands** (inside an interactive session): `/status`, `/history`, `/doctor`,
222
+ `/clean`, `/mode`, `/config`, `/vault`, `/setup`, `/new`, `/exit`.
223
+
224
+ ---
225
+
226
+ ## ⚡ Parallel builds
227
+
228
+ FlutterShip's headline feature. Ask for several targets and/or flavors at once and it
229
+ builds them **concurrently**, each job in its own isolated git worktree sandbox:
230
+
231
+ ```bash
232
+ fluttership "build apk aab ipa for DEV and LIVE"
233
+ ```
234
+
235
+ A live dashboard shows every job's status as it runs:
236
+
237
+ ```
238
+ ⚡ Building 6 jobs · v2.0.0+9
239
+ ┌──────────────┬──────────────┬────────┬──────────────────────────────┐
240
+ │ Job │ Status │ Time │ Detail │
241
+ ├──────────────┼──────────────┼────────┼──────────────────────────────┤
242
+ │ apk·DEV │ ✅ done │ 1m42s │ myapp_DEV_2.0.0(9).apk │
243
+ │ apk·LIVE │ ✅ done │ 1m48s │ myapp_LIVE_2.0.0(9).apk │
244
+ │ aab·LIVE │ 🔨 building │ 0m55s │ logs/aab-LIVE.log │
245
+ │ ipa·LIVE │ 🍎 archiving │ 2m10s │ logs/ipa-LIVE.log │
246
+ └──────────────┴──────────────┴────────┴──────────────────────────────┘
247
+ ```
248
+
249
+ **Why it's worth it:**
250
+
251
+ - **Faster releases** — wall-clock time is your *slowest* build, not the sum of all of them.
252
+ - **No collisions** — each job runs in a fresh, isolated worktree, so Gradle's project lock and the shared `build/` directory never clash. iOS archives are automatically serialized (Xcode's global state can't take two `Runner` archives at once), while Android builds stay fully parallel.
253
+ - **One shared version** — every artifact in a run carries the same version+build number, so a matrix release is consistent.
254
+ - **Artifacts collected safely** — finished builds land in `fluttership-dist/` (outside `build/`), so `flutter clean` can't wipe what you just built. Per-job logs go to `build/fluttership-logs/`.
255
+ - **Different flavors per platform** — *"LIVE and DEV apk, plus LIVE ipa only"* builds exactly those pairs, no wasted builds.
256
+
257
+ Run `fluttership clean` to reclaim space from `fluttership-dist/` when you're done
258
+ (your release history, kept in `~/.fluttership`, is never touched).
259
+
260
+ ---
261
+
262
+ ## 🔐 The secure vault
263
+
264
+ Store credentials (App Store `.p8` key, Play Store service-account JSON, IDs) are
265
+ sensitive. FlutterShip keeps them in an **encrypted vault** — never in your repo, never
266
+ in plain text, and **never shown to the AI model**.
267
+
268
+ **How it's protected:**
269
+
270
+ - **AES-256-GCM** encryption with **PBKDF2** key derivation (200,000 iterations).
271
+ - Lives in `~/.fluttership/vault.enc` (`chmod 600`) — outside your project.
272
+ - Files are base64-encoded *before* encryption — not human-readable.
273
+ - Decrypted **in memory only**; temp files written to `/tmp` (`chmod 600`) are deleted immediately after each upload.
274
+ - The LLM only ever sees **success/fail status** — never a key, password, or token.
275
+ - Every access is written to an **audit log** (`fluttership vault log`).
276
+
277
+ **Set it up once:**
278
+
279
+ ```bash
280
+ fluttership vault setup
281
+ ```
282
+
283
+ It asks for your Play Store service-account JSON, App Store `.p8` key, and the matching
284
+ IDs (see the next section for how to get those), then asks you to set a vault password.
285
+
286
+ ```bash
287
+ fluttership vault verify # test your password + see what's configured
288
+ fluttership vault status # info only — no password needed
289
+ ```
290
+
291
+ > Choose a strong vault password and store it in a password manager. If you share the
292
+ > vault with a team, **never** send the password over chat or email — use a shared
293
+ > password-manager item.
294
+
295
+ ---
296
+
297
+ ## 📦 Publishing to the stores
298
+
299
+ To upload builds, FlutterShip needs store credentials in the vault. Here's exactly what
300
+ to download and where to get each piece. Run `fluttership vault setup` and have these
301
+ ready.
302
+
303
+ ### 🍎 App Store / TestFlight (iOS — IPA)
304
+
305
+ You need an **App Store Connect API key**. Three pieces:
306
+
307
+ | What | Where to get it |
308
+ |---|---|
309
+ | **`.p8` key file** | App Store Connect → **Users & Access** → **Integrations / Keys** → **(+)** generate a key with *App Manager* access. **Download the `.p8` — it can only be downloaded once.** |
310
+ | **Key ID** | Shown next to the key you created (e.g. `[YOUR_KEY_ID]`). |
311
+ | **Issuer ID** | At the top of the **Keys** page (e.g. `[YOUR_ISSUER_ID]`). |
312
+ | **Bundle ID** | Your app's bundle identifier, must match your Xcode project. |
313
+
314
+ > The app must already exist in App Store Connect (**My Apps → (+) New App**) with a
315
+ > matching bundle ID before the first upload. Uploads go to TestFlight via `xcrun altool`,
316
+ > so iOS publishing requires **macOS + Xcode**.
317
+
318
+ ### 🤖 Google Play (Android — AAB)
319
+
320
+ You need a **service-account JSON** with Play Developer API access:
321
+
322
+ | What | Where to get it |
323
+ |---|---|
324
+ | **Service account JSON** | Google Play Console → **Setup → API access** → create/link a service account in Google Cloud Console, grant it release permissions, then **download its JSON key**. |
325
+ | **Package name** | Your app's `applicationId` (e.g. `com.example.myapp`). |
326
+
327
+ > Play uploads default to the **`internal`** track (safest). Change it with
328
+ > `fluttership config` or by telling the agent *"release to production"*.
329
+ > The Play Store rejects duplicate version codes, so FlutterShip prompts you to confirm
330
+ > the version + build number for every store-bound build.
331
+
332
+ ### Then just ask
333
+
334
+ ```bash
335
+ fluttership "release 2.0.0 to TestFlight and Play Store"
336
+ ```
337
+
338
+ FlutterShip unlocks the vault (you enter the vault password), uploads, and records it as
339
+ a **release** in your history. A build that was only compiled — never uploaded — stays a
340
+ "build", not a "release".
341
+
342
+ ---
343
+
344
+ ## Solo vs Team mode
345
+
346
+ **Solo** — everything lives on your machine. You own the vault and the releases.
347
+
348
+ **Team** — a shared-vault workflow:
349
+
350
+ - The **lead** runs `vault setup` once, then `vault export` to produce the encrypted
351
+ `fluttership-vault.enc` file and hands it to members.
352
+ - **Members** run `vault import <file>` and can build + submit, but never manage or
353
+ re-export credentials.
354
+ - The vault **file** is safe to share (it's AES-256-GCM encrypted and useless without the
355
+ password). Share the **password** only through a team password manager.
356
+
357
+ ```bash
358
+ fluttership mode team lead # you manage credentials
359
+ fluttership mode team member # you import the lead's vault
360
+ ```
361
+
362
+ ---
363
+
364
+ ## Requirements
365
+
366
+ - **Python 3.9+**
367
+ - **Flutter SDK** (on your `PATH`)
368
+ - **git** and **rsync** (rsync powers the isolated parallel-build sandboxes)
369
+ - For iOS builds/uploads: **macOS + Xcode + CocoaPods**
370
+ - An LLM API key (Gemini free tier works great)
371
+
372
+ Run `fluttership doctor` any time to check all of the above.
373
+
374
+ ---
375
+
376
+ ## Security model
377
+
378
+ - **Credentials are never committed** — the vault lives in `~/.fluttership/`, outside your repo, and `.p8`/`.jks`/`.json`/`.env` files are git-ignored by default.
379
+ - **The AI never sees secrets** — it receives only success/fail status and file *paths*, never key material.
380
+ - **Encryption at rest** — AES-256-GCM + PBKDF2; decrypted only in memory; temp files wiped after use.
381
+ - **Audit trail** — vault unlocks, exports, imports, and uploads are logged.
382
+ - Built artifacts can embed compiled code and `dart-define` values, so `fluttership-dist/` is git-ignored automatically — **never commit your builds.**
383
+
384
+ > If you fork or publish this repo, scrub any API keys from your git history before
385
+ > making it public — a key committed even once stays in the history until rewritten.
386
+
387
+ ---
388
+
389
+ ## License
390
+
391
+ MIT
392
+
393
+ ---
394
+
395
+ *Built by a Flutter dev who got tired of spending 3 hours on a 10-minute release.*