flutter-dev 0.1.1__tar.gz → 0.1.4__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 (39) hide show
  1. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/.env.example +5 -5
  2. flutter_dev-0.1.4/CHANGELOG.md +54 -0
  3. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/MANIFEST.in +1 -0
  4. flutter_dev-0.1.4/PKG-INFO +478 -0
  5. flutter_dev-0.1.4/README.md +445 -0
  6. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/fdev.py +12 -0
  7. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/flutter_dev.egg-info/SOURCES.txt +4 -1
  8. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/build.py +1 -1
  9. flutter_dev-0.1.4/managers/localization.py +293 -0
  10. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/pyproject.toml +3 -2
  11. flutter_dev-0.1.4/tests/test_localization.py +93 -0
  12. flutter_dev-0.1.1/PKG-INFO +0 -434
  13. flutter_dev-0.1.1/README.md +0 -402
  14. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/LICENSE +0 -0
  15. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/common_utils.py +0 -0
  16. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/core/__init__.py +0 -0
  17. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/core/constants.py +0 -0
  18. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/core/state.py +0 -0
  19. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/create_page.py +0 -0
  20. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/gemini_api.py +0 -0
  21. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/git_diff_output_editor.py +0 -0
  22. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/install_legacy.py +0 -0
  23. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/__init__.py +0 -0
  24. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/ai.py +0 -0
  25. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/app.py +0 -0
  26. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/brew.py +0 -0
  27. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/datetime.py +0 -0
  28. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/device.py +0 -0
  29. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/doctor.py +0 -0
  30. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/git.py +0 -0
  31. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/git_account.py +0 -0
  32. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/merge.py +0 -0
  33. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/mirror.py +0 -0
  34. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/project.py +0 -0
  35. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/managers/web_deploy.py +0 -0
  36. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/requirements.txt +0 -0
  37. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/setup.cfg +0 -0
  38. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/setup.py +0 -0
  39. {flutter_dev-0.1.1 → flutter_dev-0.1.4}/switch_ai.py +0 -0
@@ -3,24 +3,24 @@
3
3
  # এই file টি .gitignore এ add করতে হবে
4
4
 
5
5
  # Groq API (Current - Active)
6
- GROQ_API_KEY=your_groq_api_key_here
6
+ GROQ_API_KEY=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
7
7
  GROQ_API_URL=https://api.groq.com/openai/v1/chat/completions
8
8
  GROQ_MODEL=llama-3.3-70b-versatile
9
9
 
10
10
  # Mistral AI API
11
- MISTRAL_API_KEY=your_mistral_api_key_here
11
+ MISTRAL_API_KEY=irrmymmw43lvCcARy08R1TZhHuqMgXwa
12
12
  MISTRAL_API_URL=https://api.mistral.ai/v1/chat/completions
13
13
  MISTRAL_MODEL=mistral-medium
14
14
 
15
15
  # SambaNova API
16
- SAMBANOVA_API_KEY=your_sambanova_api_key_here
16
+ SAMBANOVA_API_KEY=c5c3f0dc-75db-4621-9d0c-7372efb4a04f
17
17
  SAMBANOVA_API_URL=https://api.sambanova.ai/v1/chat/completions
18
18
  SAMBANOVA_MODEL=Meta-Llama-3.3-70B-Instruct
19
19
 
20
20
  # OpenRouter API
21
- OPENROUTER_API_KEY=your_openrouter_api_key_here
21
+ OPENROUTER_API_KEY=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
22
22
  OPENROUTER_API_URL=https://openrouter.ai/api/v1/chat/completions
23
23
  OPENROUTER_MODEL=openai/gpt-3.5-turbo
24
24
 
25
25
  # Default AI Service (groq, mistral, sambanova, openrouter)
26
- DEFAULT_AI_SERVICE=groq
26
+ DEFAULT_AI_SERVICE=groq
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ ## 0.1.4 - 2026-06-15
6
+
7
+ ### Added
8
+
9
+ - Added `fdev arb-to-csv` to export Flutter ARB localization files from `lib/l10n` into `translations.csv` by default.
10
+ - Added `fdev csv-to-arb` to generate `app_<locale>.arb` files into `lib/l10n` from `translations.csv` by default.
11
+ - Added Python regression coverage for ARB/CSV conversion, locale parsing, default paths, and ARB metadata preservation.
12
+
13
+ ### Changed
14
+
15
+ - Documented the ARB/CSV localization workflow in the README command reference and quick-start examples.
16
+
17
+ ## 0.1.3 - 2026-06-08
18
+
19
+ ### Fixed
20
+
21
+ - Fixed CocoaPods command execution for `fdev pod` and `fdev ipa` so pod subcommands keep their arguments on macOS and Linux.
22
+
23
+ ## 0.1.2 - 2026-06-07
24
+
25
+ ### Changed
26
+
27
+ - Bumped package version to 0.1.2.
28
+
29
+ ## 0.1.1 - 2026-05-19
30
+
31
+ ### Added
32
+
33
+ - Added `fdev install-scrcpy` for platform-specific scrcpy installation.
34
+ - Added prompt-based scrcpy installation when `fdev mirror` cannot find `scrcpy`.
35
+ - Added PyPI Trusted Publishing workflow and package metadata.
36
+ - Added `CHANGELOG.md` release history.
37
+
38
+ ### Changed
39
+
40
+ - Updated `fdev doctor` to suggest `fdev install-scrcpy` when scrcpy is missing.
41
+ - Updated package author and license branding to Royal Court BD.
42
+ - Updated package repository URLs to `royalcourtbd/flutter-development-tools`.
43
+
44
+ ### Fixed
45
+
46
+ - Prevented private `.env` files from being included in package artifacts.
47
+ - Made PyPI console scripts safer by removing import-time side effects.
48
+
49
+ ## 0.1.0 - 2026-05-18
50
+
51
+ ### Added
52
+
53
+ - Initial public PyPI package setup for Flutter Development Tools.
54
+ - Added console scripts for `fdev`, `create-page`, `gemini-api`, and `git-diff-editor`.
@@ -1,4 +1,5 @@
1
1
  include README.md
2
+ include CHANGELOG.md
2
3
  include LICENSE
3
4
  include requirements.txt
4
5
  include .env.example
@@ -0,0 +1,478 @@
1
+ Metadata-Version: 2.4
2
+ Name: flutter-dev
3
+ Version: 0.1.4
4
+ Summary: A cross-platform CLI toolkit for Flutter development workflows.
5
+ Author: Royal Court BD
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/royalcourtbd/flutter-development-tools
8
+ Project-URL: Repository, https://github.com/royalcourtbd/flutter-development-tools
9
+ Project-URL: Issues, https://github.com/royalcourtbd/flutter-development-tools/issues
10
+ Project-URL: Changelog, https://github.com/royalcourtbd/flutter-development-tools/blob/main/CHANGELOG.md
11
+ Keywords: flutter,cli,developer-tools,automation
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Software Development :: Build Tools
26
+ Classifier: Topic :: Utilities
27
+ Requires-Python: >=3.8
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: python-dotenv>=0.19.0
31
+ Requires-Dist: requests>=2.25.0
32
+ Dynamic: license-file
33
+
34
+ # Flutter Dev
35
+
36
+ `flutter-dev` is a cross-platform Python CLI toolkit for automating common Flutter development workflows. It exposes the `fdev` command for project setup, release builds, device utilities, Git automation, AI-generated commit messages, screen mirroring, Firebase web deployment, and small productivity tools around an existing Flutter project.
37
+
38
+ The package is published on PyPI as `flutter-dev` and installs console commands for day-to-day Flutter work:
39
+
40
+ ```bash
41
+ pip install flutter-dev
42
+ ```
43
+
44
+ Current package metadata declares version `0.1.4`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
45
+
46
+ ## Key Features
47
+
48
+ - Flutter build automation for APK, split APK, AAB, IPA, release install, and Firebase web deploy.
49
+ - Project maintenance helpers for `flutter clean`, dependency refresh, `build_runner`, localization generation, analysis, formatting, cache repair, and CocoaPods.
50
+ - Localization CSV helpers for exporting ARB files to translator-friendly CSV files and generating ARB files back from CSV.
51
+ - Android device helpers for APK install, app uninstall, foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
52
+ - AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
53
+ - Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
54
+ - Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
55
+ - Environment diagnostics through `fdev doctor`.
56
+ - Small utilities for Homebrew cleanup, file merging from `paths.txt`, AI provider switching, and git diff prompt export.
57
+
58
+ ## Installation
59
+
60
+ ### Install From PyPI
61
+
62
+ ```bash
63
+ python -m pip install flutter-dev
64
+ ```
65
+
66
+ Verify the CLI is available:
67
+
68
+ ```bash
69
+ fdev doctor
70
+ ```
71
+
72
+ `pip install flutter-dev` installs the Python package, Python dependencies, and console scripts. It does not install Flutter, Dart, Git, Android SDK tools, CocoaPods, Firebase CLI, GitHub CLI, `scrcpy`, Java/JDK, or VS Code CLI.
73
+
74
+ ### Install From Source
75
+
76
+ ```bash
77
+ git clone https://github.com/royalcourtbd/flutter-development-tools.git
78
+ cd flutter-development-tools
79
+ python -m pip install .
80
+ ```
81
+
82
+ For editable local development:
83
+
84
+ ```bash
85
+ python -m pip install -e .
86
+ ```
87
+
88
+ ### Legacy Installer
89
+
90
+ The repository still includes `install_legacy.py` for the older `~/scripts/flutter-tools` and `~/bin` style installation:
91
+
92
+ ```bash
93
+ python install_legacy.py
94
+ ```
95
+
96
+ For new PyPI-based installs, prefer the console scripts installed by `pip`.
97
+
98
+ ## Requirements
99
+
100
+ Core requirements checked by `fdev doctor`:
101
+
102
+ - Python 3.8 or newer
103
+ - Flutter SDK
104
+ - Dart SDK
105
+ - Git
106
+ - Python packages: `python-dotenv`, `requests`
107
+
108
+ Feature-specific external tools:
109
+
110
+ | Tool | Used by |
111
+ | --- | --- |
112
+ | Android SDK Platform Tools / `adb` | `install`, `uninstall`, `clear-data`, `mirror`, `datetime`, `release-run` |
113
+ | Java/JDK | Android builds |
114
+ | CocoaPods | `pod`, `ipa` |
115
+ | Xcode / `xcrun` | iOS simulator and IPA workflows on macOS |
116
+ | `scrcpy` | `mirror` |
117
+ | Firebase CLI | `web-deploy` |
118
+ | GitHub CLI / `gh` | `fdev git ...` |
119
+ | VS Code CLI / `code` | Conflict helper in branch sync |
120
+ | Homebrew | `brew`, macOS `install-scrcpy` flow |
121
+
122
+ ## Quick Start
123
+
124
+ Run commands from the root of a Flutter project when they need `pubspec.yaml`, Android Gradle files, iOS files, or build outputs.
125
+
126
+ ```bash
127
+ # Check environment and optional tools
128
+ fdev doctor
129
+
130
+ # Generate localization files
131
+ fdev lang
132
+
133
+ # Export ARB translations from lib/l10n to translations.csv
134
+ fdev arb-to-csv
135
+
136
+ # Generate ARB files in lib/l10n from translations.csv
137
+ fdev csv-to-arb
138
+
139
+ # Run build_runner
140
+ fdev db
141
+
142
+ # Build a release APK
143
+ fdev apk
144
+
145
+ # Build and install a release APK on a connected Android device
146
+ fdev release-run
147
+
148
+ # Mirror an Android device
149
+ fdev mirror
150
+
151
+ # Generate an AI-assisted commit message and commit after confirmation
152
+ fdev commit
153
+ ```
154
+
155
+ ## Command Reference
156
+
157
+ ### Build Commands
158
+
159
+ | Command | Description |
160
+ | --- | --- |
161
+ | `fdev apk` | Runs clean, pub get, `flutter gen-l10n`, `build_runner`, then `flutter build apk --release --obfuscate --target-platform android-arm64 --split-debug-info=./`. |
162
+ | `fdev apk-split` | Builds release APKs with `--split-per-abi`. |
163
+ | `fdev aab` | Builds a release Android App Bundle with obfuscation and split debug info. |
164
+ | `fdev ipa` | Builds an App Store IPA on non-Windows systems; runs CocoaPods steps when `ios/` exists. |
165
+ | `fdev release-run` | Builds a release APK, installs it on a selected Android device, and launches the app. |
166
+ | `fdev web-deploy` | Runs `flutter build web --release`, then `firebase deploy --only functions,hosting`. |
167
+
168
+ Android APK/AAB build commands rename output files using the Android app label and current date (`DD_MMM`) when the label is available, display file sizes, and open the output directory.
169
+
170
+ ### Project Commands
171
+
172
+ | Command | Description |
173
+ | --- | --- |
174
+ | `fdev setup` | Runs clean, dependency upgrade, `build_runner`, localization generation, another dependency upgrade, `flutter analyze`, and `dart format .`. |
175
+ | `fdev cleanup` | Runs clean, pub get, `dart fix --apply`, `dart format .`, and `flutter pub upgrade --major-versions`. |
176
+ | `fdev lang` | Runs `flutter gen-l10n`. |
177
+ | `fdev arb-to-csv` | Exports `lib/l10n/*.arb` into `translations.csv` by default. Use `-d/--directory` and `-o/--output` to override paths. |
178
+ | `fdev csv-to-arb` | Generates `app_<locale>.arb` files into `lib/l10n` from `translations.csv` by default. Use `-i/--input` and `-o/--output-dir` to override paths. |
179
+ | `fdev db` | Runs `dart run build_runner build --delete-conflicting-outputs`. |
180
+ | `fdev cache-repair` | Runs `flutter pub cache repair`. |
181
+ | `fdev pod` | Updates CocoaPods from the `ios/` directory after removing `Podfile.lock` when present. |
182
+ | `create-page page <page_name>` | Generates a feature/page structure directly through the packaged console script. |
183
+ | `fdev page <page_name>` | Legacy wrapper that currently calls `~/scripts/flutter-tools/create_page.py`; for PyPI installs, prefer `create-page page <page_name>`. |
184
+
185
+ ### Device Commands
186
+
187
+ | Command | Description |
188
+ | --- | --- |
189
+ | `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
190
+ | `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
191
+ | `fdev clear-data` | Detects the foreground app, asks for confirmation, and runs `adb shell pm clear <package>` on Android. iOS prints manual options. |
192
+ | `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
193
+ | `fdev mirror` | Launches `scrcpy` for a selected Android device. |
194
+ | `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
195
+ | `fdev mirror --no-top` | Launches `scrcpy` without the always-on-top flag. |
196
+ | `fdev datetime` | Disables Android auto-time and opens Date & Time settings on the selected device. |
197
+
198
+ When multiple Android devices are connected, device-aware commands prompt you to choose a device.
199
+
200
+ ### Git Commands
201
+
202
+ | Command | Description |
203
+ | --- | --- |
204
+ | `fdev commit` | Generates a Conventional Commit-style message from `git diff HEAD`, asks for confirmation, stages unstaged changes with `git add .`, then commits. |
205
+ | `fdev tag` | Auto-increments the latest Git tag, updates `pubspec.yaml` version/build number, commits the version bump, creates the tag, and pushes the commit and tag. |
206
+ | `fdev discard` | Prompts, then discards tracked changes and removes untracked files using Git commands. |
207
+ | `fdev sync <branch...>` | Fetches, merges named branches into the current branch, pushes, then merges current branch back into those branches. Requires a clean worktree. |
208
+ | `fdev deploy` | Merges the current branch into `deployment` and pushes it. Requires a clean worktree. |
209
+ | `fdev git` | Opens an interactive GitHub account manager using the GitHub CLI. |
210
+
211
+ `fdev git` subcommands:
212
+
213
+ ```bash
214
+ fdev git status
215
+ fdev git list
216
+ fdev git switch <username>
217
+ fdev git add
218
+ fdev git remove <username>
219
+ fdev git config
220
+ ```
221
+
222
+ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it does not automatically change `git user.name` or `git user.email`. Use `fdev git config` when you want to update Git identity.
223
+
224
+ ### Utility Commands
225
+
226
+ | Command | Description |
227
+ | --- | --- |
228
+ | `fdev doctor` | Checks platform, Python, Flutter/Dart/Git, Python packages, Android/iOS tools, optional CLIs, `.env`, Flutter project detection, and global `fdev` availability. |
229
+ | `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
230
+ | `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
231
+ | `fdev brew` | Interactive Homebrew package manager for viewing packages, uninstalling with cleanup, clearing cache, and global cleanup. |
232
+ | `fdev merge` | Reads paths from `paths.txt`, merges file contents into `path_merge_files.txt`, and opens the result when there are no failures. |
233
+ | `gemini-api` | Tests the currently selected AI provider configuration. |
234
+ | `git-diff-editor` | Writes `git diff` output plus a prompt into `diff_output.txt` and opens it with the default app. |
235
+
236
+ ## AI Configuration
237
+
238
+ AI features are used by `fdev commit` and `gemini-api`. Despite the historical `gemini_api.py` filename, the current source supports these providers:
239
+
240
+ - `groq`
241
+ - `mistral`
242
+ - `sambanova`
243
+ - `openrouter`
244
+
245
+ Each provider expects an API key, API URL, and model name. A typical configuration looks like this:
246
+
247
+ ```env
248
+ GROQ_API_KEY=your_groq_api_key_here
249
+ GROQ_API_URL=https://api.groq.com/openai/v1/chat/completions
250
+ GROQ_MODEL=llama-3.3-70b-versatile
251
+
252
+ MISTRAL_API_KEY=your_mistral_api_key_here
253
+ MISTRAL_API_URL=https://api.mistral.ai/v1/chat/completions
254
+ MISTRAL_MODEL=mistral-medium
255
+
256
+ SAMBANOVA_API_KEY=your_sambanova_api_key_here
257
+ SAMBANOVA_API_URL=https://api.sambanova.ai/v1/chat/completions
258
+ SAMBANOVA_MODEL=Meta-Llama-3.3-70B-Instruct
259
+
260
+ OPENROUTER_API_KEY=your_openrouter_api_key_here
261
+ OPENROUTER_API_URL=https://openrouter.ai/api/v1/chat/completions
262
+ OPENROUTER_MODEL=openai/gpt-3.5-turbo
263
+
264
+ DEFAULT_AI_SERVICE=groq
265
+ ```
266
+
267
+ The AI runtime searches for configuration in this order:
268
+
269
+ 1. `FLUTTER_DEV_ENV`
270
+ 2. `$XDG_CONFIG_HOME/flutter-dev/.env`
271
+ 3. `~/.config/flutter-dev/.env`
272
+ 4. `~/scripts/flutter-tools/.env`
273
+ 5. `.env` beside the installed module/source
274
+ 6. `.env` in the current working directory
275
+
276
+ Recommended setup:
277
+
278
+ ```bash
279
+ mkdir -p ~/.config/flutter-dev
280
+ nano ~/.config/flutter-dev/.env
281
+ ```
282
+
283
+ Then test:
284
+
285
+ ```bash
286
+ fdev ai
287
+ gemini-api
288
+ ```
289
+
290
+ Note: the current `fdev doctor` `.env` check is more limited than the AI runtime lookup. If `doctor` reports a missing `.env` but `gemini-api` succeeds, the AI configuration is still usable.
291
+
292
+ ## Feature/Page Generation
293
+
294
+ Use the packaged command:
295
+
296
+ ```bash
297
+ create-page page user_profile
298
+ ```
299
+
300
+ This reads the Flutter project name from `pubspec.yaml`, lowercases the page name, converts snake_case to PascalCase for class names, and creates:
301
+
302
+ ```text
303
+ lib/features/user_profile/
304
+ data/
305
+ datasource/
306
+ models/
307
+ repositories/user_profile_repository_impl.dart
308
+ domain/
309
+ datasource/
310
+ entities/
311
+ repositories/user_profile_repository.dart
312
+ usecase/
313
+ presentation/
314
+ presenter/user_profile_presenter.dart
315
+ presenter/user_profile_ui_state.dart
316
+ ui/user_profile_page.dart
317
+ widgets/
318
+ di/user_profile_di.dart
319
+ ```
320
+
321
+ The generated Dart pattern is based on:
322
+
323
+ - `{Prefix}Repository`
324
+ - `{Prefix}RepositoryImpl`
325
+ - `{Prefix}Di`
326
+ - `{Prefix}Presenter extends BasePresenter<{Prefix}UiState>`
327
+ - `{Prefix}UiState extends BaseUiState`
328
+ - a simple `StatelessWidget` page
329
+
330
+ If `lib/core/di/service_locator.dart` exists, the generator attempts to add the feature DI import and `await {Prefix}Di.setup(_serviceLocator);` near `//Feature DI setup`.
331
+
332
+ Important notes:
333
+
334
+ - The generator overwrites the generated target files if they already exist.
335
+ - `service_locator.dart` updates are regex-based and skipped when the file is missing.
336
+ - The source does not generate BLoC/Cubit templates; it generates the project's presenter/base-state pattern.
337
+
338
+ ## Architecture
339
+
340
+ The package is organized as a Python CLI with a thin dispatcher and feature-specific managers:
341
+
342
+ ```text
343
+ fdev.py Main command dispatcher
344
+ create_page.py Flutter feature/page generator
345
+ gemini_api.py AI commit-message provider client and config loader
346
+ git_diff_output_editor.py
347
+ common_utils.py Shared colors, spinners, env helpers, platform helpers
348
+ core/constants.py Shared regex patterns, paths, and build command constants
349
+ core/state.py Selected Android device state
350
+ managers/build.py APK/AAB/IPA/release-run build workflow
351
+ managers/project.py setup, cleanup, lang, db, pod, cache repair
352
+ managers/app.py install, uninstall, foreground app data clearing
353
+ managers/device.py ADB device detection and selection
354
+ managers/mirror.py scrcpy install, mirror, wireless ADB setup
355
+ managers/git.py commit, tag, discard, branch sync, deployment merge
356
+ managers/git_account.py GitHub account manager around gh CLI
357
+ managers/doctor.py Environment diagnostics
358
+ managers/ai.py AI provider status and switching
359
+ managers/brew.py Interactive Homebrew manager
360
+ managers/merge.py paths.txt to path_merge_files.txt merger
361
+ managers/web_deploy.py Flutter web build plus Firebase deploy
362
+ managers/datetime.py Android Date & Time settings helper
363
+ ```
364
+
365
+ The installed Python layout is top-level modules plus the `core` and `managers` packages; it is not a single import package named `flutter_dev`.
366
+
367
+ ## Important Behavior Notes
368
+
369
+ - Many `fdev` commands mutate your Flutter project, Git repository, connected device, or local tool environment. Read command output before confirming prompts.
370
+ - `fdev commit` can stage all unstaged changes before committing.
371
+ - `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
372
+ - `fdev discard` removes tracked changes and untracked files after confirmation.
373
+ - `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
374
+ - `fdev clear-data` clears app data on Android after confirmation.
375
+ - `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
376
+ - `fdev` creates build output directories at startup in the current working directory.
377
+ - Some subcommands return failure internally without always mapping that failure to a non-zero process exit code, so automation should inspect command output carefully.
378
+
379
+ ## Troubleshooting
380
+
381
+ ### Command Not Found
382
+
383
+ Make sure the Python environment where you installed the package is active:
384
+
385
+ ```bash
386
+ python -m pip show flutter-dev
387
+ python -m pip install --upgrade flutter-dev
388
+ ```
389
+
390
+ Then check:
391
+
392
+ ```bash
393
+ which fdev
394
+ fdev doctor
395
+ ```
396
+
397
+ On Windows, use:
398
+
399
+ ```powershell
400
+ where fdev
401
+ ```
402
+
403
+ ### Flutter Project Not Detected
404
+
405
+ Run project-specific commands from the directory that contains `pubspec.yaml`.
406
+
407
+ ### Build Commands Fail
408
+
409
+ Check that Flutter, Dart, Android SDK tools, Java/JDK, and project dependencies are installed:
410
+
411
+ ```bash
412
+ fdev doctor
413
+ flutter doctor
414
+ ```
415
+
416
+ ### AI Commit Fails
417
+
418
+ Check provider configuration and network access:
419
+
420
+ ```bash
421
+ fdev ai
422
+ gemini-api
423
+ ```
424
+
425
+ Ensure the selected provider has all three values set:
426
+
427
+ - `<PROVIDER>_API_KEY`
428
+ - `<PROVIDER>_API_URL`
429
+ - `<PROVIDER>_MODEL`
430
+
431
+ ### Screen Mirroring Fails
432
+
433
+ Install or repair `scrcpy`:
434
+
435
+ ```bash
436
+ fdev install-scrcpy
437
+ fdev mirror
438
+ ```
439
+
440
+ For wireless mirroring, connect the device over USB first:
441
+
442
+ ```bash
443
+ fdev mirror --wireless
444
+ ```
445
+
446
+ ### `create-page` Works But `fdev page` Fails
447
+
448
+ For PyPI installs, use:
449
+
450
+ ```bash
451
+ create-page page <page_name>
452
+ ```
453
+
454
+ The `fdev page` wrapper still targets the legacy `~/scripts/flutter-tools/create_page.py` path.
455
+
456
+ ## Packaging And Release Checks
457
+
458
+ For local packaging checks:
459
+
460
+ ```bash
461
+ python -m pip install --upgrade build twine
462
+ rm -rf dist build flutter_dev.egg-info
463
+ python -m build
464
+ python -m twine check dist/*
465
+ ```
466
+
467
+ Keep secrets out of release artifacts and documentation. Do not commit `.env` files or API keys. Use placeholder values in examples.
468
+
469
+ ## License
470
+
471
+ MIT License. See [LICENSE](LICENSE).
472
+
473
+ ## Links
474
+
475
+ - Homepage: https://github.com/royalcourtbd/flutter-development-tools
476
+ - Repository: https://github.com/royalcourtbd/flutter-development-tools
477
+ - Issues: https://github.com/royalcourtbd/flutter-development-tools/issues
478
+ - Changelog: https://github.com/royalcourtbd/flutter-development-tools/blob/main/CHANGELOG.md